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
bbb60313
Commit
bbb60313
authored
May 15, 2018
by
Junling Bu
Browse files
fix[litemall-wx]: 下单页面和收货地址页面的手机号码验证。
parent
2df0af5f
Changes
2
Hide whitespace changes
Inline
Side-by-side
litemall-wx/pages/shopping/addressAdd/addressAdd.js
View file @
bbb60313
var
util
=
require
(
'
../../../utils/util.js
'
);
var
api
=
require
(
'
../../../config/api.js
'
);
var
check
=
require
(
'
../../../utils/check.js
'
);
var
app
=
getApp
();
Page
({
data
:
{
...
...
@@ -285,6 +287,10 @@ Page({
return
false
;
}
if
(
!
check
.
isValidPhone
(
this
.
data
.
mobile
))
{
util
.
showErrorToast
(
'
手机号不正确
'
);
return
false
;
}
let
that
=
this
;
util
.
request
(
api
.
AddressSave
,
{
...
...
litemall-wx/pages/ucenter/addressAdd/addressAdd.js
View file @
bbb60313
var
util
=
require
(
'
../../../utils/util.js
'
);
var
api
=
require
(
'
../../../config/api.js
'
);
var
check
=
require
(
'
../../../utils/check.js
'
);
var
app
=
getApp
();
Page
({
data
:
{
...
...
@@ -285,6 +287,10 @@ Page({
return
false
;
}
if
(
!
check
.
isValidPhone
(
this
.
data
.
mobile
))
{
util
.
showErrorToast
(
'
手机号不正确
'
);
return
false
;
}
let
that
=
this
;
util
.
request
(
api
.
AddressSave
,
{
...
...
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