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 || [];
...
@@ -389,70 +389,70 @@ var _hmt = _hmt || [];
$
(
'.qrcode_login'
).
hide
();
$
(
'.qrcode_login'
).
hide
();
$
(
'.forms'
).
show
();
$
(
'.forms'
).
show
();
})
})
//
$.ajax({
$
.
ajax
({
//
url: '/login/qrCode',
url
:
'/login/qrCode'
,
//
type: 'get',
type
:
'get'
,
//
dataType: 'json',
dataType
:
'json'
,
//
sync: true,
sync
:
true
,
//
success: function (response) {
success
:
function
(
response
)
{
//
console.log(response);
console
.
log
(
response
);
//
if (response.result === '0') {
if
(
response
.
result
===
'0'
)
{
//
layer.msg(response.msg);
layer
.
msg
(
response
.
msg
);
//
}
}
//
$("#qrcode_img").attr('src',response.login_img);
$
(
"#qrcode_img"
).
attr
(
'src'
,
response
.
login_img
);
//
var uuid = response.key;
var
uuid
=
response
.
key
;
//
var qrcodeLogin = setInterval(function (){
var
qrcodeLogin
=
setInterval
(
function
(){
//
$.ajax({
$
.
ajax
({
//
url: '/login/qrCodeLogin',
url
:
'/login/qrCodeLogin'
,
//
type: 'post',
type
:
'post'
,
//
dataType: 'json',
dataType
:
'json'
,
//
data: {uuid:uuid},
data
:
{
uuid
:
uuid
},
//
sync: true,
sync
:
true
,
//
success: function (response) {
success
:
function
(
response
)
{
//
console.log(response);
console
.
log
(
response
);
//
var msg = response.msg;
var
msg
=
response
.
msg
;
//
//
if (msg === 'expired') {
if
(
msg
===
'expired'
)
{
//
clearInterval(qrcodeLogin);
clearInterval
(
qrcodeLogin
);
//
layer.msg('登录失败,请刷新二维码重新登录');
layer
.
msg
(
'登录失败,请刷新二维码重新登录'
);
//
return;
return
;
//
}
}
//
//
if (msg === 'wait') {
if
(
msg
===
'wait'
)
{
//
return;
return
;
//
}
}
//
//
if (msg === 'success' || msg === 'has_login') {
if
(
msg
===
'success'
||
msg
===
'has_login'
)
{
//
clearInterval(qrcodeLogin);
clearInterval
(
qrcodeLogin
);
//
layer.msg('登录成功',{
layer
.
msg
(
'登录成功'
,{
//
icon: 1,
icon
:
1
,
//
time: 2000
time
:
2000
//
},function (){
},
function
(){
//
location.href = "/";
location
.
href
=
"/"
;
//
})
})
//
} else {
}
else
{
//
var errorMsg = '';
var
errorMsg
=
''
;
//
switch(msg) {
switch
(
msg
)
{
//
case 'u_p_error':
case
'u_p_error'
:
//
errorMsg = '账号不正确,请刷新二维码重新扫描';
errorMsg
=
'账号不正确,请刷新二维码重新扫描'
;
//
break;
break
;
//
case 'vad_error':
case
'vad_error'
:
//
case 'exp_error':
case
'exp_error'
:
//
errorMsg = '该账号已到期,请联系网站工作人员!';
errorMsg
=
'该账号已到期,请联系网站工作人员!'
;
//
break;
break
;
//
default:
default
:
//
errorMsg = '登陆失败,请稍后再试!';
errorMsg
=
'登陆失败,请稍后再试!'
;
//
break;
break
;
//
}
}
//
clearInterval(qrcodeLogin);
clearInterval
(
qrcodeLogin
);
//
layer.msg(errorMsg);
layer
.
msg
(
errorMsg
);
//
}
}
//
//
}
}
//
})
})
//
},1000 * 10)
},
1000
*
10
)
//
}
}
//
})
})
})
})
</script>
</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