Ver Fonte

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

Roc há 1 dia atrás
pai
commit
44cf3e032b
1 ficheiros alterados com 7 adições e 0 exclusões
  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
+
+	// 从配置里面获取短信模板ID
+	config, e := company.GetConfigDetailByCode("LoginSmsTpId")
+	if e == nil {
+		tplId = config.ConfigValue
+	}
+	
 	if areaCode == "86" {
 		ok = SendSmsCode(mobile, verifyCode, tplId)
 	} else {