Toggle navigation
Toggle navigation
This project
Loading...
Sign in
wangshusheng
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to dashboard
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
wangqing
9 years ago
Commit
4c80d334f1f92e7785964461ba714f08f943808d
1 parent
3fe19bd9
提交第三方登录
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
188 additions
and
10 deletions
template/www.yohobuy.com/actions/passport/thirdlogin/index.phtml
template/www.yohobuy.com/actions/passport/thirdlogin/noregist.phtml
template/www.yohobuy.com/partials/layout/use.phtml
web-static/js/header.js
web-static/js/passport/entry.js
web-static/js/passport/thirdlogin.js
yohobuy/www.yohobuy.com/application/modules/Passport/controllers/Thirdlogin.php
template/www.yohobuy.com/actions/passport/thirdlogin/index.phtml
View file @
4c80d33
...
...
@@ -4,8 +4,12 @@
欢迎加入
<span
class=
"yoho"
>YOHO!FAMILY</span>
</h
3
>
<p
class=
"safeword"
>为了您的账户安全,请您完善账户信息,以便为您提供更优质的服务</p>
<form
action=
""
id=
"bindmobileform"
>
<form
action=
""
id=
"bindmobileform"
method=
"post"
>
<input
type=
"hidden"
value=
"{{openId}}"
id=
"openId"
name=
"openId"
/>
<input
type=
"hidden"
value=
"{{sourceType}}"
id=
"sourceType"
name=
"sourceType"
/>
<input
type=
"hidden"
value=
"+86"
id=
"areacode"
name=
"area"
/>
<div
class=
"yohobindrow"
>
<div
class=
"name areatag"
>地区</div>
<div
class=
"content"
>
...
...
@@ -15,9 +19,11 @@
<span
class=
"righttag"
></span>
</div>
<div
class=
"optionslist hide"
>
<div
class=
"optionitem"
areanum=
"+88"
>中国香港</div>
<div
class=
"optionitem"
areanum=
"+87"
>中国台湾</div>
<div
class=
"optionitem"
areanum=
"+86"
>中国</div>
{
{#each
region
}
}
<div
class=
"optionitem"
areanum=
"{{areaCode}}"
>
{
{name
}
}
</div>
{
{/each
}
}
</div>
</div>
</div>
...
...
@@ -27,7 +33,7 @@
<div
class=
"content"
>
<div
class=
"yohophonewrapper"
>
<div
class=
"areanum"
id=
"areanum"
>+
86
</div>
<input
type=
"text"
class=
"phonenum"
/>
<input
type=
"text"
class=
"phonenum"
name=
"mobile"
/>
</div>
</div>
</div>
...
...
template/www.yohobuy.com/actions/passport/thirdlogin/noregist.phtml
0 → 100644
View file @
4c80d33
{
{>
layout/simple-header
}
}
<div
class=
"bindwrapper"
>
<h
3
class=
"welcomeword"
>
欢迎加入
<span
class=
"yoho"
>YOHO!FAMILY</span>
</h
3
>
<p
class=
"safeword"
>为了您的账户安全,请您完善账户信息,以便为您提供更优质的服务</p>
<p
class=
"sendnotify novisiable"
>验证码已发送至<span
class=
"sendphone"
>
{
{mobile
}
}</span></p>
<div
class=
"validaterow"
>
<div
class=
"name phonetag"
>短信验证码</div>
<div
class=
"content"
>
<div
class=
"yohophonewrapper"
>
<input
type=
"text"
class=
"phonenum"
value=
""
/>
</div>
</div>
<div
class=
"validatewrapper"
>
<a
href=
"javascript:void(0)"
class=
"yohobindbtn disabled"
id=
"sendmessage"
disabled=
"disabled"
>免费获取短信验证码</a>
</div>
<div
class=
"hide"
id=
"nopermissionmessage"
>
<span
class=
"second"
>
60
</span>秒后可重新操作
</div>
</div>
<div
class=
"setpwdcontent"
>
<div
class=
"yohobindrow setpwdwrapper"
>
<div
class=
"name setpwdtag"
>设置密码</div>
<div
class=
"content"
>
<div
class=
"yohophonewrapper"
>
<input
type=
"password"
class=
"phonenum pwdcontent"
maxlength=
"20"
id=
"pwd"
/>
<div
id=
"pwd-tips"
class=
"pwd-tips hide"
>
<div
class=
"yes"
id=
"pwd-tip1"
>密码只支持
6-20
位字符</div>
<div
class=
"default"
id=
"pwd-tip2"
>建议由字母、
数字、
符号两种以上组合</div>
</div>
</div>
</div>
</div>
<div
class=
"safelevel clearfix"
>
安全程度:
<span
class=
"low pwd-intensity"
>低</span><span
class=
"mid pwd-intensity"
>中</span><span
class=
"high pwd-intensity"
>高</span>
</div>
</div>
<div
class=
"btnwrapper confirmwrapper"
>
<a
href=
"javascript:void(0)"
class=
"yohobindbtn"
>确定</a>
</div>
</div>
{
{>
layout/footer
}
}
\ No newline at end of file
...
...
template/www.yohobuy.com/partials/layout/use.phtml
View file @
4c80d33
...
...
@@ -113,6 +113,12 @@
seajs.use('js/passport/login');
</script>
{{/if}}
{{!-- 第三方绑定--}}
{{#if thirdLogin}}
<script>
seajs.use('js/passport/thirdlogin');
</script>
{{/if}}
{{!-- 注册页--}}
{{#if registerPage}}
...
...
web-static/js/header.js
View file @
4c80d33
...
...
@@ -1323,10 +1323,14 @@ function actionLoopUpdCartNum() {
* @return {[type]} [description]
*/
function
actionExeTemplate
()
{
var
resulthtml
=
$
(
'#goodcartempwarpper'
).
html
().
replace
(
/
\\
/g
,
''
);
$
(
'#goodcartempwarpper'
).
html
(
resulthtml
);
vipInfoCombine
=
handlebars
.
compile
(
$
(
'#tmpl-my-login-new'
).
html
());
var
$goodcartempwarpper
=
$
(
'#goodcartempwarpper'
);
var
resulthtml
=
''
;
if
(
$goodcartempwarpper
&&
$goodcartempwarpper
.
html
())
{
resulthtml
=
$
(
'#goodcartempwarpper'
).
html
().
replace
(
/
\\
/g
,
''
);
$
(
'#goodcartempwarpper'
).
html
(
resulthtml
);
vipInfoCombine
=
handlebars
.
compile
(
$
(
'#tmpl-my-login-new'
).
html
());
}
}
/**
* 执行搜索
...
...
web-static/js/passport/entry.js
View file @
4c80d33
...
...
@@ -6,4 +6,5 @@ require('./reg');
require
(
'./back'
);
require
(
'./login'
);
require
(
'./reset'
);
require
(
'./vertification'
);
\ No newline at end of file
require
(
'./vertification'
);
require
(
'./thirdlogin'
);
\ No newline at end of file
...
...
web-static/js/passport/thirdlogin.js
0 → 100644
View file @
4c80d33
/**
* 登录
* @author: wq
* @date: 2016/1/21
*/
var
$
=
require
(
'yoho.jquery'
);
function
chooseProtocol
()
{
$
(
'.choosetag'
).
on
(
'change'
,
function
()
{
if
(
$
(
this
).
attr
(
'checked'
))
{
$
(
'.choosewrapper'
).
css
({
'background-image'
:
'url("http://webstatic.dev.yohobuy.com/img/passport/choosed.png")'
});
}
else
{
$
(
'.choosewrapper'
).
css
({
'background-image'
:
'none'
});
}
})
}
function
chooseAreaToogle
()
{
$
(
'.optionshow'
).
on
(
'click'
,
function
()
{
$
(
'.optionslist'
).
toggleClass
(
'hide'
);
});
}
function
cancelChooseArea
()
{
$
(
document
).
on
(
'click'
,
'body'
,
function
(
e
)
{
var
$target
=
$
(
e
.
target
);
if
(
$target
.
hasClass
(
'yohoselectarea'
)
||
$target
.
hasClass
(
'yohoselectarea'
)
||
$target
.
hasClass
(
'areaname'
)
||
$target
.
hasClass
(
'righttag'
)
||
$target
.
hasClass
(
'optionslist'
)
||
$target
.
hasClass
(
'optionitem'
))
{
return
;
}
else
{
$
(
'.optionslist'
).
addClass
(
'hide'
);
}
})
}
function
chooseArea
()
{
$
(
'.optionitem'
).
on
(
'click'
,
function
()
{
var
$option
=
$
(
this
);
var
areanum
=
$option
.
attr
(
'areanum'
);
var
areaname
=
$option
.
text
();
$
(
'#areaname'
).
text
(
areaname
);
$
(
'#areanum'
).
text
(
areanum
);
$
(
'#areacode'
).
val
(
areanum
);
$
(
'.optionslist'
).
addClass
(
'hide'
);
})
}
function
isagree
()
{
return
$
(
'.choosetag'
).
attr
(
'checked'
);
}
function
nextStep
()
{
var
openId
=
''
;
var
sourceType
=
''
;
var
mobile
=
''
;
var
areaCode
=
''
;
$
(
'#bindfirststep'
).
on
(
'click'
,
function
(
e
)
{
e
.
preventDefault
();
mobile
=
$
(
'.phonenum'
).
val
();
areaCode
=
$
(
'.areanum'
).
text
();
if
(
mobile
===
''
)
{
alert
(
'手机号码不能为空'
);
return
;
}
if
(
!
isagree
())
{
alert
(
'请先同意我们的协议'
);
return
;
}
openId
=
$
(
'#openId'
).
val
()
||
'29803EC6D4AAC3AAB8ABDB6AE829D579'
;
sourceType
=
$
(
'#sourceType'
).
val
()
||
'qq'
;
$
.
ajax
({
type
:
"post"
,
url
:
'/passport/autouserinfo/bindCheck'
,
data
:
{
mobile
:
mobile
,
area
:
areaCode
,
openId
:
openId
,
sourceType
:
sourceType
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
===
200
)
{
if
(
data
.
data
.
isReg
===
0
)
{
$
(
'#bindmobileform'
).
attr
(
'action'
,
'/passport/thirdlogin/noregist'
);
$
(
'#bindmobileform'
).
submit
();
}
else
{
}
}
else
{
alert
(
data
.
message
);
}
}
});
})
}
function
init
()
{
chooseProtocol
();
chooseArea
();
chooseAreaToogle
();
cancelChooseArea
();
nextStep
();
}
init
();
\ No newline at end of file
...
...
yohobuy/www.yohobuy.com/application/modules/Passport/controllers/Thirdlogin.php
View file @
4c80d33
...
...
@@ -40,4 +40,11 @@ class ThirdloginController extends WebAction
$this
->
_view
->
display
(
'index'
,
$data
);
}
public
function
noregistAction
()
{
$mobile
=
trim
(
$this
->
post
(
'mobile'
));
$data
=
array
(
'mobile'
=>
$mobile
);
$this
->
_view
->
display
(
'noregist'
,
$data
);
}
}
...
...
Please
register
or
login
to post a comment