Authored by uedxwg

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

@@ -22,9 +22,15 @@ class CacheConfig @@ -22,9 +22,15 @@ class CacheConfig
22 const KEY_ACTION_BOYS_BOTTOM_BANNER = 'key_action_boys_bottom_banner'; // 男生首页底部banner 22 const KEY_ACTION_BOYS_BOTTOM_BANNER = 'key_action_boys_bottom_banner'; // 男生首页底部banner
23 const KEY_ACTION_GRILS_BOTTOM_BANNER = 'key_action_girls_bottom_banner';// 女生首页底部banner 23 const KEY_ACTION_GRILS_BOTTOM_BANNER = 'key_action_girls_bottom_banner';// 女生首页底部banner
24 24
25 - const KEY_ACTION_PRODUCT_NEWSALE_INDEX = 'key_action_product_newsale_index'; // 新品到着  
26 - const KEY_ACTION_PRODUCT_NEWSALE_DISCOUNT = 'key_action_product_newsale_discount'; // 热卖排行  
27 - 25 + const KEY_ACTION_PRODUCT_NEWSALE_INDEX_BOYS = 'key_action_product_newsale_index_boys'; // 男生新品到着
  26 + const KEY_ACTION_PRODUCT_NEWSALE_INDEX_GIRLS = 'key_action_product_newsale_index_girls'; // 女生新品到着
  27 + const KEY_ACTION_PRODUCT_NEWSALE_INDEX_KIDS = 'key_action_product_newsale_index_kids'; // 潮童新品到着
  28 + const KEY_ACTION_PRODUCT_NEWSALE_INDEX_LIFESTYLE = 'key_action_product_newsale_index_lifestyle'; // 创意生活新品到着
  29 + const KEY_ACTION_PRODUCT_NEWSALE_DISCOUNT_BOYS = 'key_action_product_newsale_discount_boys'; // 男生热卖排行
  30 + const KEY_ACTION_PRODUCT_NEWSALE_DISCOUNT_GIRLS = 'key_action_product_newsale_discount_girls'; // 女生热卖排行
  31 + const KEY_ACTION_PRODUCT_NEWSALE_DISCOUNT_KIDS = 'key_action_product_newsale_discount_kids'; // 潮童热卖排行
  32 + const KEY_ACTION_PRODUCT_NEWSALE_DISCOUNT_LIFESTYLE = 'key_action_product_newsale_discount_lifestyle'; // 创意生活热卖排行
  33 +
