...
|
...
|
@@ -4,6 +4,7 @@ use Action\WebAction; |
|
|
use LibModels\Web\Passport\RegData;
|
|
|
use LibModels\Web\Passport\LoginData;
|
|
|
use Passport\PassportModel as PassportModel;
|
|
|
use Configs\ChannelConfig;
|
|
|
use WebPlugin\Helpers;
|
|
|
|
|
|
class LoginController extends WebAction
|
...
|
...
|
@@ -26,21 +27,13 @@ class LoginController extends WebAction |
|
|
$simpleHeader = PassportModel::getSimpleHeader();
|
|
|
//获取登陆页左侧资源
|
|
|
$cover = PassportModel::getLeftBanner(PassportModel::SIGNIN_LEFT_BANNER_CODE);
|
|
|
//是否记住密码
|
|
|
$isRemember = $this->getCookie('isRemember', FALSE);
|
|
|
$account = '';
|
|
|
$password = '';
|
|
|
if ($isRemember) {
|
|
|
$account = $this->decrypt($this->getCookie('account', ''));
|
|
|
$password = $this->decrypt($this->getCookie('userInfo', ''));
|
|
|
}
|
|
|
//整合
|
|
|
$data = array(
|
|
|
'loginPage' => true,
|
|
|
'simpleHeader' => $simpleHeader,
|
|
|
'passport' => array(
|
|
|
'coverHref' => $cover['url'],
|
|
|
'coverImg' => !empty($cover['img']) ? $cover['img'] : 'http://img12.static.yhbimg.com/yhb-img01/2015/12/01/07/020a0b6e7ff908d0c2bc4045b4fef42b9f.png?imageView/2/w/252/h/190',
|
|
|
'coverImg' => empty($cover['img']) ? ChannelConfig::$leftDefaultImg : $cover['img'],
|
|
|
'countryCode' => '+86',
|
|
|
'countryName' => '中国',
|
|
|
'countryList' => RegData::getAreasData(),
|
...
|
...
|
@@ -52,9 +45,6 @@ class LoginController extends WebAction |
|
|
'alipayLogin' => Helpers::url('/passport/autosign/alipay'),
|
|
|
'doubanLogin' => Helpers::url('/passport/autosign/douban'),
|
|
|
'renrenLogin' => Helpers::url('/passport/autosign/renren'),
|
|
|
'isRemember' => $isRemember,
|
|
|
'password' => $password,
|
|
|
'account' => $account
|
|
|
),
|
|
|
);
|
|
|
|
...
|
...
|
@@ -83,7 +73,6 @@ class LoginController extends WebAction |
|
|
$area = trim($this->post('areaCode', '86'));
|
|
|
$account = trim($this->post('account'));
|
|
|
$password = trim($this->post('password'));
|
|
|
$isRemember = trim($this->post('isRemember'));
|
|
|
if (!is_numeric($area) || empty($account) || empty($password)) {
|
|
|
break;
|
|
|
}
|
...
|
...
|
@@ -103,7 +92,6 @@ class LoginController extends WebAction |
|
|
}
|
|
|
|
|
|
/* 调用登录接口进行登录 */
|
|
|
// 获取未登录时的唯一识别码
|
|
|
$shoppingKey = Helpers::getShoppingKeyByCookie();
|
|
|
$data = LoginData::signin($area, $account, $password, $shoppingKey);
|
|
|
if (!isset($data['code']) || $data['code'] != 200 || !isset($data['data']['uid'])) {
|
...
|
...
|
|