Browse Source

fix:短信模板id从数据库中获取

Roc 1 day ago
parent
commit
44cf3e032b
1 changed files with 7 additions and 0 deletions
  1. 7 0
      services/user_login.go

+ 7 - 0
services/user_login.go

@@ -29,6 +29,13 @@ func SendAdminMobileVerifyCode(source int, mobile, areaCode string) (ok bool, er
 	}
 	}
 
 
 	tplId := utils.SmsNewLoginTplId
 	tplId := utils.SmsNewLoginTplId
+
+	// 从配置里面获取短信模板ID
+	config, e := company.GetConfigDetailByCode("LoginSmsTpId")
+	if e == nil {
+		tplId = config.ConfigValue
+	}
+	
 	if areaCode == "86" {
 	if areaCode == "86" {
 		ok = SendSmsCode(mobile, verifyCode, tplId)
 		ok = SendSmsCode(mobile, verifyCode, tplId)
 	} else {
 	} else {