Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TOSTUMI
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Maple
TOSTUMI
Commits
c8ab96b5
Commit
c8ab96b5
authored
Nov 18, 2020
by
Sixiang_Zzb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
手机号码验证处理
parent
e815bd8d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
UsersDetail.tsx
src/pages/UserManagement/LIFEUserManagement/UsersDetail.tsx
+3
-3
No files found.
src/pages/UserManagement/LIFEUserManagement/UsersDetail.tsx
View file @
c8ab96b5
...
...
@@ -155,7 +155,7 @@ const UsersDetail = (props: any) => {
};
const
deleteUnit
=
(
values
:
any
)
=>
{
const
permissionArr
=
JSON
.
parse
(
localStorage
.
getItem
(
'permission'
));
const
permissionArr
=
JSON
.
parse
(
localStorage
.
getItem
(
'permission'
)
||
'[]'
);
if
(
permissionArr
.
indexOf
(
'5'
)
<
0
)
{
message
.
error
(
'No Permissions!!!'
,
3
);
return
;
...
...
@@ -205,10 +205,10 @@ const UsersDetail = (props: any) => {
const
checkData
=
(
rule
:
any
,
value
:
any
,
callback
:
any
)
=>
{
if
(
value
)
{
if
(
/^
\d{8}
|1
[
3|5|7|8
]\d{9}
$/g
.
test
(
value
))
{
if
(
/^
\d{8}
$|^1
[
3|5|7|8
]\d{9}
$/
.
test
(
value
))
{
callback
();
}
else
{
callback
(
new
Error
(
'
Incorrect format of mobile phone number
!'
));
callback
(
new
Error
(
'
The format is incorrect
!'
));
}
}
callback
(
'*it is required!'
);
...
...
Write
Preview
Markdown
is supported
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