|
|
@@ -129,6 +129,8 @@ func WxDecryptMobile(c *gin.Context) { |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
res.PhoneNumber = utils.Base64StdEncode(res.PhoneNumber) |
|
|
|
|
|
|
|
e.OutSuc(c, res, nil) |
|
|
|
return |
|
|
|
} |
|
|
@@ -184,6 +186,13 @@ func Register(c *gin.Context) { |
|
|
|
e.OutErr(c, e.ERR_DB_ORM, err) |
|
|
|
return |
|
|
|
} |
|
|
|
//TODO::解密 |
|
|
|
phone := utils.Base64StdDecode(req.Phone) |
|
|
|
if phone == "" { |
|
|
|
e.OutErr(c, e.ERR, "非法/恶意 参数!!!") |
|
|
|
return |
|
|
|
} |
|
|
|
req.Phone = phone |
|
|
|
// 编译正则表达式 |
|
|
|
pattern := `^1[3456789]\d{9}$` |
|
|
|
r := regexp.MustCompile(pattern) |
|
|
|