f
This commit is contained in:
22
common/reviewphone/reviewphone.go
Normal file
22
common/reviewphone/reviewphone.go
Normal file
@@ -0,0 +1,22 @@
|
||||
// Package reviewphone 定义微信小程序等平台审核时使用的固定体验手机号段与验证码,
|
||||
// 仅用于审核人员完整体验代理注册流程,勿用于开放环境绕过真实校验。
|
||||
package reviewphone
|
||||
|
||||
import "strconv"
|
||||
|
||||
const (
|
||||
// DemoMobileMin / DemoMobileMax 为 inclusive 区间,共 101 个号码。
|
||||
DemoMobileMin int64 = 13100009999
|
||||
DemoMobileMax int64 = 13100010099
|
||||
// DemoVerifyCode 与 DemoMobile 区间配合使用,通过服务端校验。
|
||||
DemoVerifyCode = "143838"
|
||||
)
|
||||
|
||||
// IsAppReviewDemoMobile 判断是否为审核预留手机号(13100009999–13100010099)。
|
||||
func IsAppReviewDemoMobile(mobile string) bool {
|
||||
n, err := strconv.ParseInt(mobile, 10, 64)
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
return n >= DemoMobileMin && n <= DemoMobileMax
|
||||
}
|
||||
Reference in New Issue
Block a user