Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Litemall
Commits
749e6ab2
Commit
749e6ab2
authored
Jul 31, 2020
by
linlinjava
Browse files
chore: 小程序端取消手机号码校验,后端减弱手机号码校验。
parent
9d5aafff
Changes
9
Hide whitespace changes
Inline
Side-by-side
litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/web/AdminUserController.java
View file @
749e6ab2
...
...
@@ -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
));
...
...
litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/web/WxAddressController.java
View file @
749e6ab2
...
...
@@ -79,7 +79,7 @@ public class WxAddressController extends GetRegionService {
if
(
StringUtils
.
isEmpty
(
mobile
))
{
return
ResponseUtil
.
badArgument
();
}
if
(!
RegexUtil
.
isMobile
Exact
(
mobile
))
{
if
(!
RegexUtil
.
isMobile
Simple
(
mobile
))
{
return
ResponseUtil
.
badArgument
();
}
...
...
litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/web/WxAuthController.java
View file @
749e6ab2
...
...
@@ -189,7 +189,7 @@ public class WxAuthController {
if
(
StringUtils
.
isEmpty
(
phoneNumber
))
{
return
ResponseUtil
.
badArgument
();
}
if
(!
RegexUtil
.
isMobile
Exact
(
phoneNumber
))
{
if
(!
RegexUtil
.
isMobile
Simple
(
phoneNumber
))
{
return
ResponseUtil
.
badArgumentValue
();
}
...
...
@@ -256,7 +256,7 @@ public class WxAuthController {
if
(
userList
.
size
()
>
0
)
{
return
ResponseUtil
.
fail
(
AUTH_MOBILE_REGISTERED
,
"手机号已注册"
);
}
if
(!
RegexUtil
.
isMobile
Exact
(
mobile
))
{
if
(!
RegexUtil
.
isMobile
Simple
(
mobile
))
{
return
ResponseUtil
.
fail
(
AUTH_INVALID_MOBILE
,
"手机号格式不正确"
);
}
//判断验证码是否正确
...
...
@@ -343,7 +343,7 @@ public class WxAuthController {
if
(
StringUtils
.
isEmpty
(
phoneNumber
))
{
return
ResponseUtil
.
badArgument
();
}
if
(!
RegexUtil
.
isMobile
Exact
(
phoneNumber
))
{
if
(!
RegexUtil
.
isMobile
Simple
(
phoneNumber
))
{
return
ResponseUtil
.
badArgumentValue
();
}
if
(
StringUtils
.
isEmpty
(
captchaType
))
{
...
...
litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/web/WxFeedbackController.java
View file @
749e6ab2
...
...
@@ -55,7 +55,7 @@ public class WxFeedbackController {
if
(
StringUtils
.
isEmpty
(
mobile
))
{
return
ResponseUtil
.
badArgument
();
}
if
(!
RegexUtil
.
isMobile
Exact
(
mobile
))
{
if
(!
RegexUtil
.
isMobile
Simple
(
mobile
))
{
return
ResponseUtil
.
badArgument
();
}
return
null
;
...
...
litemall-wx/pages/auth/register/register.js
View file @
749e6ab2
...
...
@@ -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
)
{
...
...
litemall-wx/pages/auth/reset/reset.js
View file @
749e6ab2
...
...
@@ -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
:
'
错误信息
'
,
...
...
litemall-wx/pages/ucenter/addressAdd/addressAdd.js
View file @
749e6ab2
...
...
@@ -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
,
...
...
litemall-wx/pages/ucenter/feedback/feedback.js
View file @
749e6ab2
...
...
@@ -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
,
...
...
renard-wx/pages/ucenter/addressAdd/addressAdd.js
View file @
749e6ab2
...
...
@@ -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
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment