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
9bacd16e89b50c66405b5de0359380ccd79d0a46
1 parent
639c6fd2
change css
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
148 additions
and
139 deletions
apps/passport/auth.js
apps/passport/controllers/login.js
apps/passport/views/action/back/index.hbs
apps/passport/views/action/back/reset-pwd.hbs
apps/passport/views/action/back/verification.hbs
apps/passport/views/action/bind/bind-set-pwd.hbs
apps/passport/views/action/bind/index.hbs
apps/passport/views/action/login/index.hbs
apps/passport/views/partial/err-tip.hbs
apps/passport/views/partial/reg/register.hbs
apps/passport/views/partial/select-header.hbs
apps/passport/views/partial/select-list.hbs
apps/passport/views/partial/select.hbs
config/common.js
public/js/passport/login/index.js
public/scss/passport/_index.css
apps/passport/auth.js
View file @
9bacd16
...
...
@@ -165,20 +165,3 @@ passport.use('alipay', new AlipayStrategy({
done
(
null
,
profile
);
}));
// douban 登录
passport
.
use
(
'douban'
,
new
DoubanStrategy
({
clientID
:
'03b4e36bf13dc75a0b1eaa43d3b9560e'
,
clientSecret
:
'f16d5913e8610672'
,
callbackURL
:
`
$
{
siteUrl
}
/passport/
autosign
/
doubanback
`
},
(
accessToken
,
refreshToken
,
profile
,
done
)
=>
{
done
(
null
,
profile
);
}));
// renren 登录
passport
.
use
(
'renren'
,
new
RenrenStrategy
({
clientID
:
'783130c654c94a77ace97054ae266019'
,
clientSecret
:
'05e430de8c1e40d3a1f39ca8d3f8252c'
,
callbackURL
:
`
$
{
siteUrl
}
/passport/
login
/
renren
/
callback
`
},
(
accessToken
,
refreshToken
,
profile
,
done
)
=>
{
done
(
null
,
profile
);
}));
...
...
apps/passport/controllers/login.js
View file @
9bacd16
...
...
@@ -116,8 +116,8 @@ const local = {
defaultHeader
:
false
,
passport
:
{
countryCode
:
bindArea
,
countryName
:
areaName
,
countryList
:
areaArr
,
countryName
:
{
text
:
areaName
},
country
:
{
list
:
areaArr
},
forgetPwd
:
helpers
.
urlFormat
(
'/passport/back/index'
),
fastReg
:
helpers
.
urlFormat
(
'/passport/reg'
),
weixinLogin
:
helpers
.
urlFormat
(
'/passport/autosign/wechat'
),
...
...
apps/passport/views/action/back/index.hbs
View file @
9bacd16
...
...
@@ -53,10 +53,7 @@
<input
value=
""
id=
"phoneNum"
class=
"input va phone-num"
type=
"text"
name=
"phoneNum"
placeholder=
"Phone Number"
autocomplete=
"off"
>
<div
class=
"tips hide"
>
<div
class=
"triangle"
></div>
<div
class=
"rectangle"
></div>
</div>
{{>
err-tip
}}
</div>
</li>
...
...
@@ -68,10 +65,7 @@
placeholder=
"图形验证码"
autocomplete=
"off"
maxlength=
"4"
>
<div
class=
"tips hide"
>
<div
class=
"triangle"
></div>
<div
class=
"rectangle"
></div>
</div>
{{>
err-tip
}}
</div>
<div
class=
"left captcha-component"
>
...
...
apps/passport/views/action/back/reset-pwd.hbs
View file @
9bacd16
...
...
@@ -47,10 +47,7 @@
<input
id=
"pwd"
class=
"input va pwd"
type=
"password"
name=
"pwd"
placeholder=
"新的登录密码"
maxlength=
"20"
>
<div
class=
"tips hide"
>
<div
class=
"triangle"
></div>
<div
class=
"rectangle"
></div>
</div>
{{>
err-tip
}}
</li>
<li
class=
"clearfix"
>
...
...
@@ -58,11 +55,7 @@
placeholder=
"确认登录密码"
maxlength=
"20"
>
<div
class=
"tips hide"
>
<div
class=
"triangle"
></div>
<div
class=
"rectangle"
></div>
</div>
{{>
err-tip
}}
</li>
<li
class=
"clearfix blank"
>
<input
type=
"hidden"
name=
"code"
value=
"
{{
code
}}
"
>
...
...
@@ -81,10 +74,6 @@
</form>
</ul>
<div
class=
"tips hide"
>
<div
class=
"triangle"
></div>
<div
class=
"rectangle"
></div>
</div>
{{/
resetPwd
}}
</div>
...
...
apps/passport/views/action/back/verification.hbs
View file @
9bacd16
...
...
@@ -55,10 +55,7 @@
<input
id=
"captcha"
class=
"input va captcha left"
type=
"text"
name=
"code"
maxlength=
"4"
placeholder=
"请输入短信验证码"
>
<div
class=
"tips hide"
>
<div
class=
"triangle"
></div>
<div
class=
"rectangle"
></div>
</div>
{{>
err-tip
}}
</div>
<a
id=
"send-captcha"
class=
"btn send-captcha left"
>
获取短信验证码
</a>
...
...
apps/passport/views/action/bind/bind-set-pwd.hbs
View file @
9bacd16
...
...
@@ -15,10 +15,7 @@
<div
class=
"pwd-wrapper"
>
<input
id=
"pwd"
class=
"input"
type=
"password"
placeholder=
"新的登录密码"
>
<div
class=
"tips hide"
>
<div
class=
"triangle"
></div>
<div
class=
"rectangle"
></div>
</div>
{{>
err-tip
}}
</div>
</li>
...
...
@@ -26,10 +23,7 @@
<div
class=
"repwd-wrapper"
>
<input
id=
"repwd"
class=
"input"
type=
"password"
placeholder=
"确认登录密码"
>
<div
class=
"tips hide"
>
<div
class=
"triangle"
></div>
<div
class=
"rectangle"
></div>
</div>
{{>
err-tip
}}
</div>
</li>
...
...
apps/passport/views/action/bind/index.hbs
View file @
9bacd16
...
...
@@ -26,12 +26,7 @@
<input
id=
"phone-num"
name=
'mobile'
class=
"phone-num"
type=
"text"
placeholder=
"Phone Number"
>
<div
class=
"tips hide"
>
<div
class=
"triangle"
></div>
<div
class=
"rectangle"
></div>
</div>
{{>
err-tip
}}
</div>
</div>
</li>
...
...
@@ -44,10 +39,7 @@
<input
id=
"verifyCode"
name=
'verifyCode'
class=
"input left"
name=
"code"
type=
"text"
placeholder=
"图形验证码"
>
<div
class=
"tips hide"
>
<div
class=
"triangle"
></div>
<div
class=
"rectangle"
></div>
</div>
{{>
err-tip
}}
</div>
...
...
@@ -65,10 +57,7 @@
<input
id=
"sms-captcha-input"
name=
'code'
class=
"input left sms-captcha-input"
type=
"text"
placeholder=
"短信验证码"
>
<div
class=
"tips hide"
>
<div
class=
"triangle"
></div>
<div
class=
"rectangle"
></div>
</div>
{{>
err-tip
}}
</div>
<div
class=
"left"
>
...
...
apps/passport/views/action/login/index.hbs
View file @
9bacd16
...
...
@@ -6,11 +6,15 @@
<div
class=
"title"
>
登录 SIGN IN
</div>
</li>
<li
class=
"clearfix"
>
<select
id=
"country-list"
class=
"country-list"
>
{{#
each
countryList
}}
<option
{{#if
selected
}}
selected=
"selected"
{{/if}}
value=
"
{{
areaCode
}}
"
>
{{
name
}}
</option>
{{/
each
}}
</select>
<!--<select id="country-list" class="country-list">-->
<!--
{{#
each
countryList
}}
-->
<!--<option
{{#if
selected
}}
selected="selected"
{{/if}}
value="
{{
areaCode
}}
">
{{
name
}}
</option>-->
<!--
{{/
each
}}
-->
<!--</select>-->
{{>
select-header
}}
{{>
select-list
}}
<div
id=
"phone"
class=
"left phone needTip"
>
<span
id=
"country-code"
class=
"country-code"
>
{{
countryCode
}}
</span>
...
...
@@ -18,10 +22,7 @@
type=
"text"
placeholder=
"Phone Number"
autocomplete=
"off"
>
<div
class=
"tips phone-num-tips hide"
>
<div
class=
"triangle"
></div>
<div
class=
"rectangle"
></div>
</div>
{{>
err-tip
}}
</div>
</li>
...
...
@@ -32,10 +33,7 @@
placeholder=
"Password"
autocomplete=
"off"
maxlength=
"20"
>
<div
class=
"tips pwd-tips hide"
>
<div
class=
"triangle"
></div>
<div
class=
"rectangle"
></div>
</div>
{{>
err-tip
}}
</div>
</li>
...
...
@@ -45,10 +43,7 @@
<input
id=
"captcha"
class=
"input va captcha needTip"
type=
"text"
name=
"captcha"
placeholder=
"图形验证码"
autocomplete=
"off"
maxlength=
"4"
>
<div
class=
"tips img-captcha-tips hide"
>
<div
class=
"triangle"
></div>
<div
class=
"rectangle"
></div>
</div>
{{>
err-tip
}}
</div>
<div
class=
"left captcha-component"
>
...
...
apps/passport/views/partial/err-tip.hbs
0 → 100644
View file @
9bacd16
<div
class=
"tips hide"
>
<div
class=
"triangle"
></div>
<div
class=
"rectangle"
></div>
</div>
\ No newline at end of file
...
...
apps/passport/views/partial/reg/register.hbs
View file @
9bacd16
...
...
@@ -16,10 +16,7 @@
<input
value=
""
id=
"phone-num"
class=
"input phone-num"
type=
"text"
name=
"phoneNum"
placeholder=
"Phone Number"
autocomplete=
"off"
>
<div
class=
"tips phone-num-tips hide"
>
<div
class=
"triangle"
></div>
<div
class=
"rectangle"
></div>
</div>
{{>
err-tip
}}
</div>
...
...
@@ -31,10 +28,7 @@
<input
id=
"captcha"
class=
"input captcha"
type=
"text"
name=
"captcha"
placeholder=
"图形验证码"
autocomplete=
"off"
maxlength=
"4"
>
<div
class=
"tips img-captcha-tips hide"
>
<div
class=
"triangle"
></div>
<div
class=
"rectangle"
></div>
</div>
{{>
err-tip
}}
</div>
<div
class=
"left captcha-component"
>
...
...
@@ -50,10 +44,7 @@
<input
id=
"msg-captcha"
class=
"input msg-captcha"
type=
"text"
name=
"msgCaptcha"
placeholder=
"短信验证码"
autocomplete=
"off"
maxlength=
"4"
>
<div
class=
"tips sms-captcha-tips hide"
>
<div
class=
"triangle"
></div>
<div
class=
"rectangle"
></div>
</div>
{{>
err-tip
}}
</div>
<a
id=
"send-captcha"
class=
"btn send-captcha disable"
>
获取短信验证码
</a>
...
...
@@ -74,10 +65,7 @@
<input
id=
"pwd"
class=
"input pwd"
name=
"pwd"
placeholder=
"Password"
autocomplete=
"off"
maxlength=
"20"
type=
"password"
>
<div
class=
"tips pwd-tips hide"
>
<div
class=
"triangle"
></div>
<div
class=
"rectangle"
></div>
</div>
{{>
err-tip
}}
</div>
</li>
...
...
@@ -104,10 +92,6 @@
</div>
</li>
</ul>
<div
id=
"err-tip"
class=
"err-tip hide"
>
<span></span>
<b></b>
</div>
<input
name=
""
type=
"hidden"
id=
"open-id"
value=
"
{{
openId
}}
"
/>
<input
name=
""
type=
"hidden"
id=
"source-type"
value=
"
{{
sourceType
}}
"
/>
...
...
apps/passport/views/partial/select-header.hbs
0 → 100644
View file @
9bacd16
{{#
countryName
}}
<div
id=
'country-select-header'
class=
"country-select-header"
>
<span
class=
"name left"
>
{{
text
}}
</span>
<span
class=
"iconfont small right"
>

</span>
</div>
{{/
countryName
}}
\ No newline at end of file
...
...
apps/passport/views/partial/select-list.hbs
0 → 100644
View file @
9bacd16
{{#
country
}}
<div
id=
"country-select-list"
class=
"country-select-list hide"
>
{{#
each
list
}}
<div
class=
"option
{{#if
selected
}}
selected
{{/if}}
"
data-code=
"
{{
areaCode
}}
"
data-value=
"
{{
name
}}
"
>
<span
class=
"iconfont small left"
>
{{#if
selected
}}

{{/if}}
</span>
<span
class=
"left"
>
{{
name
}}
</span>
</div>
{{/
each
}}
</div>
{{/
country
}}
\ No newline at end of file
...
...
apps/passport/views/partial/select.hbs
deleted
100644 → 0
View file @
639c6fd
<div
id=
"select"
class=
"select relative"
>
<div
id=
"header"
class=
"header"
>
<div
class=
"name"
>
中国
</div>
<span
class=
"iconfont"
>

</span>
</div>
<div
id=
"phone"
class=
"phone"
>
<span
id=
"country-code"
class=
"country-code"
>
{{
countryCode
}}
</span>
<input
id=
"account"
class=
"account input phone-num va"
name=
"account"
value=
"
{{
bindMobile
}}
"
type=
"text"
placeholder=
"Phone Number"
autocomplete=
"off"
>
</div>
</div>
<div>
<div
id=
"options"
class=
"options"
>
<div
name=
"option"
class=
"option"
value=
"+1"
>
<span
name=
"status"
class=
"selected iconfont"
>

</span>
<div
name=
"name"
class=
"name"
>
中国
</div>
</div>
</div>
<div
name=
"option"
class=
"option touch"
value=
"+1"
>
<span
name=
"status"
class=
"selected iconfont"
>

</span>
<div
name=
"name"
class=
"name"
>
中国澳门
</div>
</div>
</div>
\ No newline at end of file
config/common.js
View file @
9bacd16
...
...
@@ -26,9 +26,9 @@ module.exports = {
useOneapm
:
false
,
useCache
:
false
,
memcache
:
{
master
:
[
'172.16.6.157:11211'
],
slave
:
[
'172.16.6.157:11211'
],
session
:
[
'172.16.6.157:11211'
],
master
:
[
'172.16.6.251:11211'
],
slave
:
[
'172.16.6.251:11211'
],
session
:
[
'172.16.6.251:11211'
],
timeout
:
1000
,
retries
:
0
},
...
...
public/js/passport/login/index.js
View file @
9bacd16
...
...
@@ -17,7 +17,8 @@ var $loginTip = $loginBtn.siblings('.login-fail-tip'),
ep
=
new
EventProxy
();
var
$regionCodeText
=
$
(
'#country-code'
),
$regionSelectCtrl
=
$
(
'#country-list'
);
$regionSelectList
=
$
(
'#country-select-list'
),
$regionSelectHeader
=
$
(
'#country-select-header'
);
var
$emailAutoComplete
=
$
(
'#email-autocomplete'
);
...
...
@@ -37,6 +38,13 @@ var checkbox = {
unchecked
:
''
};
var
upDown
=
{
up
:
''
,
down
:
''
};
var
selectedIcon
=
''
;
require
(
'yoho-jquery-placeholder'
);
function
errTip
(
ele
,
msg
)
{
...
...
@@ -258,11 +266,40 @@ $phoneNumInput.on('focus', function() {
$
(
'[placeholder]'
).
placeholder
();
// 选择地点
$regionSelectCtrl
.
change
(
function
()
{
var
$this
=
$
(
this
);
function
changeHeader
()
{
var
$indicator
=
$regionSelectHeader
.
find
(
'.iconfont'
);
if
(
$regionSelectList
.
hasClass
(
'hide'
))
{
$indicator
.
html
(
upDown
.
up
);
}
else
{
$indicator
.
html
(
upDown
.
down
);
}
}
// 选择图家列表
$regionSelectList
.
on
(
'click'
,
'.option'
,
function
()
{
var
$clickItem
=
$
(
this
);
var
areaCode
=
$clickItem
.
data
(
'code'
);
var
name
=
$clickItem
.
data
(
'value'
);
var
$selectedItem
=
$clickItem
.
siblings
(
'.selected'
);
$selectedItem
.
find
(
'.iconfont'
).
html
(
''
);
$selectedItem
.
removeClass
(
'selected'
);
$clickItem
.
find
(
'.iconfont'
).
html
(
selectedIcon
);
$clickItem
.
addClass
(
'selected'
);
$regionSelectHeader
.
find
(
'.name'
).
html
(
name
);
$regionCodeText
.
text
(
areaCode
);
$regionSelectList
.
addClass
(
'hide'
);
changeHeader
();
});
$regionCodeText
.
text
(
$this
.
val
());
// 选择图家头
$regionSelectHeader
.
on
(
'click'
,
function
()
{
$regionSelectList
.
toggleClass
(
'hide'
);
changeHeader
();
});
// 密码
...
...
public/scss/passport/_index.css
View file @
9bacd16
...
...
@@ -97,6 +97,61 @@
.focus
{
border
:
2px
solid
#000
!important
;
}
.country-select-list
{
position
:
absolute
;
top
:
$
item-height
;
width
:
$
item-width
;
background-color
:
#f8f8f8
;
border
:
1px
solid
#eeeeee
;
z-index
:
100
;
font-size
:
10px
;
.option
{
height
:
20px
;
cursor
:
pointer
;
span
{
display
:
inline-block
;
height
:
20px
;
line-height
:
@
height
;
}
}
.option
:hover
{
background-color
:
#666666
;
color
:
white
;
}
.small
{
font-size
:
14px
;
margin
:
0
3px
;
width
:
15px
;
}
}
.country-select-header
{
height
:
$
item-height
;
width
:
100px
;
border
:
1px
solid
#eeeeee
;
font-size
:
16px
;
float
:
left
;
cursor
:
pointer
;
.small
{
font-size
:
14px
;
height
:
40px
;
width
:
20px
;
line-height
:
@
height
;
}
.name
{
display
:
inline-block
;
height
:
40px
;
line-height
:
@
height
;
margin-left
:
10px
;
}
}
}
@import
"login"
;
...
...
Please
register
or
login
to post a comment