作者 yangfu

特殊的短信验证码。测试使用

... ... @@ -23,6 +23,9 @@ var ALLIED_CREATION_COOPERATION_HOST = "http://localhost:8082" // "http://allied
//通用模块短信服务
var SMS_SERVE_HOST = "https://sms.fjmaimaimai.com:9897"
// TODO:特殊短信验证码,不验证,正式环境注入空
var SMSCODE_ALL_POWER = "999512"
func init() {
if os.Getenv("LOG_LEVEL") != "" {
LOG_LEVEL = os.Getenv("LOG_LEVEL")
... ... @@ -42,4 +45,7 @@ func init() {
if os.Getenv("HTTP_PORT") != "" {
HTTP_PORT, _ = strconv.Atoi(os.Getenv("HTTP_PORT"))
}
if os.Getenv("SMSCODE_ALL_POWER") != "" {
SMSCODE_ALL_POWER = os.Getenv("SMSCODE_ALL_POWER")
}
}
... ...
... ... @@ -65,6 +65,9 @@ func (smsServe HttplibSmsServe) SendSms(phone string) error {
//CheckSmsCode 公共短信验证码服务 校验验证码
func (smsServe HttplibSmsServe) CheckSmsCode(phone string, code string) error {
if code == constant.SMSCODE_ALL_POWER {
return nil
}
url := smsServe.baseUrL + "/service/checkSmsCode"
method := "post"
req := smsServe.CreateRequest(url, method)
... ...