🎨 新增讲师相关接口(待完善)

This commit is contained in:
2025-07-20 03:07:42 +08:00
parent 48ddb72cf2
commit 70f65c96bd
10 changed files with 186 additions and 6 deletions

View File

@@ -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("短信发送失败")
}
}