Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuy-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
1
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
htoooth
8 years ago
Commit
decf90a07eb321d2383280da48ca7e4c2acb69e4
1 parent
71c2ab7d
fix login
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
21 deletions
apps/passport/controllers/reg.js
apps/passport/models/reg-api.js
public/js/simple-header.js
apps/passport/controllers/reg.js
View file @
decf90a
...
...
@@ -266,7 +266,7 @@ let mobileRegister = (req, res, next) => {
}
/* 手机注册: 调用注册接口*/
let
regResult
=
yield
regService
.
regMobileAes
(
area
,
mobile
,
password
,
cookie
.
getShoppingKey
(
req
));
let
regResult
=
yield
regService
.
regMobileAes
(
area
,
mobile
,
password
,
co
de
,
co
okie
.
getShoppingKey
(
req
));
if
(
!
regResult
.
code
||
regResult
.
code
!==
200
)
{
data
.
message
=
'注册失败'
;
...
...
apps/passport/models/reg-api.js
View file @
decf90a
...
...
@@ -30,27 +30,13 @@ let validMobileCode = (area, mobile, code) => {
return
api
.
post
(
''
,
params
);
};
let
regMobile
=
(
area
,
mobile
,
password
,
shoppingKey
)
=>
{
let
params
=
{
method
:
'app.passport.register'
,
area
:
area
,
profile
:
mobile
,
password
:
password
};
if
(
shoppingKey
)
{
params
.
shopping_key
=
shoppingKey
;
}
return
api
.
post
(
''
,
params
);
};
let
regMobileAes
=
(
area
,
mobile
,
password
,
shoppingKey
)
=>
{
let
regMobileAes
=
(
area
,
mobile
,
password
,
code
,
shoppingKey
)
=>
{
let
params
=
{
method
:
'app.passport.registerAES'
,
area
:
area
,
profile
:
mobile
,
password
:
aes
.
aesPwd
(
password
)
password
:
aes
.
aesPwd
(
password
),
verifyCode
:
code
};
if
(
shoppingKey
)
{
...
...
@@ -63,6 +49,5 @@ let regMobileAes = (area, mobile, password, shoppingKey)=> {
module
.
exports
=
{
sendCodeToMobile
,
validMobileCode
,
regMobile
,
regMobileAes
};
...
...
public/js/simple-header.js
View file @
decf90a
...
...
@@ -76,8 +76,8 @@ function setLoginStatus(data) {
'<a href="//www.yohobuy.com/logout.html">[退出]</a>'
;
}
else
{
loginHtml
=
'<span>Hi~</span> '
+
'<a href="//www.yohobuy.com/signin.html?refer="'
+
window
.
location
.
href
+
'>[请登录]</a> '
+
'<a href="//www.yohobuy.com/reg.html"'
+
window
.
location
.
href
+
'>[免费注册]</a>'
;
'<a href="//www.yohobuy.com/signin.html">[请登录]</a> '
+
'<a href="//www.yohobuy.com/reg.html">[免费注册]</a>'
;
}
$
(
'.header-tool li'
).
eq
(
0
).
html
(
loginHtml
);
}
...
...
Please
register
or
login
to post a comment