Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yoho-blk
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
1
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
htoooth
9 years ago
Commit
9257c36e6a44d28a325d5c4cc0da870d08aa1989
1 parent
02758e2a
增加黑框代码
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
72 additions
and
36 deletions
apps/passport/models/back-service.js
public/js/passport/back/back.js
public/js/passport/back/reset.js
public/js/passport/back/verification.js
public/js/passport/bind/third-login.js
public/js/passport/bind/third-pwd.js
public/js/passport/reg/reg.js
public/scss/passport/_back.css
public/scss/passport/_config.css
public/scss/passport/_index.css
public/scss/passport/_login.css
public/scss/passport/_register.css
public/scss/passport/_third.css
apps/passport/models/back-service.js
View file @
9257c36
...
...
@@ -11,7 +11,7 @@ const moment = require('moment');
const
helpers
=
global
.
yoho
.
helpers
;
const
api
=
require
(
'./back-api'
);
const
User
Service
=
require
(
'./user-service'
);
const
Login
Service
=
require
(
'./user-service'
);
const
PassportHelper
=
require
(
'./passport-helper'
);
const
BackHelper
=
require
(
'./back-helper'
);
...
...
@@ -54,8 +54,8 @@ const findUserAsync = (type, phone, area) => {
};
const
findBy
=
{
email
:
UserService
.
findByEmailAsync
,
mobile
:
(
phone1
,
area1
)
=>
UserService
.
findByMobileAsync
(
area1
,
phone1
)
// 交换参数
email
:
LoginService
.
findByEmailAsync
,
mobile
:
(
phone1
,
area1
)
=>
LoginService
.
findByMobileAsync
(
area1
,
phone1
)
// 交换参数
};
const
OK
=
{
code
:
200
,
message
:
MESSAGE
.
ok
};
...
...
public/js/passport/back/back.js
View file @
9257c36
...
...
@@ -261,12 +261,18 @@ exports.init = function() {
$imgCaptchaInput
.
on
(
'blur'
,
function
()
{
validateImgCaptcha
();
$imgCaptchaInput
.
removeClass
(
'focus'
);
}).
on
(
'focus'
,
function
()
{
hideTip
(
$imgCaptchaInput
);
$imgCaptchaInput
.
addClass
(
'focus'
);
});
$phoneNumInput
.
on
(
'focus'
,
function
()
{
hideTip
(
$phoneNumInput
);
$
(
'.phone'
).
addClass
(
'focus'
);
}).
on
(
'blur'
,
function
()
{
$phoneNumInput
.
removeClass
(
'focus'
);
$
(
'.phone'
).
removeClass
(
'focus'
);
});
$nextBtn
.
on
(
'click'
,
function
()
{
...
...
public/js/passport/back/reset.js
View file @
9257c36
...
...
@@ -65,6 +65,10 @@ $passwordInput.on('keyup blur', function() {
}
ep
.
emit
(
'pwd'
,
true
);
}).
on
(
'focus'
,
function
()
{
$passwordInput
.
addClass
(
'focus'
);
}).
on
(
'blur'
,
function
()
{
$passwordInput
.
removeClass
(
'focus'
);
});
$repasswordInput
.
on
(
'keyup blur'
,
function
()
{
...
...
@@ -83,6 +87,10 @@ $repasswordInput.on('keyup blur', function() {
}
ep
.
emit
(
'repwd'
,
true
);
}).
on
(
'focus'
,
function
()
{
$repasswordInput
.
addClass
(
'focus'
);
}).
on
(
'blur'
,
function
()
{
$repasswordInput
.
removeClass
(
'focus'
);
});
// 监听 repwd 事件
...
...
public/js/passport/back/verification.js
View file @
9257c36
...
...
@@ -91,6 +91,9 @@ $smsCaptchaInput.on('blur', function() {
}
}).
on
(
'focus'
,
function
()
{
hideTip
(
$smsCaptchaInput
);
$smsCaptchaInput
.
addClass
(
'focus'
);
}).
on
(
'blur'
,
function
()
{
$smsCaptchaInput
.
removeClass
(
'focus'
);
});
function
init
()
{
...
...
public/js/passport/bind/third-login.js
View file @
9257c36
...
...
@@ -163,6 +163,7 @@ ep.tail('phoneNum', 'img-captcha', function(phoneAuth, imgAuth) {
$phoneNumInput
.
on
(
'blur'
,
function
()
{
var
length
=
$phoneNumInput
.
val
().
length
;
$
(
'#phone'
).
removeClass
(
'focus'
);
if
(
length
===
0
)
{
errTip
(
$phoneNumInput
,
'请输入手机号码'
);
ep
.
emit
(
'phoneNum'
,
false
);
...
...
@@ -191,11 +192,14 @@ $phoneNumInput.on('blur', function() {
}
}).
on
(
'focus'
,
function
()
{
hideTip
(
$phoneNumInput
);
$
(
'#phone'
).
addClass
(
'focus'
);
});
$imgCaptchaInput
.
on
(
'blur'
,
function
()
{
var
length
=
$imgCaptchaInput
.
val
().
length
;
$imgCaptchaInput
.
removeClass
(
'focus'
);
switch
(
length
)
{
case
4
:
break
;
...
...
@@ -221,6 +225,7 @@ $imgCaptchaInput.on('blur', function() {
});
}).
on
(
'focus'
,
function
()
{
hideTip
(
$imgCaptchaInput
);
$imgCaptchaInput
.
addClass
(
'focus'
);
});
$imgCaptchaCtrl
.
on
(
'click'
,
function
()
{
...
...
@@ -230,6 +235,8 @@ $imgCaptchaCtrl.on('click', function() {
$smsCaptchaInput
.
on
(
'blur'
,
function
()
{
var
length
=
$smsCaptchaInput
.
val
().
length
;
$smsCaptchaInput
.
removeClass
(
'focus'
);
switch
(
length
)
{
case
4
:
break
;
...
...
@@ -253,6 +260,7 @@ $smsCaptchaInput.on('blur', function() {
});
}).
on
(
'focus'
,
function
()
{
hideTip
(
$smsCaptchaInput
);
$smsCaptchaInput
.
addClass
(
'focus'
);
});
$smsCaptchaCtrl
.
on
(
'click'
,
function
()
{
...
...
public/js/passport/bind/third-pwd.js
View file @
9257c36
...
...
@@ -46,6 +46,8 @@ ep.tail('pwd', 'repwd', function(pwd, repwd) {
$passwordInput
.
on
(
'keyup blur'
,
function
()
{
var
length
=
$passwordInput
.
val
().
length
;
$passwordInput
.
removeClass
(
'focus'
);
if
(
length
===
0
)
{
errTip
(
$passwordInput
,
'请输入密码'
);
ep
.
emit
(
'pwd'
,
false
);
...
...
@@ -67,11 +69,14 @@ $passwordInput.on('keyup blur', function() {
ep
.
emit
(
'pwd'
,
true
);
}).
on
(
'focus'
,
function
()
{
hideTip
(
$passwordInput
);
$passwordInput
.
addClass
(
'focus'
);
});
$repasswordInput
.
on
(
'keyup blur'
,
function
()
{
var
length
=
$repasswordInput
.
val
().
length
;
$repasswordInput
.
removeClass
(
'focus'
);
if
(
length
===
0
)
{
errTip
(
$repasswordInput
,
'请再次输入密码'
);
ep
.
emit
(
'repwd'
,
false
);
...
...
@@ -87,6 +92,7 @@ $repasswordInput.on('keyup blur', function() {
ep
.
emit
(
'repwd'
,
true
);
}).
on
(
'focus'
,
function
()
{
hideTip
(
$repasswordInput
);
$repasswordInput
.
addClass
(
'focus'
);
});
// 下一步
...
...
public/js/passport/reg/reg.js
View file @
9257c36
...
...
@@ -452,15 +452,19 @@ exports.init = function() {
// 验证手机输入
$phoneNumInput
.
on
(
'keyup blur'
,
function
()
{
validatePhoneNum
();
$
(
'#phone'
).
removeClass
(
'focus'
);
}).
on
(
'focus'
,
function
()
{
hideTip
(
$phoneNumInput
);
$
(
'#phone'
).
addClass
(
'focus'
);
});
// 验证图形输入
$imgCaptchaInput
.
on
(
'keyup blur'
,
function
()
{
validateImgCaptcha
();
$imgCaptchaInput
.
removeClass
(
'focus'
);
}).
on
(
'focus'
,
function
()
{
hideTip
(
$imgCaptchaInput
);
$imgCaptchaInput
.
addClass
(
'focus'
);
});
// 图形验证通过时,发送短信按钮可点击
...
...
@@ -475,8 +479,10 @@ exports.init = function() {
// 验证短信输入
$smsCaptchaInput
.
on
(
'keyup blur'
,
function
()
{
validateSMSCaptcha
();
$smsCaptchaInput
.
removeClass
(
'focus'
);
}).
on
(
'focus'
,
function
()
{
hideTip
(
$smsCaptchaInput
);
$smsCaptchaInput
.
addClass
(
'focus'
);
});
// 验证密码输入
...
...
@@ -488,6 +494,9 @@ exports.init = function() {
});
}).
on
(
'focus'
,
function
()
{
hideTip
(
$passwordInput
);
$passwordInput
.
addClass
(
'focus'
);
}).
on
(
'blur'
,
function
()
{
$passwordInput
.
removeClass
(
'focus'
);
});
// 服务条款
...
...
public/scss/passport/_back.css
View file @
9257c36
...
...
@@ -13,23 +13,15 @@
}
.country-code
{
@mixin
country-code
;
@mixin
country-code;
}
.country-list
{
@mixin
region
;
@mixin
region;
}
.phone
{
@mixin
phone
;
&.focus-gain
{
border
:
2px
solid
#000
;
}
&
.focus-lost
{
border
:
1px
solid
#dbdbdb
;
}
@mixin
phone;
}
.input
{
...
...
@@ -40,21 +32,13 @@
display
:
block
;
float
:
left
;
border
:
none
!important
;
height
:
40px
!important
;
}
&
.captcha
{
width
:
$
captcha
;
float
:
left
;
&.focus-gain
{
border
:
2px
solid
#000
;
}
&
.focus-lost
{
border
:
1px
solid
#dbdbdb
;
}
}
}
.captcha-component
{
...
...
public/scss/passport/_config.css
View file @
9257c36
$
theme-color
:
#1d1d1d
;
$
item-height
:
4
0
px
;
$
item-height
:
4
4
px
;
$
item-width
:
340px
;
$
bord-color
:
#
dbdbdb
;
$
bord-color
:
#
eee
;
$
margin-left
:
15px
;
$
margin-top
:
110px
;
$
red
:
#e01
;
...
...
@@ -15,7 +15,7 @@ $input-button: 125px;
$
err-tips-width
:
348px
;
$
blue
:
#379ed6
;
$
inactive-color
:
#555
;
$
option-color
:
#f8f8f8
;
$
option-color
:
#f8f8f8
;
@define-mixin
li-setting
{
margin-bottom
:
20px
;
...
...
@@ -55,19 +55,21 @@ $option-color:#f8f8f8;
@define-mixin
phone
{
width
:
225px
;
height
:
$
item-height
;
margin-left
:
$
margin-left
;
border
:
1
px
solid
$
bord-color
;
border
:
2
px
solid
$
bord-color
;
display
:
inline-block
;
}
@define-mixin
input
{
height
:
$
item-height
;
width
:
100%
;
line-height
:
43px
;
line-height
:
@
height
;
font-size
:
16px
;
border
:
1
px
solid
$
bord-color
;
border
:
2
px
solid
$
bord-color
;
text-indent
:
10px
;
color
:
#9a9a9a
;
color
:
#000
;
font-weight
:
bold
;
padding
:
0
;
}
...
...
public/scss/passport/_index.css
View file @
9257c36
...
...
@@ -134,7 +134,7 @@
.country-select-header
{
height
:
$
item-height
;
width
:
100px
;
border
:
1
px
solid
#eee
;
border
:
2
px
solid
#eee
;
font-size
:
16px
;
float
:
left
;
cursor
:
pointer
;
...
...
public/scss/passport/_login.css
View file @
9257c36
...
...
@@ -40,6 +40,7 @@
display
:
block
;
float
:
left
;
border
:
none
!important
;
height
:
40px
!important
;
}
&
.captcha
{
...
...
public/scss/passport/_register.css
View file @
9257c36
...
...
@@ -20,6 +20,7 @@
&
.phone-num
{
width
:
160px
;
height
:
40px
!important
;
display
:
block
;
float
:
left
;
border
:
none
!important
;
...
...
public/scss/passport/_third.css
View file @
9257c36
...
...
@@ -6,6 +6,11 @@ $btn-height: 50px;
$
btn-width
:
180px
;
.bind-wrapper
{
.focus
{
border
:
2px
solid
#000
!important
;
}
.auth-page
,
.pwd-page
,
.relate-success-page
{
...
...
@@ -84,6 +89,7 @@ $btn-width: 180px;
.input
{
@mixin
input;
font-weight
:
bold
;
}
.bind-confirm-page
{
...
...
@@ -166,7 +172,7 @@ $mobile-phone: calc($item-width - $mobile-margin - $mobile-region - $mobile-code
}
.ctrl
{
border
:
1
px
solid
$
bord-color
;
border
:
2
px
solid
$
bord-color
;
width
:
$
mobile-mobile
;
margin-left
:
$
mobile-margin
;
height
:
$
item-height
;
...
...
@@ -176,12 +182,14 @@ $mobile-phone: calc($item-width - $mobile-margin - $mobile-region - $mobile-code
}
.phone-num
{
width
:
$
mobile-phone
;
height
:
calc
(
$
item-height
-
2px
);
width
:
calc
(
$
mobile-phone
-
4px
);
height
:
calc
(
$
item-height
-
4px
);
border
:
none
!important
;
line-height
:
calc
(
$
item-height
-
2
px
);
line-height
:
calc
(
$
item-height
-
4
px
);
font-size
:
16px
;
padding
:
0
;
color
:
#000
;
font-weight
:
bold
;
}
}
...
...
@@ -220,7 +228,7 @@ $mobile-phone: calc($item-width - $mobile-margin - $mobile-region - $mobile-code
.country-select-header
{
height
:
$
item-height
;
width
:
100px
;
border
:
1
px
solid
#eee
;
border
:
2
px
solid
#eee
;
font-size
:
16px
;
float
:
left
;
cursor
:
pointer
;
...
...
Please
register
or
login
to post a comment