28 const KEY_ACTION_PRODUCT_INDEX = 'key_action_product_index'; // 品类商品列表 34 const KEY_ACTION_PRODUCT_INDEX = 'key_action_product_index'; // 品类商品列表
29 const KEY_ACTION_PRODUCT_BRAND = 'key_action_product_brand'; // 品类商品列表 35 const KEY_ACTION_PRODUCT_BRAND = 'key_action_product_brand'; // 品类商品列表
30 const KEY_ACTION_PRODUCT_BRAND_DOMAINS = 'key_action_product_brand_domains'; // 所有品牌域名列表 36 const KEY_ACTION_PRODUCT_BRAND_DOMAINS = 'key_action_product_brand_domains'; // 所有品牌域名列表
@@ -99,6 +99,7 @@ class NewsaleData @@ -99,6 +99,7 @@ class NewsaleData
99 $param['method'] = 'app.search.newProduct'; 99 $param['method'] = 'app.search.newProduct';
100 } else { 100 } else {
101 $param['method'] = 'app.search.sales'; 101 $param['method'] = 'app.search.sales';
  102 + $param['p_d'] = '0.1,0.9';
102 } 103 }
103 $param['page'] = $page; 104 $param['page'] = $page;
104 $param['limit'] = $limit; 105 $param['limit'] = $limit;
@@ -269,7 +269,9 @@ class FloorProcess @@ -269,7 +269,9 @@ class FloorProcess
269 269
270 foreach ($data as $key => &$value) { 270 foreach ($data as $key => &$value) {
271 if ($key == 'title') { 271 if ($key == 'title') {
272 - $value['more_url'] = Helpers::url('', array('id' => 4, 'gender' => self::$channel[$type]), 'guang'); 272 + $urlParam = array('id' => 4);
  273 + isset(self::$channel[$type]) && $urlParam['gender'] = self::$channel[$type];
  274 + $value['more_url'] = Helpers::url('', $urlParam, 'guang');
273 } 275 }
274 if ($key == 'list') { 276 if ($key == 'list') {
275 foreach ($value as &$one) { 277 foreach ($value as &$one) {
@@ -138,7 +138,7 @@ $('.maybe-like p').on('touchstart', function(e) { @@ -138,7 +138,7 @@ $('.maybe-like p').on('touchstart', function(e) {
138 }); 138 });
139 139
140 function scrollHandler() { 140 function scrollHandler() {
141 - if ($(window).scrollTop() + winH >= $(document).height() - 50) { 141 + if ($(window).scrollTop() + winH >= $(document).height() - 200) {
142 search(); 142 search();
143 } 143 }
144 } 144 }
@@ -83,12 +83,20 @@ $loginBtn.on('touchstart', function() { @@ -83,12 +83,20 @@ $loginBtn.on('touchstart', function() {
83 password: pwd 83 password: pwd
84 }, 84 },
85 success: function(data) { 85 success: function(data) {
  86 + var res;
  87 +
86 if (data.code === 200) { 88 if (data.code === 200) {
  89 + res = data.data;
87 showErrTip('登录成功'); 90 showErrTip('登录成功');
88 91
  92 + $.ajax({
  93 + url: res.session,
  94 + dataType: 'jsonp'
  95 + });
  96 +
89 //1000ms后跳转页面 97 //1000ms后跳转页面
90 setTimeout(function() { 98 setTimeout(function() {
91 - location.href = data.data; 99 + location.href = res.href;
92 }, 1000); 100 }, 1000);
93 } else { 101 } else {
94 showErrTip(data.message); 102 showErrTip(data.message);
@@ -86,12 +86,21 @@ $loginBtn.on('touchstart', function() { @@ -86,12 +86,21 @@ $loginBtn.on('touchstart', function() {
86 password: pwd 86 password: pwd
87 }, 87 },
88 success: function(data) { 88 success: function(data) {
  89 + var res;
  90 +
89 if (data.code === 200) { 91 if (data.code === 200) {
  92 + res = data.data;
  93 +
90 showErrTip('登录成功'); 94 showErrTip('登录成功');
91 95
  96 + $.ajax({
  97 + url: res.session,
  98 + dataType: 'jsonp'
  99 + });
  100 +
92 //1s后跳转页面 101 //1s后跳转页面
93 setTimeout(function() { 102 setTimeout(function() {
94 - location.href = data.data; 103 + location.href = res.href;
95 }, 1000); 104 }, 1000);
96 } else { 105 } else {
97 showErrTip(data.message); 106 showErrTip(data.message);
@@ -46,12 +46,20 @@ $btnSure.on('touchstart', function() { @@ -46,12 +46,20 @@ $btnSure.on('touchstart', function() {
46 token: $('#token').val() 46 token: $('#token').val()
47 }, 47 },
48 success: function(data) { 48 success: function(data) {
  49 + var res;
  50 +
49 if (data.code === 200) { 51 if (data.code === 200) {
  52 + res = data.data;
50 showErrTip('注册成功'); 53 showErrTip('注册成功');
51 54
  55 + $.ajax({
  56 + url: res.session,
  57 + dataType: 'jsonp'
  58 + });
  59 +
52 //1000ms后跳转页面 60 //1000ms后跳转页面
53 setTimeout(function() { 61 setTimeout(function() {
54 - location.href = data.data; 62 + location.href = res.href;
55 }, 1000); 63 }, 1000);
56 } else { 64 } else {
57 showErrTip(data.message); 65 showErrTip(data.message);
@@ -38,7 +38,7 @@ if (0 === $('.goodsDiscount .discount-folder').children().length) { @@ -38,7 +38,7 @@ if (0 === $('.goodsDiscount .discount-folder').children().length) {
38 } 38 }
39 39
40 //goods-discount下拉按钮点击事件 40 //goods-discount下拉按钮点击事件
41 -$('.goodsDiscount .dropdown').on('touchend', function(e) { 41 +$('.goodsDiscount').on('touchend', function(e) {
42 if ($discountFolder.is(':hidden')) { 42 if ($discountFolder.is(':hidden')) {
43 $discountArrow.removeClass('icon-down').addClass('icon-up').html(''); 43 $discountArrow.removeClass('icon-down').addClass('icon-up').html('');
44 $discountFolder.slideDown(); 44 $discountFolder.slideDown();
@@ -425,6 +425,13 @@ if ($brandHeader.length > 0) { @@ -425,6 +425,13 @@ if ($brandHeader.length > 0) {
425 success: function(data) { 425 success: function(data) {
426 if (data.code === 200) { 426 if (data.code === 200) {
427 $this.toggleClass('coled'); 427 $this.toggleClass('coled');
  428 +
  429 + //提示
  430 + if (opt === 'ok') {
  431 + tip.show('添加收藏成功');
  432 + } else {
  433 + tip.show('取消收藏成功');
  434 + }
428 } else if (data.code === 400) { 435 } else if (data.code === 400) {
429 location.href = data.data;//未登录跳转登录页 436 location.href = data.data;//未登录跳转登录页
430 } else { 437 } else {
@@ -204,6 +204,7 @@ @@ -204,6 +204,7 @@
204 position: absolute; 204 position: absolute;
205 top: 20rem / $pxConvertRem; 205 top: 20rem / $pxConvertRem;
206 right: 30rem / $pxConvertRem; 206 right: 30rem / $pxConvertRem;
  207 + text-align: right;
207 } 208 }
208 209
209 .price { 210 .price {
@@ -216,4 +217,8 @@ @@ -216,4 +217,8 @@
216 text-align: right; 217 text-align: right;
217 line-height: 45rem / $pxConvertRem; 218 line-height: 45rem / $pxConvertRem;
218 } 219 }
  220 +
  221 + .appear-date {
  222 + color: #f00;
  223 + }
219 } 224 }
@@ -31,6 +31,8 @@ $basicBtnC:#eb0313; @@ -31,6 +31,8 @@ $basicBtnC:#eb0313;
31 margin-bottom: pxToRem(20px); 31 margin-bottom: pxToRem(20px);
32 font-size: pxToRem(24px); 32 font-size: pxToRem(24px);
33 line-height: pxToRem(36px); 33 line-height: pxToRem(36px);
  34 + display: flex;
  35 + flex-wrap: wrap;
34 &.table { 36 &.table {
35 width: 100%; 37 width: 100%;
36 .column { 38 .column {
@@ -42,6 +44,8 @@ $basicBtnC:#eb0313; @@ -42,6 +44,8 @@ $basicBtnC:#eb0313;
42 font-size: pxToRem(24px); 44 font-size: pxToRem(24px);
43 background-color: $tableCellC; 45 background-color: $tableCellC;
44 float: left; 46 float: left;
  47 + display: flex;
  48 + align-items: center;
45 } 49 }
46 } 50 }
47 } 51 }
@@ -135,10 +139,13 @@ $basicBtnC:#eb0313; @@ -135,10 +139,13 @@ $basicBtnC:#eb0313;
135 // overflow: hidden; 139 // overflow: hidden;
136 } 140 }
137 .banner-top-single{ 141 .banner-top-single{
138 -  
139 - width: pxToRem(448px);  
140 - margin:pxToRem(30px) pxToRem(72px); 142 + margin:0 auto;
141 overflow: hidden; 143 overflow: hidden;
  144 + img{
  145 + width: pxToRem(448px);
  146 + margin-top:pxToRem(30px);
  147 + margin-bottom:pxToRem(30px);
  148 + }
142 } 149 }
143 .banner-top { 150 .banner-top {
144 // width: 100%; 151 // width: 100%;
@@ -9,25 +9,17 @@ @@ -9,25 +9,17 @@
9 </div> 9 </div>
10 </div> 10 </div>
11 11
12 - {{# bannerTop}}  
13 - {{> home/banner_top}}  
14 - {{/ bannerTop}} 12 + {{# topData}}
  13 + {{! 头部banner}}
  14 + {{# bannerTop}}
  15 + {{> home/banner_top}}
  16 + {{/ bannerTop}}
15 17
16 - {{# hotBrand}}  
17 - <div class="hot-brand">  
18 - <ul class="hot-brand-list clearfix">  
19 - {{# list}}  
20 - <li>  
21 - <a href="{{url}}">  
22 - <div class="img-box">  
23 - <img class="lazy" data-original="{{img}}" alt="">  
24 - </div>  
25 - </a>  
26 - </li>  
27 - {{/ list}}  
28 - </ul>  
29 - </div>  
30 - {{/ hotBrand}} 18 + {{! 热门品牌可滑动}}
  19 + {{# hotBrandsScroll}}
  20 + {{> home/hot_brands_swipe}}
  21 + {{/ hotBrandsScroll}}
  22 + {{/ topData}}
31 23
32 {{# brandList}} 24 {{# brandList}}
33 <div class="brand-list bar-{{@index}}"> 25 <div class="brand-list bar-{{@index}}">
1 -<div class="order-good" data-id={{id}}> 1 +<div class="order-good" data-id="{{id}}">
2 <div class="thumb-wrap"> 2 <div class="thumb-wrap">
3 - <img class="thumb lazy" data-original={{thumb}}> 3 + <img class="thumb lazy" data-original="{{thumb}}">
4 <p class="tag{{#if gift}} gift-tag{{/if}}{{#if advanceBuy}} advance-buy-tag{{/if}}"></p> 4 <p class="tag{{#if gift}} gift-tag{{/if}}{{#if advanceBuy}} advance-buy-tag{{/if}}"></p>
5 </div> 5 </div>
6 <div class="deps"> 6 <div class="deps">
@@ -25,6 +25,9 @@ @@ -25,6 +25,9 @@
25 <span class="count"> 25 <span class="count">
26 ×{{count}} 26 ×{{count}}
27 </span> 27 </span>
  28 + {{#if appearDate}}
  29 + <span class="appear-date">上市期:{{appearDate}}</span>
  30 + {{/if}}
28 </p> 31 </p>
29 </div> 32 </div>
30 </div> 33 </div>
@@ -50,7 +50,7 @@ @@ -50,7 +50,7 @@
50 {{/ consults}} 50 {{/ consults}}
51 </div> 51 </div>
52 <div class="consult-content-footer"> 52 <div class="consult-content-footer">
53 - <a href="/product/detail/consults"> 53 + <a href="{{link}}">
54 查看更多 54 查看更多
55 <span class="iconfont">&#xe604;</span></a> 55 <span class="iconfont">&#xe604;</span></a>
56 </div> 56 </div>
@@ -462,12 +462,18 @@ class HomeController extends AbstractAction @@ -462,12 +462,18 @@ class HomeController extends AbstractAction
462 */ 462 */
463 public function onlineServiceDetailAction() 463 public function onlineServiceDetailAction()
464 { 464 {
465 - $service = array(); 465 + $service = array();
466 $cateId = $this->get('cateId', 0); 466 $cateId = $this->get('cateId', 0);
467 $cateName = $this->get('cateName', ''); 467 $cateName = $this->get('cateName', '');
468 if ($cateId > 0) { 468 if ($cateId > 0) {
469 $service = Home\OnlineModel::getOnlineServiceDetail($cateId); 469 $service = Home\OnlineModel::getOnlineServiceDetail($cateId);
470 } 470 }
  471 +
  472 + $service = array(
  473 + 'header' => array('title' => '在线客服'),
  474 + 'service' => $service
  475 + );
  476 +
471 $this->setTitle('在线客服'); 477 $this->setTitle('在线客服');
472 $this->setNavHeader($cateName, true, ''); 478 $this->setNavHeader($cateName, true, '');
473 $this->_view->display('online-service-detail', $service); 479 $this->_view->display('online-service-detail', $service);
@@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
3 namespace Category; 3 namespace Category;
4 4
5 use LibModels\Wap\Category\BrandData; 5 use LibModels\Wap\Category\BrandData;
  6 +use Plugin\DataProcess\FloorProcess;
6 use Plugin\Helpers; 7 use Plugin\Helpers;
7 8
8 /** 9 /**
@@ -60,55 +61,8 @@ class BrandModel @@ -60,55 +61,8 @@ class BrandModel
60 // 搜索链接地址 61 // 搜索链接地址
61 $result['searchUrl'] = Helpers::url('/brands/search', null); 62 $result['searchUrl'] = Helpers::url('/brands/search', null);
62 63
63 - /* 顶部的轮翻广告或热门品牌列表(当没有轮翻广告的情况下会是这个样子的! 此处是根据接口改造成的逻辑) */  
64 - if (!empty($brand['brandTop'][0]['data']['list'])) {  
65 - $build = array();  
66 - foreach ($brand['brandTop'][0]['data']['list'] as $value) {  
67 - if (isset($value['url'])) {  
68 - $build['url'] = Helpers::getFilterUrl($value['url']);  
69 - }  
70 - $build['img'] = Helpers::getImageUrl($value['src'], 144, 144);  
71 - $build['name'] = $value['name'];  
72 - $result['hotBrand']['list'][] = $build;  
73 - }  
74 - }  
75 - // 顶部的轮翻广告列表  
76 - elseif (!empty($brand['brandTop'][0]['data'])) {  
77 - $build = array();  
78 - foreach ($brand['brandTop'][0]['data'] as $value) {  
79 - if (isset($value['url'])) {  
80 - $build['url'] = Helpers::getFilterUrl($value['url']);  
81 - }  
82 - $build['img'] = Helpers::getImageUrl($value['src'], 640, 310);  
83 - $build['title'] = $value['title'];  
84 - $result['bannerTop']['list'][] = $build;  
85 - }  
86 - }  
87 - // 顶部的轮翻广告列表  
88 - elseif (!empty($brand['brandTop']['list'][0]['data'])) {  
89 - $build = array();  
90 - foreach ($brand['brandTop']['list'][0]['data'] as $value) {  
91 - if (isset($value['url'])) {  
92 - $build['url'] = Helpers::getFilterUrl($value['url']);  
93 - }  
94 - $build['img'] = Helpers::getImageUrl($value['src'], 640, 310);  
95 - $build['title'] = $value['title'];  
96 - $result['bannerTop']['list'][] = $build;  
97 - }  
98 - }  
99 -  
100 - /* 顶部的热门品牌列表 (备注: 当没有轮翻广告的时候,此处内部的foreach不会被执行) */  
101 - if (!empty($brand['brandTop'][1]['data']['list'])) {  
102 - $build = array();  
103 - foreach ($brand['brandTop'][1]['data']['list'] as $value) {  
104 - if (isset($value['url'])) {  
105 - $build['url'] = Helpers::getFilterUrl($value['url']);  
106 - }  
107 - $build['img'] = Helpers::getImageUrl($value['src'], 144, 144);  
108 - $build['name'] = $value['name'];  
109 - $result['hotBrand']['list'][] = $build;  
110 - }  
111 - } 64 + // 资源位处理
  65 + $result['topData'] = FloorProcess::getContent(array('list' => $brand['brandTop']), $channel);
112 66
113 /* 按字母'A-Z'分组的品牌列表 */ 67 /* 按字母'A-Z'分组的品牌列表 */
114 if (!empty($brand['brandList']['brands'])) { 68 if (!empty($brand['brandList']['brands'])) {
@@ -70,21 +70,17 @@ class OnlineModel @@ -70,21 +70,17 @@ class OnlineModel
70 return $result; 70 return $result;
71 } 71 }
72 $res = OnlineData::getOnlineServiceDetail($cateId, $clinetType); 72 $res = OnlineData::getOnlineServiceDetail($cateId, $clinetType);
73 - $questionInfo = $res['data'];  
74 - if ($questionInfo) { 73 + if (isset($res['code']) && $res['code'] === 200) {
  74 + $questionInfo = $res['data'];
75 $list = array(); 75 $list = array();
76 - if ($questionInfo) {  
77 - foreach ($questionInfo as $qk => $qv) {  
78 - $list[$qk]['q'] = $qv['title'];  
79 - $list[$qk]['a'] = $qv['content'];  
80 - } 76 + foreach ($questionInfo as $qk => $qv) {
  77 + $list[$qk]['q'] = $qv['title'];
  78 + $list[$qk]['a'] = $qv['content'];
81 } 79 }
82 - //处理返回信息  
83 - $result = array(  
84 - 'header' => array('title' => '在线客服'),  
85 - 'list' => $list  
86 - ); 80 +
  81 + !empty($list) && $result['list'] = $list;
87 } 82 }
  83 +
88 return $result; 84 return $result;
89 } 85 }
90 86
@@ -27,7 +27,7 @@ class HomeModel @@ -27,7 +27,7 @@ class HomeModel
27 /* 女生楼层资源的位置码 */ 27 /* 女生楼层资源的位置码 */
28 const CODE_FLOOR_GIRLS = '189b6686065dbd6755dd6906cf03c002'; 28 const CODE_FLOOR_GIRLS = '189b6686065dbd6755dd6906cf03c002';
29 /* 潮童楼层资源的位置码 */ 29 /* 潮童楼层资源的位置码 */
30 - const CODE_FLOOR_KIDS = 'b8c1bff53d4ea60f978926d538620636'; // '66cad79d93e055ad6fc5c8744086066d'; 30 + const CODE_FLOOR_KIDS = '66cad79d93e055ad6fc5c8744086066d'; // '66cad79d93e055ad6fc5c8744086066d';
31 /* 创意生活楼层资源的位置码 */ 31 /* 创意生活楼层资源的位置码 */
32 const CODE_FLOOR_LIFESTYLE = '61cd852c6afcf60660196154f66a3a62'; 32 const CODE_FLOOR_LIFESTYLE = '61cd852c6afcf60660196154f66a3a62';
33 33
@@ -98,8 +98,8 @@ class HomeModel @@ -98,8 +98,8 @@ class HomeModel
98 98
99 // 调用接口获取数据 99 // 调用接口获取数据
100 $banner = IndexData::getBannerStart(self::CODE_BG); 100 $banner = IndexData::getBannerStart(self::CODE_BG);
101 - if (isset($banner['code']) && $banner['code'] == 200 && $banner['data']['total'] > 0) {  
102 - $result = Helpers::getImageUrl($banner['data']['list'][0]['data']['list'][0]['src'], 640, 800, 2); 101 + if (isset($banner['code']) && $banner['code'] == 200 && !empty($banner['data'])) {
  102 + $result = Helpers::getImageUrl($banner['data'][0]['data']['list'][0]['src'], 640, 800, 2);
103 } 103 }
104 104
105 if (USE_CACHE) { 105 if (USE_CACHE) {
@@ -142,10 +142,10 @@ class HomeModel @@ -142,10 +142,10 @@ class HomeModel
142 142
143 // 调用接口获取数据 143 // 调用接口获取数据
144 $banner = IndexData::getBannerStart($resource); 144 $banner = IndexData::getBannerStart($resource);
145 - if (isset($banner['code']) && $banner['code'] == 200 && $banner['data']['total'] > 0) { 145 + if (isset($banner['code']) && $banner['code'] == 200 && !empty($banner['data'])) {
146 $result = array(); 146 $result = array();
147 // 处理数据 147 // 处理数据
148 - foreach ($banner['data']['list'] as $val) { 148 + foreach ($banner['data'] as $val) {
149 foreach ($val['data'] as $single) { 149 foreach ($val['data'] as $single) {
150 $result['url'] = ($channel === 2) ? Helpers::url('/boys') : Helpers::url('/girls'); 150 $result['url'] = ($channel === 2) ? Helpers::url('/boys') : Helpers::url('/girls');
151 $result['img'] = Helpers::getImageUrl($single['src'], 640, 200); 151 $result['img'] = Helpers::getImageUrl($single['src'], 640, 200);
@@ -178,7 +178,7 @@ class UserModel @@ -178,7 +178,7 @@ class UserModel
178 foreach ($favProduct['data']['product_list'] as $val) { 178 foreach ($favProduct['data']['product_list'] as $val) {
179 $product = array(); 179 $product = array();
180 $product['fav_id'] = $val['product_id']; 180 $product['fav_id'] = $val['product_id'];
181 - $product['link'] = isset($val['goodsId']) ? Helpers::url('/product/pro_' . $val['product_skn'] . '_' . $val['goodsId'] . '/' . $val['cnAlphabet'] . '.html') : ''; 181 + $product['link'] = isset($val['goodsId']) ? Helpers::url('/product/pro_' . $val['product_id'] . '_' . $val['goodsId'] . '/' . $val['cnAlphabet'] . '.html') : '';
182 $product['imgUrl'] = Helpers::getImageUrl($val['image'], 447, 596); 182 $product['imgUrl'] = Helpers::getImageUrl($val['image'], 447, 596);
183 ; 183 ;
184 $product['title'] = $val['product_name']; 184 $product['title'] = $val['product_name'];
@@ -231,13 +231,13 @@ class UserModel @@ -231,13 +231,13 @@ class UserModel
231 $brand['brandName'] = $val['brand_name']; 231 $brand['brandName'] = $val['brand_name'];
232 $brand['update'] = $val['new_product_num']; 232 $brand['update'] = $val['new_product_num'];
233 $brand['discount'] = $val['product_discount_num']; 233 $brand['discount'] = $val['product_discount_num'];
234 - $brand['link'] = Helpers::url('', array('query' => $val['brand_name']), 'search'); 234 + $brand['link'] = Helpers::url('', array(), $val['brand_domain']);
235 235
236 // 处理品牌产品 236 // 处理品牌产品
237 $product = array(); 237 $product = array();
238 foreach ($val['new_product'] as $one) { 238 foreach ($val['new_product'] as $one) {
239 $product = array(); 239 $product = array();
240 - $product['link'] = isset($val['goodsId']) ? Helpers::url('/product/pro_' . $val['product_skn'] . '_' . $val['goodsId'] . '/' . $val['cnAlphabet'] . '.html') : ''; 240 + $product['link'] = isset($val['goodsId']) ? Helpers::url('/product/pro_' . $val['product_id'] . '_' . $val['goodsId'] . '/' . $val['cnAlphabet'] . '.html') : '';
241 $product['imgUrl'] = (isset($one['default_images']) && !empty($one['default_images'])) ? Images::getImageUrl($one['default_images'], 235, 314) : ''; 241 $product['imgUrl'] = (isset($one['default_images']) && !empty($one['default_images'])) ? Images::getImageUrl($one['default_images'], 235, 314) : '';
242 $product['price'] = !empty($one['market_price']) ? '¥' . $one['market_price'] : 0; 242 $product['price'] = !empty($one['market_price']) ? '¥' . $one['market_price'] : 0;
243 $product['discount'] = !empty($one['sales_price']) ? '¥' . $one['sales_price'] : 0; 243 $product['discount'] = !empty($one['sales_price']) ? '¥' . $one['sales_price'] : 0;
@@ -380,7 +380,6 @@ class DetailModel @@ -380,7 +380,6 @@ class DetailModel
380 'desc' => strtr($productIntro, array( 380 'desc' => strtr($productIntro, array(
381 '\r\n\t' => '', 381 '\r\n\t' => '',
382 '</p>' => '', 382 '</p>' => '',
383 - '<br />' => "\r\n",  
384 '<img src=' => "<img class=\"lazy\" src=\"data:image/gif;base64,R0lGODlhAQABAJEAAAAAAP///93d3f///yH5BAEAAAMALAAAAAABAAEAAAICVAEAOw==\" data-original=", 383 '<img src=' => "<img class=\"lazy\" src=\"data:image/gif;base64,R0lGODlhAQABAJEAAAAAAP///93d3f///yH5BAEAAAMALAAAAAABAAEAAAICVAEAOw==\" data-original=",
385 )), 384 )),
386 ); 385 );
@@ -46,16 +46,16 @@ class NewsaleModel @@ -46,16 +46,16 @@ class NewsaleModel
46 /* 根据频道调用接口 */ 46 /* 根据频道调用接口 */
47 switch (intval($channel)) { 47 switch (intval($channel)) {
48 case 1: // 男生 48 case 1: // 男生
49 - $result = self::cacheControl(CacheConfig::KEY_ACTION_PRODUCT_NEWSALE_INDEX, self::CODE_TOP_NEW_BOYS); 49 + $result = self::cacheControl(CacheConfig::KEY_ACTION_PRODUCT_NEWSALE_INDEX_BOYS, self::CODE_TOP_NEW_BOYS);
50 break; 50 break;
51 case 2: // 女生 51 case 2: // 女生
52 - $result = self::cacheControl(CacheConfig::KEY_ACTION_PRODUCT_NEWSALE_INDEX, self::CODE_TOP_NEW_GIRLS); 52 + $result = self::cacheControl(CacheConfig::KEY_ACTION_PRODUCT_NEWSALE_INDEX_GIRLS, self::CODE_TOP_NEW_GIRLS);
53 break; 53 break;
54 case 3: // 潮童 54 case 3: // 潮童
55 - $result = self::cacheControl(CacheConfig::KEY_ACTION_PRODUCT_NEWSALE_INDEX, self::CODE_TOP_NEW_KIDS); 55 + $result = self::cacheControl(CacheConfig::KEY_ACTION_PRODUCT_NEWSALE_INDEX_KIDS, self::CODE_TOP_NEW_KIDS);
56 break; 56 break;
57 case 4: // 创意生活 57 case 4: // 创意生活
58 - $result = self::cacheControl(CacheConfig::KEY_ACTION_PRODUCT_NEWSALE_INDEX, self::CODE_TOP_NEW_LIFESTYLE); 58 + $result = self::cacheControl(CacheConfig::KEY_ACTION_PRODUCT_NEWSALE_INDEX_LIFESTYLE, self::CODE_TOP_NEW_LIFESTYLE);
59 break; 59 break;
60 } 60 }
61 61
@@ -74,16 +74,16 @@ class NewsaleModel @@ -74,16 +74,16 @@ class NewsaleModel
74 /* 根据频道调用接口 */ 74 /* 根据频道调用接口 */
75 switch (intval($channel)) { 75 switch (intval($channel)) {
76 case 1: // 男生 76 case 1: // 男生
77 - $result = self::cacheControl(CacheConfig::KEY_ACTION_PRODUCT_NEWSALE_DISCOUNT, self::CODE_TOP_SALE_BOYS); 77 + $result = self::cacheControl(CacheConfig::KEY_ACTION_PRODUCT_NEWSALE_DISCOUNT_BOYS, self::CODE_TOP_SALE_BOYS);
78 break; 78 break;
79 case 2: // 女生 79 case 2: // 女生
80 - $result = self::cacheControl(CacheConfig::KEY_ACTION_PRODUCT_NEWSALE_DISCOUNT, self::CODE_TOP_SALE_GIRLS); 80 + $result = self::cacheControl(CacheConfig::KEY_ACTION_PRODUCT_NEWSALE_DISCOUNT_GIRLS, self::CODE_TOP_SALE_GIRLS);
81 break; 81 break;
82 case 3: // 潮童 82 case 3: // 潮童
83 - $result = self::cacheControl(CacheConfig::KEY_ACTION_PRODUCT_NEWSALE_DISCOUNT, self::CODE_TOP_SALE_KIDS); 83 + $result = self::cacheControl(CacheConfig::KEY_ACTION_PRODUCT_NEWSALE_DISCOUNT_KIDS, self::CODE_TOP_SALE_KIDS);
84 break; 84 break;
85 case 4: // 创意生活 85 case 4: // 创意生活
86 - $result = self::cacheControl(CacheConfig::KEY_ACTION_PRODUCT_NEWSALE_DISCOUNT, self::CODE_TOP_SALE_LIFESTYLE); 86 + $result = self::cacheControl(CacheConfig::KEY_ACTION_PRODUCT_NEWSALE_DISCOUNT_LIFESTYLE, self::CODE_TOP_SALE_LIFESTYLE);
87 break; 87 break;
88 } 88 }
89 89
@@ -183,11 +183,11 @@ class NewsaleModel @@ -183,11 +183,11 @@ class NewsaleModel
183 $newsale = NewsaleData::getNewsaleFocus($codeKey); 183 $newsale = NewsaleData::getNewsaleFocus($codeKey);
184 184
185 // 调用接口获取数据并封装 185 // 调用接口获取数据并封装
186 - if (isset($newsale['code']) && !empty($newsale['data']['list'])) {  
187 - if(count($newsale['data']['list'][0]['data']) === 1) {  
188 - $result = Helpers::formatBanner($newsale['data']['list'][0]['data'][0], 640, 240); 186 + if (isset($newsale['code']) && !empty($newsale['data'])) {
  187 + if(count($newsale['data'][0]['data']) === 1) {
  188 + $result = Helpers::formatBanner($newsale['data'][0]['data'][0], 640, 240);
189 } else { 189 } else {
190 - foreach ($newsale['data']['list'][0]['data'] as $one) { 190 + foreach ($newsale['data'][0]['data'] as $one) {
191 $result['list'][] = Helpers::formatBanner($one, 640, 240); 191 $result['list'][] = Helpers::formatBanner($one, 640, 240);
192 } 192 }
193 } 193 }