Authored by 梁志锋

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

@@ -1250,13 +1250,23 @@ @@ -1250,13 +1250,23 @@
1250 ### 支付中心 1250 ### 支付中心
1251 1251
1252 { 1252 {
1253 - 'payAppInfo' : { 1253 + 'payAppInfo' : [
  1254 + {
1254 'appIcon' : 'http://static.yohobuy.com/images/icon.png', 1255 'appIcon' : 'http://static.yohobuy.com/images/icon.png',
1255 - 'payLink' : '/weixin/pay/' 1256 + 'payLink' : '/weixin/pay/',
  1257 + 'appId': 'weixin',
1256 'app' : '微信支付', 1258 'app' : '微信支付',
1257 'hint' : '需下载微信客户端', 1259 'hint' : '需下载微信客户端',
1258 'subHint' : '推荐使用' 1260 'subHint' : '推荐使用'
  1261 + },{
  1262 + 'appIcon' : 'http://static.yohobuy.com/images/icon.png',
  1263 + 'payLink' : '/weixin/pay/',
  1264 + 'appId': 'baidu',
  1265 + 'app' : '百度支付',
  1266 + 'hint' : '需下载微信客户端',
  1267 + 'subHint' : '推荐使用'
1259 } 1268 }
  1269 + ]
1260 } 1270 }
1261 1271
1262 ### 物流详情 1272 ### 物流详情
@@ -1266,9 +1276,14 @@ @@ -1266,9 +1276,14 @@
1266 'logisticUrl' : 'http://www.shunfeng.com', 1276 'logisticUrl' : 'http://www.shunfeng.com',
1267 'logisticCompany' : '顺丰', 1277 'logisticCompany' : '顺丰',
1268 'logisticNumber' : '1231231231', 1278 'logisticNumber' : '1231231231',
1269 - 'logisticDetail' : { 1279 + 'logisticDetail' : [
  1280 + {
1270 'status' : '南京市 派送中', 1281 'status' : '南京市 派送中',
1271 'date' : '2015-12-03' 1282 'date' : '2015-12-03'
  1283 + }, {
  1284 + 'status' : '南京市 准备中',
  1285 + 'date' : '2015-12-03'
1272 } 1286 }
  1287 + ]
