Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
fenzhan_zsb
Project
Project
Details
Activity
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
esf
fenzhan_zsb
Commits
bbad47d2
Commit
bbad47d2
authored
Mar 26, 2021
by
liuqiao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
弱密码
parent
9297de44
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
64 additions
and
64 deletions
+64
-64
login.php
new_admincp/applications/zsb/views/nj/login.php
+64
-64
No files found.
new_admincp/applications/zsb/views/nj/login.php
View file @
bbad47d2
...
...
@@ -389,70 +389,70 @@ var _hmt = _hmt || [];
$
(
'.qrcode_login'
).
hide
();
$
(
'.forms'
).
show
();
})
//
$.ajax({
//
url: '/login/qrCode',
//
type: 'get',
//
dataType: 'json',
//
sync: true,
//
success: function (response) {
//
console.log(response);
//
if (response.result === '0') {
//
layer.msg(response.msg);
//
}
//
$("#qrcode_img").attr('src',response.login_img);
//
var uuid = response.key;
//
var qrcodeLogin = setInterval(function (){
//
$.ajax({
//
url: '/login/qrCodeLogin',
//
type: 'post',
//
dataType: 'json',
//
data: {uuid:uuid},
//
sync: true,
//
success: function (response) {
//
console.log(response);
//
var msg = response.msg;
//
//
if (msg === 'expired') {
//
clearInterval(qrcodeLogin);
//
layer.msg('登录失败,请刷新二维码重新登录');
//
return;
//
}
//
//
if (msg === 'wait') {
//
return;
//
}
//
//
if (msg === 'success' || msg === 'has_login') {
//
clearInterval(qrcodeLogin);
//
layer.msg('登录成功',{
//
icon: 1,
//
time: 2000
//
},function (){
//
location.href = "/";
//
})
//
} else {
//
var errorMsg = '';
//
switch(msg) {
//
case 'u_p_error':
//
errorMsg = '账号不正确,请刷新二维码重新扫描';
//
break;
//
case 'vad_error':
//
case 'exp_error':
//
errorMsg = '该账号已到期,请联系网站工作人员!';
//
break;
//
default:
//
errorMsg = '登陆失败,请稍后再试!';
//
break;
//
}
//
clearInterval(qrcodeLogin);
//
layer.msg(errorMsg);
//
}
//
//
}
//
})
//
},1000 * 10)
//
}
//
})
$
.
ajax
({
url
:
'/login/qrCode'
,
type
:
'get'
,
dataType
:
'json'
,
sync
:
true
,
success
:
function
(
response
)
{
console
.
log
(
response
);
if
(
response
.
result
===
'0'
)
{
layer
.
msg
(
response
.
msg
);
}
$
(
"#qrcode_img"
).
attr
(
'src'
,
response
.
login_img
);
var
uuid
=
response
.
key
;
var
qrcodeLogin
=
setInterval
(
function
(){
$
.
ajax
({
url
:
'/login/qrCodeLogin'
,
type
:
'post'
,
dataType
:
'json'
,
data
:
{
uuid
:
uuid
},
sync
:
true
,
success
:
function
(
response
)
{
console
.
log
(
response
);
var
msg
=
response
.
msg
;
if
(
msg
===
'expired'
)
{
clearInterval
(
qrcodeLogin
);
layer
.
msg
(
'登录失败,请刷新二维码重新登录'
);
return
;
}
if
(
msg
===
'wait'
)
{
return
;
}
if
(
msg
===
'success'
||
msg
===
'has_login'
)
{
clearInterval
(
qrcodeLogin
);
layer
.
msg
(
'登录成功'
,{
icon
:
1
,
time
:
2000
},
function
(){
location
.
href
=
"/"
;
})
}
else
{
var
errorMsg
=
''
;
switch
(
msg
)
{
case
'u_p_error'
:
errorMsg
=
'账号不正确,请刷新二维码重新扫描'
;
break
;
case
'vad_error'
:
case
'exp_error'
:
errorMsg
=
'该账号已到期,请联系网站工作人员!'
;
break
;
default
:
errorMsg
=
'登陆失败,请稍后再试!'
;
break
;
}
clearInterval
(
qrcodeLogin
);
layer
.
msg
(
errorMsg
);
}
}
})
},
1000
*
10
)
}
})
})
</script>
...
...
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