modify search url to config
Showing
17 changed files
with
58 additions
and
29 deletions
@@ -131,6 +131,7 @@ class FloorProcess | @@ -131,6 +131,7 @@ class FloorProcess | ||
131 | 131 | ||
132 | /** | 132 | /** |
133 | * 女生品类 | 133 | * 女生品类 |
134 | + * 推荐(1T-12F) | ||
134 | */ | 135 | */ |
135 | private static function recommend_content_three($data, $type) | 136 | private static function recommend_content_three($data, $type) |
136 | { | 137 | { |
@@ -138,7 +139,7 @@ class FloorProcess | @@ -138,7 +139,7 @@ class FloorProcess | ||
138 | 139 | ||
139 | $build = array(); | 140 | $build = array(); |
140 | if (!empty($data['big_image'][0])) { | 141 | if (!empty($data['big_image'][0])) { |
141 | - $build['img'] = Helpers::getImageUrl($data['big_image'][0]['src'], 640, 198); | 142 | + $build['img'] = Helpers::getImageUrl($data['big_image'][0]['src'], 640, 200); |
142 | $build['url'] = Helpers::getFilterUrl($data['big_image'][0]['url']); | 143 | $build['url'] = Helpers::getFilterUrl($data['big_image'][0]['url']); |
143 | $result['hotCategory']['banner'] = $build; | 144 | $result['hotCategory']['banner'] = $build; |
144 | } | 145 | } |
@@ -228,7 +229,7 @@ class FloorProcess | @@ -228,7 +229,7 @@ class FloorProcess | ||
228 | 229 | ||
229 | foreach($data as $key=>&$value){ | 230 | foreach($data as $key=>&$value){ |
230 | if($key == 'title'){ | 231 | if($key == 'title'){ |
231 | - $value['more_url'] = Helpers::url('', array('id' => 2, 'gender' => self::$channel[$type]), 'guang'); | 232 | + $value['more_url'] = Helpers::url('', array('id' => 3, 'gender' => self::$channel[$type]), 'guang'); |
232 | } | 233 | } |
233 | if($key == 'article'){ | 234 | if($key == 'article'){ |
234 | foreach($value as &$one){ | 235 | foreach($value as &$one){ |
@@ -266,7 +267,7 @@ class FloorProcess | @@ -266,7 +267,7 @@ class FloorProcess | ||
266 | 267 | ||
267 | foreach($data as $key=>&$value){ | 268 | foreach($data as $key=>&$value){ |
268 | if($key == 'title'){ | 269 | if($key == 'title'){ |
269 | - $value['more_url'] = Helpers::url('', array('id' => 1, 'gender' => self::$channel[$type]), 'guang'); | 270 | + $value['more_url'] = Helpers::url('', array('id' => 4, 'gender' => self::$channel[$type]), 'guang'); |
270 | } | 271 | } |
271 | if($key == 'list'){ | 272 | if($key == 'list'){ |
272 | foreach ($value as &$one) { | 273 | foreach ($value as &$one) { |
@@ -300,7 +301,7 @@ class FloorProcess | @@ -300,7 +301,7 @@ class FloorProcess | ||
300 | $one['img'] = Helpers::getImageUrl($one['src'], 640, 403); | 301 | $one['img'] = Helpers::getImageUrl($one['src'], 640, 403); |
301 | unset($one['src']); | 302 | unset($one['src']); |
302 | } | 303 | } |
303 | - $data['banner']['list'] = $data['big_image']; | 304 | + $result['big_image']['list'] = $data['big_image']; |
304 | 305 | ||
305 | foreach ($data['list'] as $kk => &$one) { | 306 | foreach ($data['list'] as $kk => &$one) { |
306 | if ($kk == 0) { | 307 | if ($kk == 0) { |
@@ -337,7 +338,6 @@ class FloorProcess | @@ -337,7 +338,6 @@ class FloorProcess | ||
337 | { | 338 | { |
338 | $result = array(); | 339 | $result = array(); |
339 | 340 | ||
340 | - $data['banner'] = array(); | ||
341 | foreach ($data['big_image'] as &$one) { | 341 | foreach ($data['big_image'] as &$one) { |
342 | if (isset($one['url'])) { | 342 | if (isset($one['url'])) { |
343 | $one['url'] = Helpers::getFilterUrl($one['url']); | 343 | $one['url'] = Helpers::getFilterUrl($one['url']); |
@@ -188,7 +188,7 @@ function tsAnimate() { | @@ -188,7 +188,7 @@ function tsAnimate() { | ||
188 | window.setTimeout(tsAnimate, 3000); | 188 | window.setTimeout(tsAnimate, 3000); |
189 | } else { | 189 | } else { |
190 | if (start % 360 === 0) { | 190 | if (start % 360 === 0) { |
191 | - window.setTimeout(tsAnimate, 3 * 60 * 1000); | 191 | + window.setTimeout(tsAnimate, 60 * 1000); |
192 | } else { | 192 | } else { |
193 | requestFrame(function () { | 193 | requestFrame(function () { |
194 | tsAnimate(); | 194 | tsAnimate(); |
@@ -56,7 +56,7 @@ $clear.bind('tap', function() { | @@ -56,7 +56,7 @@ $clear.bind('tap', function() { | ||
56 | continue; | 56 | continue; |
57 | } | 57 | } |
58 | 58 | ||
59 | - html += '<li><a href="?query=' + history + '">' + history + '</li>'; | 59 | + html += '<li><a href="/?query=' + history + '">' + history + '</li>'; |
60 | } | 60 | } |
61 | 61 | ||
62 | $history.html(html); | 62 | $history.html(html); |
@@ -88,15 +88,38 @@ | @@ -88,15 +88,38 @@ | ||
88 | background-color: #000000; | 88 | background-color: #000000; |
89 | 89 | ||
90 | .index-channel-list { | 90 | .index-channel-list { |
91 | - padding-top: 50%; | ||
92 | - width: 100%; | ||
93 | - position: absolute; | ||
94 | - top: 0; | 91 | + padding-top: 50%; |
92 | + width: 100%; | ||
93 | + position: absolute; | ||
94 | + top: -230rem / $pxConvertRem; | ||
95 | 95 | ||
96 | - .homestyle { | 96 | + .list-item { |
97 | + display: block; | ||
98 | + position: relative; | ||
99 | + margin: 0 auto 50rem / $pxConvertRem; | ||
100 | + width: 444rem / $pxConvertRem; | ||
101 | + height: 110rem / $pxConvertRem; | ||
102 | + text-align: center; | ||
103 | + font-size: 30rem / $pxConvertRem; | ||
104 | + line-height: 110rem / $pxConvertRem; | ||
105 | + color: #fff; | ||
106 | + background: #000; | ||
107 | + border: 5rem / $pxConvertRem solid #fff; | ||
108 | + font-weight: bold; | ||
109 | + } | ||
110 | + .lighter { | ||
111 | + font-weight: lighter; | ||
112 | + } | ||
113 | + .right-icon { | ||
114 | + position: absolute; | ||
115 | + right: 10rem / $pxConvertRem; | ||
116 | + top: 0; | ||
117 | + font-weight: bold; | ||
118 | + } | ||
119 | + .homestyle { | ||
97 | margin-bottom: 50rem / $pxConvertRem; | 120 | margin-bottom: 50rem / $pxConvertRem; |
98 | width: 287.3rem / $pxConvertRem; | 121 | width: 287.3rem / $pxConvertRem; |
99 | - } | 122 | + } |
100 | } | 123 | } |
101 | } | 124 | } |
102 | } | 125 | } |
1 | {{>layout/header}} | 1 | {{>layout/header}} |
2 | - | ||
3 | <div class="index-page yoho-page"> | 2 | <div class="index-page yoho-page"> |
4 | <div class="index-container"> | 3 | <div class="index-container"> |
5 | <div class="index-header clearfix"> | 4 | <div class="index-header clearfix"> |
@@ -13,15 +12,16 @@ | @@ -13,15 +12,16 @@ | ||
13 | </div> | 12 | </div> |
14 | </form> | 13 | </form> |
15 | </div> | 14 | </div> |
16 | - | ||
17 | <div class="index-channel"> | 15 | <div class="index-channel"> |
18 | <img class="img" src="{{background}}" alt=""> | 16 | <img class="img" src="{{background}}" alt=""> |
19 | <div class="index-channel-list"> | 17 | <div class="index-channel-list"> |
20 | - <a href="/boys"><img class="homestyle" src="http://img10.static.yhbimg.com/adpic/2015/09/28/18/01bdbd27952eb5f780ac23641e70fd6e12.png"></a> | ||
21 | - <a href="/girls"><img class="homestyle" src="http://img13.static.yhbimg.com/adpic/2015/09/28/18/025a4056cad1c2b6704a5d7c83066a2d25.png"></a> | 18 | + <a href="/boys" class="list-item">男生 <span class="lighter">BOYS</span> <span class="iconfont right-icon"></span></a> |
19 | + <a href="/girls" class="list-item">女生 <span class="lighter">GIRLS</span> <span class="iconfont right-icon"></span></a> | ||
20 | + <a href="/kids" class="list-item">潮童 <span class="lighter">KIDS</span> <span class="iconfont right-icon"></span></a> | ||
21 | + <a href="/lifestyle" class="list-item">创意生活 <span class="lighter">LIFESTYLE</span> <span class="iconfont right-icon"></span></a> | ||
22 | </div> | 22 | </div> |
23 | </div> | 23 | </div> |
24 | - </div> | 24 | + </div> |
25 | </div> | 25 | </div> |
26 | {{>layout/footer}} | 26 | {{>layout/footer}} |
27 | {{> layout/download_app}} | 27 | {{> layout/download_app}} |
1 | {{> layout/page_footer}} | 1 | {{> layout/page_footer}} |
2 | +{{> layout/download_app}} | ||
2 | {{#if rlsEnv}} | 3 | {{#if rlsEnv}} |
3 | <script src="http://cdn.yoho.cn/myohobuy/{{version}}/lib.js"></script> | 4 | <script src="http://cdn.yoho.cn/myohobuy/{{version}}/lib.js"></script> |
4 | <script src="http://cdn.yoho.cn/myohobuy/{{version}}/index.js"></script> | 5 | <script src="http://cdn.yoho.cn/myohobuy/{{version}}/index.js"></script> |
@@ -26,7 +26,6 @@ class BoysController extends AbstractAction | @@ -26,7 +26,6 @@ class BoysController extends AbstractAction | ||
26 | // 渲染模板并输出 | 26 | // 渲染模板并输出 |
27 | $this->_view->display('index', array( | 27 | $this->_view->display('index', array( |
28 | 'boysHomePage' => true, | 28 | 'boysHomePage' => true, |
29 | - 'showDownloadApp'=>true, | ||
30 | 'showFooterTab'=>true, | 29 | 'showFooterTab'=>true, |
31 | 'maybeLike' => true, | 30 | 'maybeLike' => true, |
32 | 'content' => Index\HomeModel::getBoysFloor() | 31 | 'content' => Index\HomeModel::getBoysFloor() |
@@ -26,7 +26,6 @@ class GirlsController extends AbstractAction | @@ -26,7 +26,6 @@ class GirlsController extends AbstractAction | ||
26 | // 渲染模板并输出 | 26 | // 渲染模板并输出 |
27 | $this->_view->display('index', array( | 27 | $this->_view->display('index', array( |
28 | 'grilsHomePage' => true, | 28 | 'grilsHomePage' => true, |
29 | - 'showDownloadApp'=>true, | ||
30 | 'showFooterTab'=>true, | 29 | 'showFooterTab'=>true, |
31 | 'maybeLike' => true, | 30 | 'maybeLike' => true, |
32 | 'content' => Index\HomeModel::getGirlsFloor() | 31 | 'content' => Index\HomeModel::getGirlsFloor() |
@@ -26,7 +26,6 @@ class KidsController extends AbstractAction | @@ -26,7 +26,6 @@ class KidsController extends AbstractAction | ||
26 | // 渲染模板并输出 | 26 | // 渲染模板并输出 |
27 | $this->_view->display('index', array( | 27 | $this->_view->display('index', array( |
28 | 'kidsHomePage' => true, | 28 | 'kidsHomePage' => true, |
29 | - 'showDownloadApp'=>true, | ||
30 | 'showFooterTab'=>true, | 29 | 'showFooterTab'=>true, |
31 | 'maybeLike' => true, | 30 | 'maybeLike' => true, |
32 | 'content' => Index\HomeModel::getKidsFloor() | 31 | 'content' => Index\HomeModel::getKidsFloor() |
@@ -26,7 +26,6 @@ class LifestyleController extends AbstractAction | @@ -26,7 +26,6 @@ class LifestyleController extends AbstractAction | ||
26 | // 渲染模板并输出 | 26 | // 渲染模板并输出 |
27 | $this->_view->display('index', array( | 27 | $this->_view->display('index', array( |
28 | 'lifestyleHomePage' => true, | 28 | 'lifestyleHomePage' => true, |
29 | - 'showDownloadApp'=>true, | ||
30 | 'showFooterTab'=>true, | 29 | 'showFooterTab'=>true, |
31 | 'maybeLike' => true, | 30 | 'maybeLike' => true, |
32 | 'content' => Index\HomeModel::getLifestyleFloor() | 31 | 'content' => Index\HomeModel::getLifestyleFloor() |
@@ -16,8 +16,10 @@ class SearchController extends AbstractAction | @@ -16,8 +16,10 @@ class SearchController extends AbstractAction | ||
16 | */ | 16 | */ |
17 | public function indexAction() | 17 | public function indexAction() |
18 | { | 18 | { |
19 | + $this->_view->html('search'); | ||
19 | $this->_view->display('index', array( | 20 | $this->_view->display('index', array( |
20 | 'search' => array('url' => Helpers::url('', null, 'search')), | 21 | 'search' => array('url' => Helpers::url('', null, 'search')), |
22 | + 'showDownloadApp' => true, | ||
21 | 'searchPage' => true, | 23 | 'searchPage' => true, |
22 | 'pageFooter' => true | 24 | 'pageFooter' => true |
23 | )); | 25 | )); |
@@ -41,7 +43,7 @@ class SearchController extends AbstractAction | @@ -41,7 +43,7 @@ class SearchController extends AbstractAction | ||
41 | 'discount' => FILTER_DEFAULT, | 43 | 'discount' => FILTER_DEFAULT, |
42 | 'gender' => FILTER_DEFAULT, | 44 | 'gender' => FILTER_DEFAULT, |
43 | 'p_d' => FILTER_DEFAULT,), false); | 45 | 'p_d' => FILTER_DEFAULT,), false); |
44 | - | 46 | + |
45 | $query = isset($condition['query']) ? strtolower(trim($condition['query'])) : null; | 47 | $query = isset($condition['query']) ? strtolower(trim($condition['query'])) : null; |
46 | if (isset($condition['discount'])) { | 48 | if (isset($condition['discount'])) { |
47 | $condition['p_d'] = rawurldecode($condition['discount']); | 49 | $condition['p_d'] = rawurldecode($condition['discount']); |
@@ -55,6 +55,8 @@ class BrandModel | @@ -55,6 +55,8 @@ class BrandModel | ||
55 | 55 | ||
56 | // 模板中的使用JS标识 | 56 | // 模板中的使用JS标识 |
57 | $result['brandPage'] = true; | 57 | $result['brandPage'] = true; |
58 | + // 是否显示app下载浮层标识 | ||
59 | + $result['showDownloadApp'] = true; | ||
58 | 60 | ||
59 | /* 顶部的轮翻广告列表 */ | 61 | /* 顶部的轮翻广告列表 */ |
60 | if (!empty($brand['brandTop'][0]['data'])) { | 62 | if (!empty($brand['brandTop'][0]['data'])) { |
@@ -213,7 +213,7 @@ class NewsaleModel | @@ -213,7 +213,7 @@ class NewsaleModel | ||
213 | 213 | ||
214 | if (isset($data['code']) && $data['code'] === 200) { | 214 | if (isset($data['code']) && $data['code'] === 200) { |
215 | foreach ($data['data']['product_list'] as $val) { | 215 | foreach ($data['data']['product_list'] as $val) { |
216 | - $result['goods'][] = Helpers::formatProduct($val); | 216 | + $result['goods'][] = Helpers::formatProduct($val, true, false, false); |
217 | } | 217 | } |
218 | } | 218 | } |
219 | 219 |
@@ -22,6 +22,7 @@ class ClassController extends AbstractAction | @@ -22,6 +22,7 @@ class ClassController extends AbstractAction | ||
22 | 22 | ||
23 | $data = array( | 23 | $data = array( |
24 | 'categoryPage' => true, | 24 | 'categoryPage' => true, |
25 | + 'showDownloadApp' => true, | ||
25 | 'category' => array( | 26 | 'category' => array( |
26 | 'class' => $classes, | 27 | 'class' => $classes, |
27 | 'searchUrl' => Helpers::url('/search.html', null, 'search'), | 28 | 'searchUrl' => Helpers::url('/search.html', null, 'search'), |
@@ -57,6 +57,7 @@ class IndexController extends AbstractAction | @@ -57,6 +57,7 @@ class IndexController extends AbstractAction | ||
57 | } | 57 | } |
58 | $this->_view->display('index', array( | 58 | $this->_view->display('index', array( |
59 | 'goodListPage' => true, | 59 | 'goodListPage' => true, |
60 | + 'showDownloadApp' => true, | ||
60 | 'goodList' => $goodList, | 61 | 'goodList' => $goodList, |
61 | )); | 62 | )); |
62 | } | 63 | } |
@@ -113,6 +114,7 @@ class IndexController extends AbstractAction | @@ -113,6 +114,7 @@ class IndexController extends AbstractAction | ||
113 | } | 114 | } |
114 | 115 | ||
115 | $data['goodListPage'] = true; | 116 | $data['goodListPage'] = true; |
117 | + $data['showDownloadApp'] = true; | ||
116 | // 从搜索页过来的,显示搜索框, 和进入品牌引导信息 | 118 | // 从搜索页过来的,显示搜索框, 和进入品牌引导信息 |
117 | if ($from === 'search') { | 119 | if ($from === 'search') { |
118 | $data['goodList'] = Product\ListModel::getBrandData($condition, $title); | 120 | $data['goodList'] = Product\ListModel::getBrandData($condition, $title); |
@@ -32,6 +32,7 @@ class NewsaleController extends AbstractAction | @@ -32,6 +32,7 @@ class NewsaleController extends AbstractAction | ||
32 | } | 32 | } |
33 | // 设置一些筛选的默认参数 | 33 | // 设置一些筛选的默认参数 |
34 | $data += array( | 34 | $data += array( |
35 | + 'showDownloadApp'=>true, | ||
35 | 'brand' => '0', | 36 | 'brand' => '0', |
36 | 'sort' => '0', | 37 | 'sort' => '0', |
37 | 'gender' => Helpers::getGenderByCookie(), | 38 | 'gender' => Helpers::getGenderByCookie(), |
@@ -65,6 +66,7 @@ class NewsaleController extends AbstractAction | @@ -65,6 +66,7 @@ class NewsaleController extends AbstractAction | ||
65 | } | 66 | } |
66 | // 设置一些筛选的默认参数 | 67 | // 设置一些筛选的默认参数 |
67 | $data += array( | 68 | $data += array( |
69 | + 'showDownloadApp'=>true, | ||
68 | 'brand' => '0', | 70 | 'brand' => '0', |
69 | 'sort' => '0', | 71 | 'sort' => '0', |
70 | 'gender' => Helpers::getGenderByCookie(), | 72 | 'gender' => Helpers::getGenderByCookie(), |
@@ -13,11 +13,11 @@ routes.error.route.controller = Error | @@ -13,11 +13,11 @@ routes.error.route.controller = Error | ||
13 | routes.error.route.action = Index | 13 | routes.error.route.action = Index |
14 | 14 | ||
15 | ; 搜索页 | 15 | ; 搜索页 |
16 | -routes.reg.type = "rewrite" | ||
17 | -routes.reg.match = "/search.html" | ||
18 | -routes.reg.route.module = Index | ||
19 | -routes.reg.route.controller = Search | ||
20 | -routes.reg.route.action = Index | 16 | +routes.search.type = "rewrite" |
17 | +routes.search.match = "/search.html" | ||
18 | +routes.search.route.module = Index | ||
19 | +routes.search.route.controller = Search | ||
20 | +routes.search.route.action = Index | ||
21 | 21 | ||
22 | ; 注册页 | 22 | ; 注册页 |
23 | routes.reg.type = "rewrite" | 23 | routes.reg.type = "rewrite" |
-
Please register or login to post a comment