🎨 新增讲师相关接口(待完善)
This commit is contained in:
@@ -2,6 +2,7 @@ package test
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"git.echol.cn/loser/lckt/utils/sms"
|
||||
"golang.org/x/crypto/bcrypt"
|
||||
"math/rand"
|
||||
"testing"
|
||||
@@ -25,3 +26,16 @@ func TestPwd(t *testing.T) {
|
||||
fmt.Println("密码正确")
|
||||
}
|
||||
}
|
||||
|
||||
func TestCode(t *testing.T) {
|
||||
// 测试验证码生成
|
||||
rand.New(rand.NewSource(time.Now().UnixNano()))
|
||||
verifyCode := fmt.Sprintf("%06v", rand.Int31n(1000000))
|
||||
|
||||
test := sms.SendSMSTest("17754945397", verifyCode)
|
||||
if test {
|
||||
fmt.Println("短信发送成功")
|
||||
} else {
|
||||
fmt.Println("短信发送失败")
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user