Authored by 梁志锋

Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop

... ... @@ -1250,13 +1250,23 @@
### 支付中心
{
'payAppInfo' : {
'payAppInfo' : [
{
'appIcon' : 'http://static.yohobuy.com/images/icon.png',
'payLink' : '/weixin/pay/'
'payLink' : '/weixin/pay/',
'appId': 'weixin',
'app' : '微信支付',
'hint' : '需下载微信客户端',
'subHint' : '推荐使用'
},{
'appIcon' : 'http://static.yohobuy.com/images/icon.png',
'payLink' : '/weixin/pay/',
'appId': 'baidu',
'app' : '百度支付',
'hint' : '需下载微信客户端',
'subHint' : '推荐使用'
}
]
}
### 物流详情
... ... @@ -1266,9 +1276,14 @@
'logisticUrl' : 'http://www.shunfeng.com',
'logisticCompany' : '顺丰',
'logisticNumber' : '1231231231',
'logisticDetail' : {
'logisticDetail' : [
{
'status' : '南京市 派送中',
'date' : '2015-12-03'
}, {
'status' : '南京市 准备中',
'date' : '2015-12-03'
}
]
}
... ...
... ... @@ -76,33 +76,17 @@ class LoginData
}
/**
* 写入SESSION会话
* 登出SESSION会话
*
* @param int $uid 用户ID
* @return array
*/
public static function signinSession($uid)
public static function signoutSession($token)
{
$param = array();
$param['uid'] = $uid;
$param['token'] = md5($uid . '#@!@#');
return Yohobuy::get(Yohobuy::API_URL_LOGINSESSION . 'Passport/session/index', $param);
}
/**
* 写入SESSION会话
*
* @param int $uid 用户ID
* @return array
*/
public static function checkSession($uid)
{
$param = array();
$param['uid'] = $uid;
$param['token'] = md5($uid . '#@!@#');
$param['token'] = $token;
return Yohobuy::get(Yohobuy::API_URL_LOGINSESSION . 'Passport/session/val', $param);
return Yohobuy::get(Yohobuy::API_URL_LOGINSESSION . 'Passport/session/logout', $param);
}
}
... ...
... ... @@ -77,7 +77,7 @@ class Call extends Factory
if (is_array($token) && isset($token['uid']))
{
$this->client = new SaeTClientV2($this->apiConfig['appId'], $this->apiConfig['appKey'], $token['access_token']);
$this->client = new \SaeTClientV2($this->apiConfig['appId'], $this->apiConfig['appKey'], $token['access_token']);
$userInfo = $this->client->show_user_by_id($token['uid']);
... ... @@ -108,7 +108,7 @@ class Call extends Factory
if (is_array($token) && isset($token['access_token']))
{
$this->client = new SaeTClientV2($this->apiConfig['appId'], $this->apiConfig['appKey'], $token['access_token']);
$this->client = new \SaeTClientV2($this->apiConfig['appId'], $this->apiConfig['appKey'], $token['access_token']);
$result = $this->client->friends_by_id($params['uid'], $params['cursor'], $params['count']);
... ... @@ -133,7 +133,7 @@ class Call extends Factory
if (is_array($token) && isset($token['access_token']))
{
$this->client = new SaeTClientV2($this->apiConfig['appId'], $this->apiConfig['appKey'], $token['access_token']);
$this->client = new \SaeTClientV2($this->apiConfig['appId'], $this->apiConfig['appKey'], $token['access_token']);
$result = $this->client->bilateral($params['uid'], $params['page'], $params['count']);
... ... @@ -163,7 +163,7 @@ class Call extends Factory
{
$content .= $link;
$this->client = new SaeTClientV2($this->apiConfig['appId'], $this->apiConfig['appKey'], $token['access_token']);
$this->client = new \SaeTClientV2($this->apiConfig['appId'], $this->apiConfig['appKey'], $token['access_token']);
$response = $this->client->upload($content, $image);
... ... @@ -190,7 +190,7 @@ class Call extends Factory
if (is_array($token) && isset($token['access_token']))
{
$this->client = new SaeTClientV2($this->apiConfig['appId'], $this->apiConfig['appKey'], $token['access_token']);
$this->client = new \SaeTClientV2($this->apiConfig['appId'], $this->apiConfig['appKey'], $token['access_token']);
if ($uid !== null)
{
... ... @@ -218,7 +218,7 @@ class Call extends Factory
if (is_array($token) && isset($token['access_token']) && is_string($content))
{
$this->client = new SaeTClientV2($this->apiConfig['appId'], $this->apiConfig['appKey'], $token['access_token']);
$this->client = new \SaeTClientV2($this->apiConfig['appId'], $this->apiConfig['appKey'], $token['access_token']);
$this->client->update($content);
}
... ... @@ -238,7 +238,7 @@ class Call extends Factory
{
if (is_array($token) && isset($token['access_token']) && isset($uid))
{
$this->client = new SaeTClientV2($this->apiConfig['appId'], $this->apiConfig['appKey'], $token['access_token']);
$this->client = new \SaeTClientV2($this->apiConfig['appId'], $this->apiConfig['appKey'], $token['access_token']);
$this->client->send_dm_by_id($uid, $content, $id);
}
}
... ...
... ... @@ -153,16 +153,17 @@
.num {
position: absolute;
padding: 0 pxToRem(8px);
top: 0;
right: pxToRem(40px);
min-width: pxToRem(16px);
font-size: pxToRem(24px);
line-height: pxToRem(32px);
top: pxToRem(-24px);
right: pxToRem(36px);
width: pxToRem(72px);
height: pxToRem(72px);
font-size: pxToRem(40px);
line-height: pxToRem(72px);
color: #fff;
background: #F03D35;
background: #f03d35;
text-align: center;
border-radius: pxToRem(20px);
border-radius: 50%;
@include transform(scale(0.5));
}
}
... ...
... ... @@ -67,14 +67,15 @@ class LoginController extends AbstractAction
/**
* 退出
*
* @todo
*/
public function outAction()
{
$this->setCookie('_UID', '');
$refer = $this->server('HTTP_REFERER', SITE_MAIN);
$token = $this->get('token');
LoginData::signoutSession($token);
$this->go($refer);
}
... ... @@ -126,6 +127,7 @@ class LoginController extends AbstractAction
}
$data['data']['session'] = Helpers::syncUserSession($data['data']['uid']);
$data['data']['href'] = $refer;
} while (false);
$this->echoJson($data);
... ...
... ... @@ -40,6 +40,13 @@ routes.interational.route.module = Passport
routes.interational.route.controller = Login
routes.interational.route.action = International
; 登录页
routes.logout.type = "rewrite"
routes.logout.match = "/passport/signout/index"
routes.logout.route.module = Passport
routes.logout.route.controller = Login
routes.logout.route.action = out
; 找回密码(手机号)
routes.phoneback.type = "rewrite"
routes.phoneback.match = "/phoneback.html"
... ...