You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
933 B
39 lines
933 B
package sms_test
|
|
|
|
import (
|
|
"yunyan/sys/sms"
|
|
"fmt"
|
|
"testing"
|
|
)
|
|
|
|
// 国内
|
|
/*
|
|
SecretId:AKIDxlMkyzveH1pX3MRM6f197uTxEHXdYGl7
|
|
SecretKey:FI8lBNM7e7PAj7LL8h4DEYjhRAvUVQL8
|
|
*/
|
|
func Test_sys_china(t *testing.T) {
|
|
if sys, err := sms.NewSys(
|
|
sms.SetAppId("1401045886"),
|
|
sms.SetSecretId("AKIDxlMkyzveH1pX3MRM6f197uTxEHXdYGl7"),
|
|
sms.KeySecretKey("FI8lBNM7e7PAj7LL8h4DEYjhRAvUVQL8"),
|
|
sms.SetSignName("深圳市云衍智能"),
|
|
sms.SetTemplate1("2397800"),
|
|
); err == nil {
|
|
err = sys.SendCaptcha("+8615336758045", "2341")
|
|
fmt.Println(err)
|
|
}
|
|
}
|
|
|
|
// 海外
|
|
func Test_sys_overseas(t *testing.T) {
|
|
if sys, err := sms.NewSys(
|
|
sms.SetAppId("1400971698"),
|
|
sms.SetSecretId("AKIDmiaJsJr6C8sPkt22xgFdswnTyHNG1c3J"),
|
|
sms.KeySecretKey("BByYxDH9oIafXCmALJ5f4GGQWcaMwPta"),
|
|
sms.SetSignName("深圳市创想云启"),
|
|
sms.SetTemplate2("2385564"),
|
|
); err == nil {
|
|
err = sys.SendCaptcha("+85270278175", "2341")
|
|
fmt.Println(err)
|
|
}
|
|
}
|
|
|