From d25ee35268a4010db1b1e58404fdaeff556fdced Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Fri, 16 Oct 2020 17:55:25 +0800 Subject: [PATCH] yzm --- business/auth2/authprovider/mobile/mobile.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/business/auth2/authprovider/mobile/mobile.go b/business/auth2/authprovider/mobile/mobile.go index 5f552c0f0..32aa3d974 100644 --- a/business/auth2/authprovider/mobile/mobile.go +++ b/business/auth2/authprovider/mobile/mobile.go @@ -3,6 +3,7 @@ package mobile import ( "errors" "fmt" + "math/rand" "git.rosy.net.cn/baseapi/utils" "git.rosy.net.cn/jx-callback/business/auth2" @@ -44,7 +45,8 @@ func init() { // 特殊接口 func (a *Auther) SendVerifyCode(mobileNumber string) (verifyCode string, err error) { - verifyCode = a.GenerateVerifyCode(mobileNumber) + verifyCode = fmt.Sprintf("%06d", rand.Intn(1000000)) + // a.GenerateVerifyCode(mobileNumber) smsClient := aliyunsmsclient.New("http://dysmsapi.aliyuncs.com/") response, err := smsClient.Execute(globals.AliKey, globals.AliSecret, mobileNumber, globals.SMSSignName, globals.SMSMobileVerifyTemplate, string(utils.MustMarshal(map[string]interface{}{ "code": verifyCode,