Authored by Rock Zhang

Merge branch 'develop/wap' into beta/wap

Conflicts:
	static/js/me/logistic.js
@@ -227,4 +227,4 @@ $cartNav.on('touchstart', 'li', function(e) { @@ -227,4 +227,4 @@ $cartNav.on('touchstart', 'li', function(e) {
227 }); 227 });
228 228
229 //提前触发lazyload 229 //提前触发lazyload
230 -$(window).scrollTop(1).scrollTop(0); 230 +$(window).scrollTop(1).scrollTop(0);
@@ -29,8 +29,6 @@ var brandsData, @@ -29,8 +29,6 @@ var brandsData,
29 29
30 loading.showLoadingMask(); 30 loading.showLoadingMask();
31 31
32 -  
33 -  
34 lazyLoad($('img.lazy')); 32 lazyLoad($('img.lazy'));
35 $('.yoho-header').css({ 33 $('.yoho-header').css({
36 'z-index': 2, 34 'z-index': 2,
1 -  
2 {{> layout/header}} 1 {{> layout/header}}
3 <div class="yoho-coin-detail-page yoho-page"> 2 <div class="yoho-coin-detail-page yoho-page">
  3 + {{#unless currency}}
  4 + <div class="money">你拥有的有货币:<span>0</span></div>
  5 + {{/unless}}
4 <ul class="coin-detail"></ul> 6 <ul class="coin-detail"></ul>
5 </div> 7 </div>
6 {{> layout/footer}} 8 {{> layout/footer}}
@@ -56,13 +56,9 @@ @@ -56,13 +56,9 @@
56 </span> 56 </span>
57 {{/if}} 57 {{/if}}
58 58
59 - {{#unless isGift}}  
60 <span class="iconfont icon-edit" data-count="{{count}}">&#xe61e;</span> 59 <span class="iconfont icon-edit" data-count="{{count}}">&#xe61e;</span>
61 - {{/unless}}  
62 60
63 - {{#unless isGift}}  
64 <span class="iconfont icon-del" data-count="{{count}}">&#xe621;</span> 61 <span class="iconfont icon-del" data-count="{{count}}">&#xe621;</span>
65 - {{/unless}}  
66 </p> 62 </p>
67 <p class="la-tag row clearfix"> 63 <p class="la-tag row clearfix">
68 {{#if lowStocks}} 64 {{#if lowStocks}}
@@ -369,7 +369,7 @@ class HomeController extends AbstractAction @@ -369,7 +369,7 @@ class HomeController extends AbstractAction
369 if ($id !== null) { // 编辑地址 369 if ($id !== null) { // 编辑地址
370 // 设置网站标题 370 // 设置网站标题
371 $this->setTitle('编辑地址'); 371 $this->setTitle('编辑地址');
372 - $this->setNavHeader('编辑地址'); 372 + $this->setNavHeader('编辑地址', true, false);
373 373
374 $data['id'] = $id; 374 $data['id'] = $id;
375 // 获取特定地址的数据 375 // 获取特定地址的数据
@@ -377,7 +377,7 @@ class HomeController extends AbstractAction @@ -377,7 +377,7 @@ class HomeController extends AbstractAction
377 } else { 377 } else {
378 // 设置网站标题 378 // 设置网站标题
379 $this->setTitle('添加地址'); 379 $this->setTitle('添加地址');
380 - $this->setNavHeader('添加地址'); 380 + $this->setNavHeader('添加地址', true, false);
381 } 381 }
382 382
383 $this->_view->display('address-act', $data); 383 $this->_view->display('address-act', $data);
@@ -457,7 +457,7 @@ class HomeController extends AbstractAction @@ -457,7 +457,7 @@ class HomeController extends AbstractAction
457 { 457 {
458 // 设置网站标题 458 // 设置网站标题
459 $this->setTitle('在线客服'); 459 $this->setTitle('在线客服');
460 - $this->setNavHeader('在线客服', Helpers::url('/home'), SITE_MAIN); 460 + $this->setNavHeader('在线客服', Helpers::url('/home'), false);
461 461
462 $uid = $this->getUid(false); 462 $uid = $this->getUid(false);
463 $service = Home\OnlineModel::getOnlineServiceInfo(); 463 $service = Home\OnlineModel::getOnlineServiceInfo();
@@ -497,7 +497,7 @@ class HomeController extends AbstractAction @@ -497,7 +497,7 @@ class HomeController extends AbstractAction
497 ); 497 );
498 498
499 $this->setTitle('在线客服'); 499 $this->setTitle('在线客服');
500 - $this->setNavHeader($cateName, true, ''); 500 + $this->setNavHeader($cateName, true, false);
501 $this->_view->display('online-service-detail', $service); 501 $this->_view->display('online-service-detail', $service);
502 } 502 }
503 503
@@ -301,31 +301,49 @@ class UserModel @@ -301,31 +301,49 @@ class UserModel
301 301
302 $records = UserData::browseRecord($uid, $udid, $page, $limit); 302 $records = UserData::browseRecord($uid, $udid, $page, $limit);
303 303
304 - if (!$records) {  
305 - $result['walkwayUrl'] = Helpers::url('/product/new');  
306 - $result['noRecord'] = true;  
307 -  
308 - return $result;  
309 - }  
310 -  
311 // 处理数据 304 // 处理数据
312 - if (isset($records['data']['product_list'])) { 305 + do {
  306 + if (!$records) {
  307 + $result['walkwayUrl'] = Helpers::url('/product/new');
  308 + $result['noRecord'] = true;
  309 + break;
  310 + }
  311 +
  312 + if (!isset($records['data']['product_list'])) {
  313 + break;
  314 + }
313 315
314 // 不能再查到结果了 316 // 不能再查到结果了
315 if ($page == 1 && $records['data']['total'] === 0) { 317 if ($page == 1 && $records['data']['total'] === 0) {
316 $result['walkwayUrl'] = Helpers::url('/product/new'); 318 $result['walkwayUrl'] = Helpers::url('/product/new');
317 $result['noRecord'] = true; 319 $result['noRecord'] = true;
318 - } else {  
319 - $data = $records['data']['product_list'];  
320 - foreach ($data as &$val) {  
321 - $val['link'] = Helpers::url('/product/show_' . $val['product_skn'] . '.html');  
322 - $val['image'] = !empty($val['image']) ? Helpers::getImageUrl($val['image'], 447, 596) : '';  
323 - $val['sales_price'] = Helpers::transPrice($val['sales_price']);  
324 - $val['market_price'] = ($val['market_price'] - $val['sales_price'] > 0) ? Helpers::transPrice($val['market_price']) : false; 320 + break;
  321 + }
  322 +
  323 + $data = $records['data']['product_list'];
  324 + $allRecords = array();
  325 + $record = array();
  326 + foreach ($data as &$val) {
  327 + // 排除下架的商品
  328 + if ($val['status'] == 0) {
  329 + continue;
325 } 330 }
326 - !empty($data) && $result['browseRecord'] = $data; 331 +
  332 + $record = array();
  333 + $record['product_name'] = $val['product_name'];
  334 + $record['product_id'] = $val['product_id'];
  335 + $record['link'] = Helpers::url('/product/show_' . $val['product_skn'] . '.html');
  336 + $record['image'] = !empty($val['image']) ? Helpers::getImageUrl($val['image'], 447, 596) : '';
  337 + $record['sales_price'] = Helpers::transPrice($val['sales_price']);
  338 + $record['market_price'] = ($val['market_price'] - $val['sales_price'] > 0) ? Helpers::transPrice($val['market_price']) : false;
  339 + $record['storage'] = $val['storage'];
  340 + $allRecords[] = $record;
327 } 341 }
328 - } 342 +
  343 + if (!empty($allRecords)) {
  344 + $result['browseRecord'] = $allRecords;
  345 + }
  346 + } while(false);
329 347
330 return $result; 348 return $result;
331 } 349 }
@@ -36,7 +36,8 @@ class NewsaleModel @@ -36,7 +36,8 @@ class NewsaleModel
36 36
37 /** 37 /**
38 * 获取新品到着的焦点图资源数据 38 * 获取新品到着的焦点图资源数据
39 - * 39 + *
  40 + * @param int $channel
40 * @return array 41 * @return array
41 */ 42 */
42 public static function getNewFocus($channel) 43 public static function getNewFocus($channel)
@@ -64,7 +65,8 @@ class NewsaleModel @@ -64,7 +65,8 @@ class NewsaleModel
64 65
65 /** 66 /**
66 * 获取折扣专区的焦点图资源数据 67 * 获取折扣专区的焦点图资源数据
67 - * 68 + *
  69 + * @param int $channel
68 * @return array 70 * @return array
69 */ 71 */
70 public static function getSaleFocus($channel) 72 public static function getSaleFocus($channel)
@@ -164,8 +166,8 @@ class NewsaleModel @@ -164,8 +166,8 @@ class NewsaleModel
164 166
165 /** 167 /**
166 * 顶部焦点图缓存控制 168 * 顶部焦点图缓存控制
167 - * @param const $cacheKey 缓存常量值  
168 - * @param const $codeKey 顶部焦点图位置码 169 + * @param string $cacheKey 缓存常量值
  170 + * @param string $codeKey 顶部焦点图位置码
169 * @return array 焦点图数据 171 * @return array 焦点图数据
170 */ 172 */
171 private static function cacheControl($cacheKey, $codeKey) 173 private static function cacheControl($cacheKey, $codeKey)
@@ -219,7 +219,7 @@ class DetailController extends AbstractAction @@ -219,7 +219,7 @@ class DetailController extends AbstractAction
219 } 219 }
220 220
221 $this->setTitle('我要咨询'); 221 $this->setTitle('我要咨询');
222 - $this->setNavHeader('我要咨询'); 222 + $this->setNavHeader('我要咨询', true, false);
223 223
224 $productId = $this->get('product_id', 0); 224 $productId = $this->get('product_id', 0);
225 225
@@ -51,6 +51,7 @@ class NewsaleController extends AbstractAction @@ -51,6 +51,7 @@ class NewsaleController extends AbstractAction
51 $this->setNavHeader('Sale'); 51 $this->setNavHeader('Sale');
52 52
53 $channel = Helpers::getChannelByCookie(); 53 $channel = Helpers::getChannelByCookie();
  54 + $gender = $this->get('gender', '1,2,3');
54 // 设置一些默认参数 55 // 设置一些默认参数
55 $data = array( 56 $data = array(
56 'discountPage' => true, 57 'discountPage' => true,
@@ -59,7 +60,7 @@ class NewsaleController extends AbstractAction @@ -59,7 +60,7 @@ class NewsaleController extends AbstractAction
59 'pageFooter' => true, 60 'pageFooter' => true,
60 'brand' => '0', 61 'brand' => '0',
61 'sort' => '0', 62 'sort' => '0',
62 - 'gender' => Helpers::getGenderByCookie(), 63 + 'gender' => $gender,
63 'price' => '0', 64 'price' => '0',
64 'size' => '0', 65 'size' => '0',
65 'discount' => '0.1,0.9', 66 'discount' => '0.1,0.9',