Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYWAP
·
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
毕凯
9 years ago
Commit
b0e1a4a41465a0d553ac96cf1b89d30abcb1bf61
1 parent
4532bfcd
微信登录修复
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
0 deletions
template/m.yohobuy.com/actions/passport/bind/index.phtml
yohobuy/m.yohobuy.com/application/modules/Passport/controllers/Bind.php
yohobuy/m.yohobuy.com/application/modules/Passport/controllers/Login.php
template/m.yohobuy.com/actions/passport/bind/index.phtml
View file @
b0e1a4a
...
...
@@ -5,18 +5,25 @@
<input
type=
"hidden"
id=
"nickname"
value=
"{{nickname}}"
>
{
{>
passport/header
}
}
<div
class=
"content"
>
{
{#if
isWechatLogin
}
}
<p
class=
"bind-tip"
>您正在使用
{
{platform
}
}快捷登录,请绑定手机号</p>
{
{^
}
}
<p
class=
"bind-tip"
>正在使用
{
{platform
}
}登录</p>
{
{/if
}
}
{
{>
passport/country_list
}
}
<div
class=
"input-container phone-container row has-clear"
>
<span
id=
"area-code"
class=
"area-code"
>
{
{areaCode
}
}</span>
<input
id=
"phone-num"
class=
"input phone-num"
type=
"text"
placeholder=
"手机号"
>
</div>
<span
id=
"btn-next"
class=
"btn btn-next disable row"
>发送验证码</span>
{
{#if
isWechatLogin
}
}
<div
class=
"other-login"
>
<a
href=
"/passport/login/index"
>
用其他方式登录
</a>
</div>
{
{/if
}
}
<div
class=
"tip"
>
<p>
...
...
yohobuy/m.yohobuy.com/application/modules/Passport/controllers/Bind.php
View file @
b0e1a4a
...
...
@@ -33,6 +33,7 @@ class BindController extends AbstractAction
'isPassportPage'
=>
true
,
// 模板中模块标识
'sourceType'
=>
$sourceType
,
// 第三方登录来源
'platform'
=>
self
::
getSourceName
(
$sourceType
),
'isWechatLogin'
=>
$sourceType
===
'wechat'
,
'openId'
=>
$openId
,
// openId
'areaCode'
=>
'+86'
,
//默认区号
'countrys'
=>
RegData
::
getAreasData
(),
//国别码
...
...
yohobuy/m.yohobuy.com/application/modules/Passport/controllers/Login.php
View file @
b0e1a4a
...
...
@@ -232,6 +232,10 @@ class LoginController extends AbstractAction
$refer
=
rawurldecode
(
$refer
);
}
if
(
stripos
(
$refer
,
'login'
)
!==
false
||
stripos
(
$refer
,
'signin'
)
!==
false
)
{
$refer
=
SITE_MAIN
.
'/home'
;
}
if
(
isset
(
$result
[
'code'
])
&&
$result
[
'code'
]
==
200
&&
!
empty
(
$result
[
'data'
][
'uid'
]))
{
$this
->
syncUserSession
(
$result
[
'data'
][
'uid'
]);
}
...
...
@@ -266,6 +270,10 @@ class LoginController extends AbstractAction
$refer
=
rawurldecode
(
$refer
);
}
if
(
stripos
(
$refer
,
'login'
)
!==
false
||
stripos
(
$refer
,
'signin'
)
!==
false
)
{
$refer
=
SITE_MAIN
.
'/home'
;
}
if
(
isset
(
$result
[
'code'
])
&&
$result
[
'code'
]
==
200
&&
!
empty
(
$result
[
'data'
][
'uid'
]))
{
$this
->
syncUserSession
(
$result
[
'data'
][
'uid'
]);
}
...
...
@@ -300,6 +308,10 @@ class LoginController extends AbstractAction
$refer
=
rawurldecode
(
$refer
);
}
if
(
stripos
(
$refer
,
'login'
)
!==
false
||
stripos
(
$refer
,
'signin'
)
!==
false
)
{
$refer
=
SITE_MAIN
.
'/home'
;
}
if
(
isset
(
$result
[
'code'
])
&&
$result
[
'code'
]
==
200
&&
!
empty
(
$result
[
'data'
][
'uid'
]))
{
$this
->
syncUserSession
(
$result
[
'data'
][
'uid'
]);
}
...
...
Please
register
or
login
to post a comment