Showing
4 changed files
with
18 additions
and
7 deletions
@@ -62,11 +62,13 @@ class IndexController extends WebAction | @@ -62,11 +62,13 @@ class IndexController extends WebAction | ||
62 | 62 | ||
63 | //统计前三个商品 | 63 | //统计前三个商品 |
64 | $skn=array(); | 64 | $skn=array(); |
65 | + $arr=array(); | ||
65 | if (isset($data['goods']) && !empty($data['goods'])) { | 66 | if (isset($data['goods']) && !empty($data['goods'])) { |
66 | $arr = array_slice($data['goods'],0,3); | 67 | $arr = array_slice($data['goods'],0,3); |
67 | foreach ($arr as $key=>$value) { | 68 | foreach ($arr as $key=>$value) { |
68 | $skn[] = $value['skn']; | 69 | $skn[] = $value['skn']; |
69 | } | 70 | } |
71 | + $arr = array('skn'=>$skn); | ||
70 | } | 72 | } |
71 | 73 | ||
72 | $seo = $data['seo']; | 74 | $seo = $data['seo']; |
@@ -74,7 +76,7 @@ class IndexController extends WebAction | @@ -74,7 +76,7 @@ class IndexController extends WebAction | ||
74 | //初始化js | 76 | //初始化js |
75 | 'brandPage' => true, | 77 | 'brandPage' => true, |
76 | 'list' => $data, | 78 | 'list' => $data, |
77 | - 'skn' => $skn | 79 | + 'criteo' => $arr |
78 | ); | 80 | ); |
79 | $this->setBrandSeo($seo); | 81 | $this->setBrandSeo($seo); |
80 | $this->setWebNavHeader(); | 82 | $this->setWebNavHeader(); |
@@ -23,7 +23,6 @@ class ListController extends WebAction | @@ -23,7 +23,6 @@ class ListController extends WebAction | ||
23 | 'action' => 'index', | 23 | 'action' => 'index', |
24 | 'adsId' => '79', | 24 | 'adsId' => '79', |
25 | )); | 25 | )); |
26 | - | ||
27 | // 设置SEO信息 | 26 | // 设置SEO信息 |
28 | $this->setListSeo($list['seo']); | 27 | $this->setListSeo($list['seo']); |
29 | /// 设置头部数据 | 28 | /// 设置头部数据 |
@@ -31,18 +30,20 @@ class ListController extends WebAction | @@ -31,18 +30,20 @@ class ListController extends WebAction | ||
31 | 30 | ||
32 | //统计前三个商品 | 31 | //统计前三个商品 |
33 | $skn=array(); | 32 | $skn=array(); |
33 | + $arr=array(); | ||
34 | if (isset($list['goods']) && !empty($list['goods'])) { | 34 | if (isset($list['goods']) && !empty($list['goods'])) { |
35 | $arr = array_slice($list['goods'],0,3); | 35 | $arr = array_slice($list['goods'],0,3); |
36 | foreach ($arr as $key=>$value) { | 36 | foreach ($arr as $key=>$value) { |
37 | $skn[] = $value['skn']; | 37 | $skn[] = $value['skn']; |
38 | } | 38 | } |
39 | + $arr = array('skn'=>$skn); | ||
39 | } | 40 | } |
40 | 41 | ||
41 | // 渲染模板 | 42 | // 渲染模板 |
42 | $this->_view->display('list', array( | 43 | $this->_view->display('list', array( |
43 | 'productListPage' => true, // JS控制初始化 | 44 | 'productListPage' => true, // JS控制初始化 |
44 | 'list' => $list, | 45 | 'list' => $list, |
45 | - 'skn' => $skn | 46 | + 'criteo' => $arr |
46 | )); | 47 | )); |
47 | } | 48 | } |
48 | 49 | ||
@@ -64,17 +65,19 @@ class ListController extends WebAction | @@ -64,17 +65,19 @@ class ListController extends WebAction | ||
64 | 65 | ||
65 | //统计前三个商品 | 66 | //统计前三个商品 |
66 | $skn=array(); | 67 | $skn=array(); |
68 | + $arr=array(); | ||
67 | if (isset($newData['goods']) && !empty($newData['goods'])) { | 69 | if (isset($newData['goods']) && !empty($newData['goods'])) { |
68 | $arr = array_slice($newData['goods'],0,3); | 70 | $arr = array_slice($newData['goods'],0,3); |
69 | foreach ($arr as $key=>$value) { | 71 | foreach ($arr as $key=>$value) { |
70 | $skn[] = $value['skn']; | 72 | $skn[] = $value['skn']; |
71 | } | 73 | } |
74 | + $arr = array('skn'=>$skn); | ||
72 | } | 75 | } |
73 | 76 | ||
74 | $data = array( | 77 | $data = array( |
75 | 'productListPage' => true, | 78 | 'productListPage' => true, |
76 | 'newSale' => $newData, | 79 | 'newSale' => $newData, |
77 | - 'skn' => $skn | 80 | + 'criteo' => $arr |
78 | ); | 81 | ); |
79 | // 设置SEO信息 | 82 | // 设置SEO信息 |
80 | $this->setNewSeo($newData['seo']); | 83 | $this->setNewSeo($newData['seo']); |
@@ -102,18 +105,20 @@ class ListController extends WebAction | @@ -102,18 +105,20 @@ class ListController extends WebAction | ||
102 | 105 | ||
103 | //统计前三个商品 | 106 | //统计前三个商品 |
104 | $skn=array(); | 107 | $skn=array(); |
108 | + $arr=array(); | ||
105 | if (isset($list['goods']) && !empty($list['goods'])) { | 109 | if (isset($list['goods']) && !empty($list['goods'])) { |
106 | $arr = array_slice($list['goods'],0,3); | 110 | $arr = array_slice($list['goods'],0,3); |
107 | foreach ($arr as $key=>$value) { | 111 | foreach ($arr as $key=>$value) { |
108 | $skn[] = $value['skn']; | 112 | $skn[] = $value['skn']; |
109 | } | 113 | } |
114 | + $arr = array('skn'=>$skn); | ||
110 | } | 115 | } |
111 | 116 | ||
112 | $data = array( | 117 | $data = array( |
113 | //初始化js | 118 | //初始化js |
114 | 'brandPage' => true, | 119 | 'brandPage' => true, |
115 | 'list' => $list, | 120 | 'list' => $list, |
116 | - 'skn' => $skn | 121 | + 'criteo' => $arr |
117 | ); | 122 | ); |
118 | // 设置SEO信息 | 123 | // 设置SEO信息 |
119 | $this->setSaleSeo($list['seo']); | 124 | $this->setSaleSeo($list['seo']); |
@@ -55,18 +55,20 @@ class SaleController extends WebAction | @@ -55,18 +55,20 @@ class SaleController extends WebAction | ||
55 | 55 | ||
56 | //统计前三个商品 | 56 | //统计前三个商品 |
57 | $skn=array(); | 57 | $skn=array(); |
58 | + $arr=array(); | ||
58 | if (isset($saleData['goods']) && !empty($saleData['goods'])) { | 59 | if (isset($saleData['goods']) && !empty($saleData['goods'])) { |
59 | $arr = array_slice($saleData['goods'],0,3); | 60 | $arr = array_slice($saleData['goods'],0,3); |
60 | foreach ($arr as $key=>$value) { | 61 | foreach ($arr as $key=>$value) { |
61 | $skn[] = $value['skn']; | 62 | $skn[] = $value['skn']; |
62 | } | 63 | } |
64 | + $arr = array('skn'=>$skn); | ||
63 | } | 65 | } |
64 | 66 | ||
65 | $data = array( | 67 | $data = array( |
66 | //初始化js | 68 | //初始化js |
67 | 'productListPage' => true, | 69 | 'productListPage' => true, |
68 | 'newSale' => $saleData, | 70 | 'newSale' => $saleData, |
69 | - 'skn' => $skn | 71 | + 'criteo' => $arr |
70 | ); | 72 | ); |
71 | $this->setTitle('潮流商品搜索 | YOHO!有货'); | 73 | $this->setTitle('潮流商品搜索 | YOHO!有货'); |
72 | $this->setKeywords('Yoho! 有货,潮流,时尚,流行,购物,B2C,正品,购物网站,网上购物,货到付款,品牌服饰,男士护肤,黑框眼镜,匡威,板鞋,i.t,izzue,5cm,eastpak,vans,lylescott,g-shock,new balance,lacoste,melissa,casio,卡西欧手表,舒雅,jasonwood,odm,AAAA,香港购物,日本潮流'); | 74 | $this->setKeywords('Yoho! 有货,潮流,时尚,流行,购物,B2C,正品,购物网站,网上购物,货到付款,品牌服饰,男士护肤,黑框眼镜,匡威,板鞋,i.t,izzue,5cm,eastpak,vans,lylescott,g-shock,new balance,lacoste,melissa,casio,卡西欧手表,舒雅,jasonwood,odm,AAAA,香港购物,日本潮流'); |
@@ -19,17 +19,19 @@ class SearchController extends WebAction | @@ -19,17 +19,19 @@ class SearchController extends WebAction | ||
19 | 19 | ||
20 | //统计前三个商品 | 20 | //统计前三个商品 |
21 | $skn=array(); | 21 | $skn=array(); |
22 | + $arr=array(); | ||
22 | if (isset($list['goods']) && !empty($list['goods'])) { | 23 | if (isset($list['goods']) && !empty($list['goods'])) { |
23 | $arr = array_slice($list['goods'],0,3); | 24 | $arr = array_slice($list['goods'],0,3); |
24 | foreach ($arr as $key=>$value) { | 25 | foreach ($arr as $key=>$value) { |
25 | $skn[] = $value['skn']; | 26 | $skn[] = $value['skn']; |
26 | } | 27 | } |
28 | + $arr = array('skn'=>$skn); | ||
27 | } | 29 | } |
28 | 30 | ||
29 | $data = array( | 31 | $data = array( |
30 | 'productListPage' => true, //初始化js | 32 | 'productListPage' => true, //初始化js |
31 | 'list' => $list, | 33 | 'list' => $list, |
32 | - 'skn' => $skn | 34 | + 'criteo' => $arr |
33 | ); | 35 | ); |
34 | $data['list']['searchPage'] = true; //设置搜素页面标识,区分列表页-->特有的搜索页导航样式 | 36 | $data['list']['searchPage'] = true; //设置搜素页面标识,区分列表页-->特有的搜索页导航样式 |
35 | if (isset($data['list']['goods']) && empty($data['list']['goods'])) { | 37 | if (isset($data['list']['goods']) && empty($data['list']['goods'])) { |
-
Please register or login to post a comment