Commit 749e6ab2 authored by linlinjava's avatar linlinjava
Browse files

chore: 小程序端取消手机号码校验,后端减弱手机号码校验。

parent 9d5aafff
......@@ -43,14 +43,14 @@ public class AdminUserController {
return ResponseUtil.okList(userList);
}
@RequiresPermissions("admin:user:list")
@RequiresPermissionsDesc(menu = {"用户管理", "会员管理"}, button = "查询")
@RequiresPermissionsDesc(menu = {"用户管理", "会员管理"}, button = "详情")
@GetMapping("/detail")
public Object userDetail(@NotNull Integer id) {
LitemallUser user=userService.findById(id);
return ResponseUtil.ok(user);
}
@RequiresPermissions("admin:user:list")
@RequiresPermissionsDesc(menu = {"用户管理", "会员管理"}, button = "查询")
@RequiresPermissionsDesc(menu = {"用户管理", "会员管理"}, button = "编辑")
@PostMapping("/update")
public Object userUpdate(@RequestBody LitemallUser user) {
return ResponseUtil.ok(userService.updateById(user));
......
......@@ -79,7 +79,7 @@ public class WxAddressController extends GetRegionService {
if (StringUtils.isEmpty(mobile)) {
return ResponseUtil.badArgument();
}
if (!RegexUtil.isMobileExact(mobile)) {
if (!RegexUtil.isMobileSimple(mobile)) {
return ResponseUtil.badArgument();
}
......
......@@ -189,7 +189,7 @@ public class WxAuthController {
if (StringUtils.isEmpty(phoneNumber)) {
return ResponseUtil.badArgument();
}
if (!RegexUtil.isMobileExact(phoneNumber)) {
if (!RegexUtil.isMobileSimple(phoneNumber)) {
return ResponseUtil.badArgumentValue();
}
......@@ -256,7 +256,7 @@ public class WxAuthController {
if (userList.size() > 0) {
return ResponseUtil.fail(AUTH_MOBILE_REGISTERED, "手机号已注册");
}
if (!RegexUtil.isMobileExact(mobile)) {
if (!RegexUtil.isMobileSimple(mobile)) {
return ResponseUtil.fail(AUTH_INVALID_MOBILE, "手机号格式不正确");
}
//判断验证码是否正确
......@@ -343,7 +343,7 @@ public class WxAuthController {
if (StringUtils.isEmpty(phoneNumber)) {
return ResponseUtil.badArgument();
}
if (!RegexUtil.isMobileExact(phoneNumber)) {
if (!RegexUtil.isMobileSimple(phoneNumber)) {
return ResponseUtil.badArgumentValue();
}
if (StringUtils.isEmpty(captchaType)) {
......
......@@ -55,7 +55,7 @@ public class WxFeedbackController {
if (StringUtils.isEmpty(mobile)) {
return ResponseUtil.badArgument();
}
if (!RegexUtil.isMobileExact(mobile)) {
if (!RegexUtil.isMobileSimple(mobile)) {
return ResponseUtil.badArgument();
}
return null;
......
......@@ -42,15 +42,6 @@ Page({
return false;
}
if (!check.isValidPhone(this.data.mobile)) {
wx.showModal({
title: '错误信息',
content: '手机号输入不正确',
showCancel: false
});
return false;
}
wx.request({
url: api.AuthRegisterCaptcha,
data: {
......@@ -145,15 +136,6 @@ Page({
return false;
}
if (!check.isValidPhone(this.data.mobile)) {
wx.showModal({
title: '错误信息',
content: '手机号输入不正确',
showCancel: false
});
return false;
}
wx.login({
success: function(res) {
if (!res.code) {
......
......@@ -70,15 +70,6 @@ Page({
return false;
}
if (!check.isValidPhone(this.data.mobile)) {
wx.showModal({
title: '错误信息',
content: '手机号输入不正确',
showCancel: false
});
return false;
}
if (this.data.password.length < 3) {
wx.showModal({
title: '错误信息',
......
......@@ -322,11 +322,6 @@ Page({
return false;
}
if (!check.isValidPhone(address.tel)) {
util.showErrorToast('手机号不正确');
return false;
}
let that = this;
util.request(api.AddressSave, {
id: address.id,
......
......@@ -117,14 +117,6 @@ Page({
return false;
}
if (!check.isValidPhone(this.data.mobile)) {
this.setData({
mobile: ''
});
util.showErrorToast('请输入手机号码');
return false;
}
wx.showLoading({
title: '提交中...',
mask: true,
......
......@@ -322,11 +322,6 @@ Page({
return false;
}
if (!check.isValidPhone(address.tel)) {
util.showErrorToast('手机号不正确');
return false;
}
let that = this;
util.request(api.AddressSave, {
id: address.id,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment