This commit is contained in:
Mrx
2026-05-06 16:42:27 +08:00
parent 2312f54e1e
commit 7f0383b7d6
4 changed files with 100 additions and 36 deletions

View 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 判断是否为审核预留手机号1310000999913100010099
func IsAppReviewDemoMobile(mobile string) bool {
n, err := strconv.ParseInt(mobile, 10, 64)
if err != nil {
return false
}
return n >= DemoMobileMin && n <= DemoMobileMax
}