Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
肖康
/
H5_2.0
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
17edccd3
authored
May 19, 2023
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
bug
parent
6cd42ae0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
2 deletions
pages/mine/login.vue
pages/mine/login.vue
View file @
17edccd3
...
@@ -113,6 +113,10 @@ export default {
...
@@ -113,6 +113,10 @@ export default {
this
.
index
=
e
.
detail
.
value
;
this
.
index
=
e
.
detail
.
value
;
this
.
formParams
.
intl_code
=
this
.
array
[
e
.
detail
.
value
];
this
.
formParams
.
intl_code
=
this
.
array
[
e
.
detail
.
value
];
},
},
/**
* tab切换
* @param {Object} index
*/
tab
(
index
)
{
tab
(
index
)
{
this
.
curr
=
index
;
this
.
curr
=
index
;
},
},
...
@@ -126,6 +130,23 @@ export default {
...
@@ -126,6 +130,23 @@ export default {
* 手机验证码
* 手机验证码
*/
*/
countdownChange
()
{
countdownChange
()
{
var
reg
=
/^1
(
3
[
0-9
]
|4
[
01456879
]
|5
[
0-35-9
]
|6
[
2567
]
|7
[
0-8
]
|8
[
0-9
]
|9
[
0-35-9
])\d{8}
$/
;
if
(
!
this
.
formParams
.
account
)
{
uni
.
showToast
({
title
:
'请输入手机号'
,
icon
:
'none'
});
return
false
;
}
if
(
!
reg
.
test
(
this
.
formParams
.
account
))
{
uni
.
showToast
({
title
:
'手机格式错误'
,
icon
:
'none'
});
return
false
;
}
this
.
request
(
Api_Url
+
'/public/smsVerify'
,
'POST'
,
{
mobile
:
this
.
formParams
.
account
,
verify
:
this
.
formParams
.
verify
,
intl_code
:
this
.
formParams
.
intl_code
},
true
,
true
).
then
(
res
=>
{
this
.
request
(
Api_Url
+
'/public/smsVerify'
,
'POST'
,
{
mobile
:
this
.
formParams
.
account
,
verify
:
this
.
formParams
.
verify
,
intl_code
:
this
.
formParams
.
intl_code
},
true
,
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
if
(
res
.
err_code
===
0
)
{
if
(
!
this
.
code_disabled
)
{
if
(
!
this
.
code_disabled
)
{
...
@@ -150,7 +171,7 @@ export default {
...
@@ -150,7 +171,7 @@ export default {
success
:
res
=>
{
success
:
res
=>
{
if
(
res
.
confirm
)
{
if
(
res
.
confirm
)
{
this
.
verify_flag
=
true
;
this
.
verify_flag
=
true
;
this
.
refresh
();
this
.
refresh
();
//刷新验证码
}
else
if
(
res
.
cancel
)
{
}
else
if
(
res
.
cancel
)
{
}
}
}
}
...
@@ -166,6 +187,23 @@ export default {
...
@@ -166,6 +187,23 @@ export default {
});
});
},
},
submit
()
{
submit
()
{
var
reg
=
/^1
(
3
[
0-9
]
|4
[
01456879
]
|5
[
0-35-9
]
|6
[
2567
]
|7
[
0-8
]
|8
[
0-9
]
|9
[
0-35-9
])\d{8}
$/
;
if
(
!
this
.
formParams
.
account
)
{
uni
.
showToast
({
title
:
'请输入手机号'
,
icon
:
'none'
});
return
false
;
}
if
(
!
reg
.
test
(
this
.
formParams
.
account
))
{
uni
.
showToast
({
title
:
'手机格式错误'
,
icon
:
'none'
});
return
false
;
}
this
.
request
(
Api_Url
+
'/login/action'
,
'POST'
,
this
.
formParams
,
true
,
true
).
then
(
res
=>
{
this
.
request
(
Api_Url
+
'/login/action'
,
'POST'
,
this
.
formParams
,
true
,
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
if
(
res
.
err_code
===
0
)
{
this
.
verify_flag
=
false
;
this
.
verify_flag
=
false
;
...
@@ -189,7 +227,7 @@ export default {
...
@@ -189,7 +227,7 @@ export default {
success
:
res
=>
{
success
:
res
=>
{
if
(
res
.
confirm
)
{
if
(
res
.
confirm
)
{
this
.
verify_flag
=
true
;
this
.
verify_flag
=
true
;
}
else
if
(
res
.
cancel
)
{
this
.
refresh
();
//刷新验证码
}
}
}
}
});
});
...
...
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