1273 } 1288 }
1274 1289
@@ -76,33 +76,17 @@ class LoginData @@ -76,33 +76,17 @@ class LoginData
76 } 76 }
77 77
78 /** 78 /**
79 - * 写入SESSION会话 79 + * 登出SESSION会话
80 * 80 *
81 * @param int $uid 用户ID 81 * @param int $uid 用户ID
82 * @return array 82 * @return array
83 */ 83 */
84 - public static function signinSession($uid) 84 + public static function signoutSession($token)
85 { 85 {
86 $param = array(); 86 $param = array();
87 - $param['uid'] = $uid;  
88 - $param['token'] = md5($uid . '#@!@#');  
89 -  
90 - return Yohobuy::get(Yohobuy::API_URL_LOGINSESSION . 'Passport/session/index', $param);  
91 - }  
92 -  
93 - /**  
94 - * 写入SESSION会话  
95 - *  
96 - * @param int $uid 用户ID  
97 - * @return array  
98 - */  
99 - public static function checkSession($uid)  
100 - {  
101 - $param = array();  
102 - $param['uid'] = $uid;  
103 - $param['token'] = md5($uid . '#@!@#'); 87 + $param['token'] = $token;
104 88
105 - return Yohobuy::get(Yohobuy::API_URL_LOGINSESSION . 'Passport/session/val', $param); 89 + return Yohobuy::get(Yohobuy::API_URL_LOGINSESSION . 'Passport/session/logout', $param);
106 } 90 }
107 91
108 } 92 }
@@ -77,7 +77,7 @@ class Call extends Factory @@ -77,7 +77,7 @@ class Call extends Factory
77 77
78 if (is_array($token) && isset($token['uid'])) 78 if (is_array($token) && isset($token['uid']))
79 { 79 {
80 - $this->client = new SaeTClientV2($this->apiConfig['appId'], $this->apiConfig['appKey'], $token['access_token']); 80 + $this->client = new \SaeTClientV2($this->apiConfig['appId'], $this->apiConfig['appKey'], $token['access_token']);
81 81
82 $userInfo = $this->client->show_user_by_id($token['uid']); 82 $userInfo = $this->client->show_user_by_id($token['uid']);
83 83
@@ -108,7 +108,7 @@ class Call extends Factory @@ -108,7 +108,7 @@ class Call extends Factory
108 108
109 if (is_array($token) && isset($token['access_token'])) 109 if (is_array($token) && isset($token['access_token']))
110 { 110 {
111 - $this->client = new SaeTClientV2($this->apiConfig['appId'], $this->apiConfig['appKey'], $token['access_token']); 111 + $this->client = new \SaeTClientV2($this->apiConfig['appId'], $this->apiConfig['appKey'], $token['access_token']);
112 112
113 $result = $this->client->friends_by_id($params['uid'], $params['cursor'], $params['count']); 113 $result = $this->client->friends_by_id($params['uid'], $params['cursor'], $params['count']);
114 114
@@ -133,7 +133,7 @@ class Call extends Factory @@ -133,7 +133,7 @@ class Call extends Factory
133 133
134 if (is_array($token) && isset($token['access_token'])) 134 if (is_array($token) && isset($token['access_token']))
135 { 135 {
136 - $this->client = new SaeTClientV2($this->apiConfig['appId'], $this->apiConfig['appKey'], $token['access_token']); 136 + $this->client = new \SaeTClientV2($this->apiConfig['appId'], $this->apiConfig['appKey'], $token['access_token']);
137 137
138 $result = $this->client->bilateral($params['uid'], $params['page'], $params['count']); 138 $result = $this->client->bilateral($params['uid'], $params['page'], $params['count']);
139 139
@@ -163,7 +163,7 @@ class Call extends Factory @@ -163,7 +163,7 @@ class Call extends Factory
163 { 163 {
164 $content .= $link; 164 $content .= $link;
165 165
166 - $this->client = new SaeTClientV2($this->apiConfig['appId'], $this->apiConfig['appKey'], $token['access_token']); 166 + $this->client = new \SaeTClientV2($this->apiConfig['appId'], $this->apiConfig['appKey'], $token['access_token']);
167 167
168 $response = $this->client->upload($content, $image); 168 $response = $this->client->upload($content, $image);
169 169
@@ -190,7 +190,7 @@ class Call extends Factory @@ -190,7 +190,7 @@ class Call extends Factory
190 190
191 if (is_array($token) && isset($token['access_token'])) 191 if (is_array($token) && isset($token['access_token']))
192 { 192 {
193 - $this->client = new SaeTClientV2($this->apiConfig['appId'], $this->apiConfig['appKey'], $token['access_token']); 193 + $this->client = new \SaeTClientV2($this->apiConfig['appId'], $this->apiConfig['appKey'], $token['access_token']);
194 194
195 if ($uid !== null) 195 if ($uid !== null)
196 { 196 {
@@ -218,7 +218,7 @@ class Call extends Factory @@ -218,7 +218,7 @@ class Call extends Factory
218 218
219 if (is_array($token) && isset($token['access_token']) && is_string($content)) 219 if (is_array($token) && isset($token['access_token']) && is_string($content))
220 { 220 {
221 - $this->client = new SaeTClientV2($this->apiConfig['appId'], $this->apiConfig['appKey'], $token['access_token']); 221 + $this->client = new \SaeTClientV2($this->apiConfig['appId'], $this->apiConfig['appKey'], $token['access_token']);
222 222
223 $this->client->update($content); 223 $this->client->update($content);
224 } 224 }
@@ -238,7 +238,7 @@ class Call extends Factory @@ -238,7 +238,7 @@ class Call extends Factory
238 { 238 {
239 if (is_array($token) && isset($token['access_token']) && isset($uid)) 239 if (is_array($token) && isset($token['access_token']) && isset($uid))
240 { 240 {
241 - $this->client = new SaeTClientV2($this->apiConfig['appId'], $this->apiConfig['appKey'], $token['access_token']); 241 + $this->client = new \SaeTClientV2($this->apiConfig['appId'], $this->apiConfig['appKey'], $token['access_token']);
242 $this->client->send_dm_by_id($uid, $content, $id); 242 $this->client->send_dm_by_id($uid, $content, $id);
243 } 243 }
244 } 244 }
@@ -153,16 +153,17 @@ @@ -153,16 +153,17 @@
153 153
154 .num { 154 .num {
155 position: absolute; 155 position: absolute;
156 - padding: 0 pxToRem(8px);  
157 - top: 0;  
158 - right: pxToRem(40px);  
159 - min-width: pxToRem(16px);  
160 - font-size: pxToRem(24px);  
161 - line-height: pxToRem(32px); 156 + top: pxToRem(-24px);
  157 + right: pxToRem(36px);
  158 + width: pxToRem(72px);
  159 + height: pxToRem(72px);
  160 + font-size: pxToRem(40px);
  161 + line-height: pxToRem(72px);
162 color: #fff; 162 color: #fff;
163 - background: #F03D35; 163 + background: #f03d35;
164 text-align: center; 164 text-align: center;
165 - border-radius: pxToRem(20px); 165 + border-radius: 50%;
  166 + @include transform(scale(0.5));
166 } 167 }
167 } 168 }
168 169
@@ -67,14 +67,15 @@ class LoginController extends AbstractAction @@ -67,14 +67,15 @@ class LoginController extends AbstractAction
67 67
68 /** 68 /**
69 * 退出 69 * 退出
70 - *  
71 - * @todo  
72 */ 70 */
73 public function outAction() 71 public function outAction()
74 { 72 {
75 $this->setCookie('_UID', ''); 73 $this->setCookie('_UID', '');
76 74
77 $refer = $this->server('HTTP_REFERER', SITE_MAIN); 75 $refer = $this->server('HTTP_REFERER', SITE_MAIN);
  76 + $token = $this->get('token');
  77 +
  78 + LoginData::signoutSession($token);
78 79
79 $this->go($refer); 80 $this->go($refer);
80 } 81 }
@@ -126,6 +127,7 @@ class LoginController extends AbstractAction @@ -126,6 +127,7 @@ class LoginController extends AbstractAction
126 } 127 }
127 $data['data']['session'] = Helpers::syncUserSession($data['data']['uid']); 128 $data['data']['session'] = Helpers::syncUserSession($data['data']['uid']);
128 $data['data']['href'] = $refer; 129 $data['data']['href'] = $refer;
  130 +
129 } while (false); 131 } while (false);
130 132
131 $this->echoJson($data); 133 $this->echoJson($data);
@@ -40,6 +40,13 @@ routes.interational.route.module = Passport @@ -40,6 +40,13 @@ routes.interational.route.module = Passport
40 routes.interational.route.controller = Login 40 routes.interational.route.controller = Login
41 routes.interational.route.action = International 41 routes.interational.route.action = International
42 42
  43 +; 登录页
  44 +routes.logout.type = "rewrite"
  45 +routes.logout.match = "/passport/signout/index"
  46 +routes.logout.route.module = Passport
  47 +routes.logout.route.controller = Login
  48 +routes.logout.route.action = out
  49 +
43 ; 找回密码(手机号) 50 ; 找回密码(手机号)
44 routes.phoneback.type = "rewrite" 51 routes.phoneback.type = "rewrite"
45 routes.phoneback.match = "/phoneback.html" 52 routes.phoneback.match = "/phoneback.html"