Authored by 毕凯

Merge branch 'hotfix/wechat'

... ... @@ -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>
... ...
... ... @@ -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(), //国别码
... ...
... ... @@ -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']);
}
... ...