Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHO-ACTIVITY-PHP
·
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
Plain Diff
Browse Files
Authored by
Rock Zhang
9 years ago
Commit
2c1c6b69b62fc81834a7008a4ee4aff69a021f01
2 parents
c57a47d1
93c78936
Merge branch 'develop' of git.dev.yoho.cn:web/yohobuy into develop
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
127 additions
and
101 deletions
static/js/passport/back/email-success.js
static/js/passport/back/email.js
static/js/passport/back/mobile.js
static/js/passport/back/new-password.js
static/js/passport/code.js
static/js/passport/login/interational.js
static/js/passport/login/login.js
static/js/passport/register/password.js
static/js/passport/register/register.js
template/m.yohobuy.com/partials/layout/use.phtml
static/js/passport/back/email-success.js
View file @
2c1c6b6
...
...
@@ -16,12 +16,13 @@ $resend.on('touchstart', function(e) {
$
.
ajax
({
url
:
$resend
.
data
(
'url'
),
type
:
'GET'
}).
then
(
function
(
data
)
{
if
(
data
.
code
===
200
)
{
showErrTip
(
data
.
message
);
}
else
{
showErrTip
(
data
.
message
);
type
:
'GET'
,
success
:
function
(
data
)
{
if
(
data
.
code
===
200
)
{
showErrTip
(
data
.
message
);
}
else
{
showErrTip
(
data
.
message
);
}
}
});
});
\ No newline at end of file
...
...
static/js/passport/back/email.js
View file @
2c1c6b6
...
...
@@ -37,12 +37,13 @@ $btnSure.on('touchstart', function() {
type
:
'POST'
,
data
:
{
email
:
email
}
}).
then
(
function
(
data
)
{
if
(
data
.
code
===
200
)
{
location
.
href
=
data
.
data
;
}
else
{
showErrTip
(
data
.
message
);
},
success
:
function
(
data
)
{
if
(
data
.
code
===
200
)
{
location
.
href
=
data
.
data
;
}
else
{
showErrTip
(
data
.
message
);
}
}
});
}
else
{
...
...
static/js/passport/back/mobile.js
View file @
2c1c6b6
...
...
@@ -45,12 +45,13 @@ $btnNext.on('touchstart', function() {
data
:
{
area
:
country
.
split
(
'+'
)[
1
],
mobile
:
pn
}
}).
then
(
function
(
data
)
{
if
(
data
.
code
===
200
)
{
location
.
href
=
'/passport/back/code'
;
}
else
{
showErrTip
(
data
.
message
);
},
success
:
function
(
data
)
{
if
(
data
.
code
===
200
)
{
location
.
href
=
'/passport/back/code'
;
}
else
{
showErrTip
(
data
.
message
);
}
}
});
}
else
{
...
...
static/js/passport/back/new-password.js
View file @
2c1c6b6
...
...
@@ -37,17 +37,18 @@ $btnOk.on('touchstart', function() {
url
:
'/passport/back/update'
,
data
:
{
password
:
pwd
}
}).
then
(
function
(
data
)
{
if
(
data
.
code
===
200
)
{
showErrTip
(
'密码修改成功'
);
//1000ms后跳转页面
setTimeout
(
function
()
{
location
.
href
=
'/'
;
},
1000
);
}
else
{
showErrTip
(
data
.
message
);
},
success
:
function
(
data
)
{
if
(
data
.
code
===
200
)
{
showErrTip
(
'密码修改成功'
);
//1000ms后跳转页面
setTimeout
(
function
()
{
location
.
href
=
'/'
;
},
1000
);
}
else
{
showErrTip
(
data
.
message
);
}
}
});
}
else
{
...
...
static/js/passport/code.js
View file @
2c1c6b6
...
...
@@ -50,15 +50,16 @@ module.exports = function(useInRegister) {
$
.
ajax
({
type
:
'POST'
,
url
:
'/passport/'
+
urlMid
+
'/sendPhone'
}).
then
(
function
(
data
)
{
if
(
data
.
code
===
200
)
{
$captchaTip
.
text
(
'重发验证码 (60秒)'
).
addClass
(
'disable'
);
countDown
();
}
else
{
url
:
'/passport/'
+
urlMid
+
'/sendPhone'
,
success
:
function
(
data
)
{
if
(
data
.
code
===
200
)
{
$captchaTip
.
text
(
'重发验证码 (60秒)'
).
addClass
(
'disable'
);
countDown
();
}
else
{
//验证码不正确,显示提示
showErrTip
(
data
.
message
);
//验证码不正确,显示提示
showErrTip
(
data
.
message
);
}
}
});
});
...
...
@@ -73,14 +74,15 @@ module.exports = function(useInRegister) {
url
:
'/passport/'
+
urlMid
+
'/verifycode'
,
data
:
{
verifyCode
:
trim
(
$captcha
.
val
())
}
}).
then
(
function
(
data
)
{
if
(
data
.
code
===
200
)
{
location
.
href
=
data
.
data
;
}
else
{
},
success
:
function
(
data
)
{
if
(
data
.
code
===
200
)
{
location
.
href
=
data
.
data
;
}
else
{
//验证码不正确,显示提示
showErrTip
(
data
.
message
);
//验证码不正确,显示提示
showErrTip
(
data
.
message
);
}
}
});
});
...
...
static/js/passport/login/interational.js
View file @
2c1c6b6
...
...
@@ -81,20 +81,22 @@ $loginBtn.on('touchstart', function() {
area
:
country
.
split
(
'+'
)[
1
],
account
:
pn
,
pwd
:
pwd
},
success
:
function
(
data
)
{
if
(
data
.
code
===
200
)
{
showErrTip
(
'登录成功'
);
//1000ms后跳转页面
setTimeout
(
function
()
{
location
.
href
=
data
.
data
;
},
1000
);
}
else
{
showErrTip
(
data
.
message
);
}
},
error
:
function
()
{
showErrTip
(
'网络断开连接啦~'
);
}
}).
then
(
function
(
data
)
{
if
(
data
.
code
===
200
)
{
showErrTip
(
'登录成功'
);
//1000ms后跳转页面
setTimeout
(
function
()
{
location
.
href
=
data
.
data
;
},
1000
);
}
else
{
showErrTip
(
data
.
message
);
}
},
function
()
{
showErrTip
(
'网络断开连接啦~'
);
});
}
else
{
showErrTip
(
'账号或密码有错误,请重新输入'
);
...
...
static/js/passport/login/login.js
View file @
2c1c6b6
...
...
@@ -84,20 +84,22 @@ $loginBtn.on('touchstart', function() {
data
:
{
account
:
acc
,
pwd
:
pwd
},
success
:
function
(
data
)
{
if
(
data
.
code
===
200
)
{
showErrTip
(
'登录成功'
);
//1s后跳转页面
setTimeout
(
function
()
{
location
.
href
=
data
.
data
;
},
1000
);
}
else
{
showErrTip
(
data
.
message
);
}
},
error
:
function
()
{
showErrTip
(
'网络断开连接啦~'
);
}
}).
then
(
function
(
data
)
{
if
(
data
.
code
===
200
)
{
showErrTip
(
'登录成功'
);
//1s后跳转页面
setTimeout
(
function
()
{
location
.
href
=
data
.
data
;
},
1000
);
}
else
{
showErrTip
(
data
.
message
);
}
},
function
()
{
showErrTip
(
'网络断开连接啦~'
);
});
}
else
{
showErrTip
(
'账号或密码有错误,请重新输入'
);
...
...
static/js/passport/register/password.js
View file @
2c1c6b6
...
...
@@ -39,23 +39,24 @@ $btnSure.on('touchstart', function() {
url
:
'/passport/register/regmobile'
,
data
:
{
password
:
pwd
}
}).
then
(
function
(
data
)
{
if
(
data
.
code
===
200
)
{
showErrTip
(
'注册成功'
);
//1000ms后跳转页面
setTimeout
(
function
()
{
location
.
href
=
data
.
data
;
},
1000
);
}
else
{
if
(
data
.
code
===
401
||
data
.
code
===
404
||
data
.
code
===
505
)
{
showErrTip
(
data
.
message
);
}
else
{
showErrTip
(
data
.
message
);
},
success
:
function
(
data
)
{
if
(
data
.
code
===
200
)
{
showErrTip
(
'注册成功'
);
//1000ms后跳转页面
setTimeout
(
function
()
{
location
.
href
=
data
.
data
;
},
1000
);
}
else
{
if
(
data
.
code
===
401
||
data
.
code
===
404
||
data
.
code
===
505
)
{
showErrTip
(
data
.
message
);
}
else
{
showErrTip
(
data
.
message
);
setTimeout
(
function
()
{
location
.
href
=
data
.
data
;
},
1000
);
}
}
}
});
...
...
static/js/passport/register/register.js
View file @
2c1c6b6
...
...
@@ -45,12 +45,13 @@ $btnNext.on('touchstart', function() {
data
:
{
area
:
country
.
split
(
'+'
)[
1
],
profile
:
pn
}
}).
then
(
function
(
data
)
{
if
(
data
.
code
===
200
)
{
location
.
href
=
'/passport/register/code'
;
}
else
{
showErrTip
(
data
.
message
);
},
success
:
function
(
data
)
{
if
(
data
.
code
===
200
)
{
location
.
href
=
'/passport/register/code'
;
}
else
{
showErrTip
(
data
.
message
);
}
}
});
}
else
{
...
...
template/m.yohobuy.com/partials/layout/use.phtml
View file @
2c1c6b6
...
...
@@ -4,50 +4,64 @@
<script>
seajs.use('js/guang/plus-star/list');
</script>
{
{else
if
psDetail
}
}
{
{/if
}
}
{
{#if
psDetail
}
}
<script>
seajs.use('js/guang/plus-star/detail');
</script>
{
{/if
}
}
{
{!--
注册
--
}
}
{
{
else
if
regIndex
}
}
{
{
#
if
regIndex
}
}
<script>
seajs.use('js/passport/register/register');
</script>
{
{else
if
regCode
}
}
{
{/if
}
}
{
{#if
regCode
}
}
<script>
seajs.use('js/passport/register/code');
</script>
{
{else
if
regPwd
}
}
{
{/if
}
}
{
{#if
regPwd
}
}
<script>
seajs.use('js/passport/register/password');
</script>
{
{/if
}
}
{
{!--
登陆
--
}
}
{
{
else
if
loginIndex
}
}
{
{
#
if
loginIndex
}
}
<script>
seajs.use('js/passport/login/login');
</script>
{
{else
if
loginInterational
}
}
{
{/if
}
}
{
{#if
loginInterational
}
}
<script>
seajs.use('js/passport/login/interational');
</script>
{
{/if
}
}
{
{!--
密码找回
--
}
}
{
{
else
if
backEmail
}
}
{
{
#
if
backEmail
}
}
<script>
seajs.use('js/passport/back/email');
</script>
{
{else
if
backEmailSuccess
}
}
{
{/if
}
}
{
{#if
backEmailSuccess
}
}
<script>
seajs.use('js/passport/back/email-success');
</script>
{
{else
if
backMobile
}
}
{
{/if
}
}
{
{#if
backMobile
}
}
<script>
seajs.use('js/passport/back/mobile');
</script>
{
{else
if
backCode
}
}
{
{/if
}
}
{
{#if
backCode
}
}
<script>
seajs.use('js/passport/back/code');
</script>
{
{else
if
backNewPwd
}
}
{
{/if
}
}
{
{#if
backNewPwd
}
}
<script>
seajs.use('js/passport/back/new-password');
</script>
...
...
Please
register
or
login
to post a comment