Files
qnc-server-v3/common/reviewphone/reviewphone.go
2026-05-06 16:42:27 +08:00

23 lines
791 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// 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
}