Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuy-portal-fe2
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
mali
7 years ago
Commit
350394cd6b2c5b9ecb755148b19ff73eb8bdc459
1 parent
7e34f05b
账号安全登录
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletions
code/apps/common/interfaces/login.js
code/static/js.jquery/module/common/Login.js
code/apps/common/interfaces/login.js
View file @
350394c
...
...
@@ -73,14 +73,29 @@ module.exports = {
}
},
login
:
function
(
req
,
callback
,
common
)
{
console
.
log
(
"enter login method ........................................"
);
var
userInfo
=
{},
result
=
{
code
:
400
,
message
:
"登录失败"
},
isSuccess
=
false
;
var
user
=
req
.
body
.
user
||
req
.
query
.
user
;
var
password
=
req
.
body
.
password
||
req
.
query
.
password
;
var
errcallback
=
function
(
err
)
{
console
.
log
(
"enter login method ........................................&&&&&&&&&&&&&&&&&&&&&&&"
+
err
);
return
callback
(
null
,
result
);
}
console
.
log
(
"enter login method ........................................************"
);
common
.
Ilogin
(
user
,
password
).
allRight
().
sessionAsync
(
user
,
password
).
done
(
function
(
IloginRes
,
allRes
,
sesRes
)
{
var
userData
=
IloginRes
.
data
,
cookie
=
sesRes
.
caseless
.
dict
[
"set-cookie"
];
console
.
log
(
"enter userData is ........................................"
+
userData
);
userInfo
=
{
auth
:
userData
,
uid
:
userData
.
pid
,
name
:
userData
.
truename
,
role
:
userData
.
roleName
,
right
:
{},
shopList
:[],
brands
:[]};
if
(
userData
.
data_authority
&&
userData
.
data_authority
.
brand
&&
userData
.
data_authority
.
brand
.
list
){
userInfo
.
brands
=
userData
.
data_authority
.
brand
.
is_all
?
"0"
:
Object
.
keys
(
userData
.
data_authority
.
brand
.
list
);
...
...
code/static/js.jquery/module/common/Login.js
View file @
350394c
...
...
@@ -8,6 +8,7 @@ if(href) {
alert
(
"用户名或者密码错误,请确认!"
);
}
window
.
location
.
href
=
"/login"
;
//window.location.href = "/login";
window
.
location
.
href
=
"/account/profile/changepassword"
;
}
}
\ No newline at end of file
...
...
Please
register
or
login
to post a comment