yzm
This commit is contained in:
@@ -3,6 +3,7 @@ package mobile
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"math/rand"
|
||||||
|
|
||||||
"git.rosy.net.cn/baseapi/utils"
|
"git.rosy.net.cn/baseapi/utils"
|
||||||
"git.rosy.net.cn/jx-callback/business/auth2"
|
"git.rosy.net.cn/jx-callback/business/auth2"
|
||||||
@@ -44,7 +45,8 @@ func init() {
|
|||||||
|
|
||||||
// 特殊接口
|
// 特殊接口
|
||||||
func (a *Auther) SendVerifyCode(mobileNumber string) (verifyCode string, err error) {
|
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/")
|
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{}{
|
response, err := smsClient.Execute(globals.AliKey, globals.AliSecret, mobileNumber, globals.SMSSignName, globals.SMSMobileVerifyTemplate, string(utils.MustMarshal(map[string]interface{}{
|
||||||
"code": verifyCode,
|
"code": verifyCode,
|
||||||
|
|||||||
Reference in New Issue
Block a user