Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuywap-node
·
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
郭成尧
8 years ago
Commit
92c398d956c480580a80045a4a2ae483f92a0d98
1 parent
5b31864d
clear-input
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
49 additions
and
8 deletions
apps/passport/controllers/captcha.js
apps/passport/views/action/login/international-new.hbs
apps/passport/views/action/login/login-new.hbs
apps/passport/views/action/reg/reg-new.hbs
apps/passport/views/action/sms/sms-login-new.hbs
public/js/passport/login/international-new.js
public/js/passport/login/login-new.js
public/js/passport/register/register-new.js
public/js/passport/smslogin/sms-login-new.js
public/js/plugin/validata.js
public/scss/passport/login-new.page.css
apps/passport/controllers/captcha.js
View file @
92c398d
...
...
@@ -70,7 +70,7 @@ exports.validate = (req, res, next) => {
let
jsonData
=
{
code
:
400
,
message
:
'请将
图片旋转到正确方向
'
,
message
:
'请将
所有图片点击翻转至正向朝上
'
,
captchaShow
:
true
};
...
...
apps/passport/views/action/login/international-new.hbs
View file @
92c398d
...
...
@@ -12,8 +12,8 @@
{{/
countrys
}}
</select>
<i
class=
"iconfont arrow-icon"
>

</i>
<i
class=
"line"
>
|
</i><input
type=
"text"
name=
"mobile"
placeholder=
"请输入手机号/邮箱"
class=
"mobile-input"
><i
id=
"clearMobile"
class=
"iconfont clear"
>

</i>
<i
class=
"line"
>
|
</i><input
type=
"text"
name=
"mobile"
placeholder=
"请输入手机号"
class=
"mobile-input"
><i
id=
"clearMobile"
class=
"iconfont clear hide"
>

</i>
</div>
<div
class=
"form-group password"
>
<label
for=
"password"
class=
"iconfont"
>

</label><input
type=
"password"
name=
"password"
placeholder=
"请输入密码"
>
...
...
apps/passport/views/action/login/login-new.hbs
View file @
92c398d
...
...
@@ -12,14 +12,14 @@
<div
class=
"login-form"
>
<div
class=
"form-group username"
>
<label
for=
"username"
class=
"iconfont"
>

</label><input
type=
"text"
name=
"username"
placeholder=
"请输入手机号/邮箱"
>
<i
id=
"clearUsrname"
class=
"iconfont clear"
>

</i>
<i
id=
"clearUsrname"
class=
"iconfont clear
hide
"
>

</i>
</div>
<div
class=
"form-group password"
>
<label
for=
"password"
class=
"iconfont"
>

</label><input
type=
"password"
name=
"password"
placeholder=
"请输入密码"
>
<span
id=
"passwordEyeIcon"
class=
"eye"
><i
class=
"iconfont eye-close"
>

</i><i
class=
"iconfont eye-open hide"
>

</i></span>
</div>
<div
data-userverify=
"
{{
captchaShow
}}
"
data-geetest=
"
{{
useGeetest
}}
"
id=
"js-img-check"
{{#
unless
useGeetest
}}
class=
"full-img-verify"
{{/
unless
}}
></div>
<button
id=
"loginBtn"
class=
"login-btn"
>
登录
</button>
<button
id=
"loginBtn"
class=
"login-btn
disable
"
>
登录
</button>
<div
class=
"other-info"
>
<a
href=
"
{{
internationalUrl
}}
"
>
海外账号
</a>
<a
href=
"
{{
smsLoginUrl
}}
"
>
手机验证码
</a>
...
...
apps/passport/views/action/reg/reg-new.hbs
View file @
92c398d
...
...
@@ -13,7 +13,7 @@
</select>
<i
class=
"iconfont arrow-icon"
>

</i>
<i
class=
"line"
>
|
</i><input
type=
"text"
name=
"mobile"
placeholder=
"请输入手机号"
class=
"mobile-input"
autocomplete=
"off"
><i
id=
"clearMobile"
class=
"iconfont clear"
>

</i>
class=
"iconfont clear
hide
"
>

</i>
</div>
<div
class=
"form-group verify-code"
>
<label
for=
"verifyCode"
class=
"iconfont"
>

</label><input
type=
"text"
name=
"verifyCode"
placeholder=
"请输入验证码"
...
...
apps/passport/views/action/sms/sms-login-new.hbs
View file @
92c398d
...
...
@@ -19,7 +19,7 @@
</select>
<i
class=
"iconfont arrow-icon"
>

</i>
<i
class=
"line"
>
|
</i><input
type=
"text"
name=
"mobile"
placeholder=
"请输入手机号/邮箱"
class=
"mobile-input"
><i
id=
"clearMobile"
class=
"iconfont clear"
>

</i>
class=
"iconfont clear
hide
"
>

</i>
</div>
<div
class=
"form-group verify-code"
>
<label
for=
"verifyCode"
class=
"iconfont"
>

</label><input
type=
"text"
name=
"verifyCode"
placeholder=
"请输入验证码"
...
...
public/js/passport/login/international-new.js
View file @
92c398d
...
...
@@ -51,6 +51,13 @@ class InternationalNew extends Page {
* 改变登录按钮的状态
*/
changeLoginBtnStatus
()
{
// 清除手机号按钮
if
(
this
.
selector
.
mobileInput
.
val
())
{
this
.
selector
.
clearMobile
.
removeClass
(
'hide'
);
}
else
{
this
.
selector
.
clearMobile
.
addClass
(
'hide'
);
}
// 登录按钮
if
(
this
.
selector
.
mobileInput
.
val
()
&&
this
.
selector
.
passwordInput
.
val
())
{
this
.
selector
.
internationalLoginBtn
.
addClass
(
'active'
);
...
...
@@ -155,6 +162,7 @@ class InternationalNew extends Page {
*/
clearMobile
()
{
this
.
selector
.
mobileInput
.
val
(
''
);
this
.
selector
.
clearMobile
.
addClass
(
'hide'
);
}
}
...
...
public/js/passport/login/login-new.js
View file @
92c398d
...
...
@@ -34,6 +34,8 @@ class Login {
this
.
view
.
getPswrdBtn
.
on
(
'click'
,
this
.
showGetPasswordBox
.
bind
(
this
));
this
.
view
.
getPasswordBox
.
on
(
'click'
,
this
.
hiddenGetPasswordBox
.
bind
(
this
));
this
.
view
.
showYohoFamilyTip
.
on
(
'click'
,
this
.
showYohoFamilyTip
.
bind
(
this
));
this
.
view
.
usernameInput
.
bind
(
'input'
,
this
.
changeBtnStatus
.
bind
(
this
));
this
.
view
.
passwordInput
.
bind
(
'input'
,
this
.
changeBtnStatus
.
bind
(
this
));
if
(
$captcha
.
data
(
'userverify'
))
{
validate
.
init
();
...
...
@@ -41,6 +43,25 @@ class Login {
}
/**
* 输入监听,改变按钮状态
*/
changeBtnStatus
()
{
// 清除按钮
if
(
this
.
view
.
usernameInput
.
val
())
{
this
.
view
.
clearUsrname
.
removeClass
(
'hide'
);
}
else
{
this
.
view
.
clearUsrname
.
addClass
(
'hide'
);
}
// 登录按钮
if
(
this
.
view
.
usernameInput
.
val
()
&&
this
.
view
.
passwordInput
.
val
())
{
this
.
view
.
loginBtn
.
removeClass
(
'disable'
);
}
else
{
this
.
view
.
loginBtn
.
addClass
(
'disable'
);
}
}
/**
* 展示弹窗
*/
showYohoFamilyTip
()
{
...
...
@@ -156,6 +177,7 @@ class Login {
*/
clearUsrname
()
{
this
.
view
.
usernameInput
.
val
(
''
);
this
.
view
.
clearUsrname
.
addClass
(
'hide'
);
}
/**
...
...
public/js/passport/register/register-new.js
View file @
92c398d
...
...
@@ -47,6 +47,7 @@ class RegisterNew {
*/
clearMobile
()
{
this
.
view
.
mobileInput
.
val
(
''
);
this
.
view
.
clearMobile
.
addClass
(
'hide'
);
}
/**
...
...
@@ -95,8 +96,10 @@ class RegisterNew {
// 获取验证码按钮
if
(
this
.
view
.
mobileInput
.
val
())
{
this
.
view
.
getVerifyCodeBtn
.
addClass
(
'active'
);
this
.
view
.
clearMobile
.
removeClass
(
'hide'
);
}
else
{
this
.
view
.
getVerifyCodeBtn
.
removeClass
(
'active'
);
this
.
view
.
clearMobile
.
addClass
(
'hide'
);
}
// 登录按钮
...
...
public/js/passport/smslogin/sms-login-new.js
View file @
92c398d
...
...
@@ -95,8 +95,10 @@ class SmsLoginNew extends Page {
// 获取验证码按钮
if
(
this
.
selector
.
mobileInput
.
val
())
{
this
.
selector
.
getVerifyCodeBtn
.
addClass
(
'active'
);
this
.
selector
.
clearMobile
.
removeClass
(
'hide'
);
}
else
{
this
.
selector
.
getVerifyCodeBtn
.
removeClass
(
'active'
);
this
.
selector
.
clearMobile
.
addClass
(
'hide'
);
}
// 登录按钮
...
...
@@ -181,6 +183,7 @@ class SmsLoginNew extends Page {
*/
clearMobile
()
{
this
.
selector
.
mobileInput
.
val
(
''
);
this
.
selector
.
clearMobile
.
addClass
(
'hide'
);
}
/**
...
...
public/js/plugin/validata.js
View file @
92c398d
...
...
@@ -92,7 +92,7 @@ class Validate {
let
captcha
=
this
.
imgCheck
.
getResults
();
if
(
captcha
===
'0000'
)
{
tip
.
show
(
'
请将图片旋转到正确方向
'
);
tip
.
show
(
'
请将所有图片点击旋转至正向朝上
'
);
return
Promise
.
reject
();
}
return
Promise
.
resolve
({
captcha
});
...
...
public/scss/passport/login-new.page.css
View file @
92c398d
...
...
@@ -19,6 +19,7 @@
}
$
top-bar-font-color
:
#fff
;
$
disable-gray
:
#b0b0b0
;
.login-new-page
{
input
:
-webkit-autofill
{
...
...
@@ -180,6 +181,10 @@ $top-bar-font-color: #fff;
font-size
:
32px
;
color
:
#fff
;
}
.disable
{
background-color
:
$
disable-gray
;
}
}
.third-party-login
{
...
...
Please
register
or
login
to post a comment