Authored by xuqi

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

framework @ 119c247f
1 -Subproject commit 75bbc3b075de19f239532f60c5995d06c5f814e2 1 +Subproject commit 119c247f5cf929aa1e059e40609bb16dd6b58f05
@@ -18,6 +18,9 @@ class CacheConfig @@ -18,6 +18,9 @@ class CacheConfig
18 const KEY_ACTION_GIRLS_INDEX = 'key_action_girls_index'; // 女生首页 18 const KEY_ACTION_GIRLS_INDEX = 'key_action_girls_index'; // 女生首页
19 const KEY_ACTION_KIDS_INDEX = 'key_action_kids_index'; // 潮童首页 19 const KEY_ACTION_KIDS_INDEX = 'key_action_kids_index'; // 潮童首页
20 const KEY_ACTION_LIFESTYLE_INDEX = 'key_action_lifestyle_index'; // 创意生活首页 20 const KEY_ACTION_LIFESTYLE_INDEX = 'key_action_lifestyle_index'; // 创意生活首页
  21 +
  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
21 24
22 const KEY_ACTION_GUANG_PLUSSTAR_INDEX = 'key_action_guang_plusstar_index'; // 国际优选 25 const KEY_ACTION_GUANG_PLUSSTAR_INDEX = 'key_action_guang_plusstar_index'; // 国际优选
23 const KEY_ACTION_GUANG_PLUSSTAR_LIST = 'key_action_guang_plusstar_list'; // 明星原创 26 const KEY_ACTION_GUANG_PLUSSTAR_LIST = 'key_action_guang_plusstar_list'; // 明星原创
@@ -82,6 +82,7 @@ class NewsaleData @@ -82,6 +82,7 @@ class NewsaleData
82 */ 82 */
83 public static function selectNewSaleProducts($gender, $brand, $sort, $color, $size, $price, $p_d, $channel, $dayLimit = null, $limit = 60, $page = 1, $order = 's_t_desc') 83 public static function selectNewSaleProducts($gender, $brand, $sort, $color, $size, $price, $p_d, $channel, $dayLimit = null, $limit = 60, $page = 1, $order = 's_t_desc')
84 { 84 {
  85 +
85 $selectItems = array( 86 $selectItems = array(
86 'gender' => $gender, 87 'gender' => $gender,
87 'brand' => $brand, 88 'brand' => $brand,
@@ -9,9 +9,6 @@ use Plugin\Helpers; @@ -9,9 +9,6 @@ use Plugin\Helpers;
9 */ 9 */
10 class FloorProcess 10 class FloorProcess
11 { 11 {
12 -  
13 - private static $guangUrl = 'http://guang.m.yohobuy.com';  
14 -  
15 /** 12 /**
16 * 频道参数 13 * 频道参数
17 * 14 *
@@ -209,6 +206,7 @@ class FloorProcess @@ -209,6 +206,7 @@ class FloorProcess
209 foreach ($data['list'] as &$one) { 206 foreach ($data['list'] as &$one) {
210 if (isset($one['url'])) { 207 if (isset($one['url'])) {
211 $one['url'] = Helpers::getFilterUrl($one['url']); 208 $one['url'] = Helpers::getFilterUrl($one['url']);
  209 + isset(self::$channel[$type]) && $one['url'] .= '?gender='.self::$channel[$type];
212 } 210 }
213 $one['img'] = Helpers::getImageUrl($one['src'], 158, 174); 211 $one['img'] = Helpers::getImageUrl($one['src'], 158, 174);
214 unset($one['src']); 212 unset($one['src']);
@@ -82,6 +82,9 @@ class ListProcess @@ -82,6 +82,9 @@ class ListProcess
82 $filters['classify'][] = $build; 82 $filters['classify'][] = $build;
83 } 83 }
84 84
  85 + // 按照指定字段进行排序筛选数据
  86 + self::sortArrByField($filters['classify'], 'sort_col');
  87 +
85 return $filters; 88 return $filters;
86 89
87 } 90 }
@@ -91,6 +94,7 @@ class ListProcess @@ -91,6 +94,7 @@ class ListProcess
91 $result = array( 94 $result = array(
92 'title' => '品牌', 95 'title' => '品牌',
93 'name' => '所有品牌', 96 'name' => '所有品牌',
  97 + 'sort_col' => 1,
94 'dataType' => 'brand', 98 'dataType' => 'brand',
95 'subs' => array( 99 'subs' => array(
96 array( 100 array(
@@ -120,6 +124,7 @@ class ListProcess @@ -120,6 +124,7 @@ class ListProcess
120 $result = array( 124 $result = array(
121 'title' => '颜色', 125 'title' => '颜色',
122 'name' => '所有颜色', 126 'name' => '所有颜色',
  127 + 'sort_col' => 3,
123 'dataType' => 'color', 128 'dataType' => 'color',
124 'subs' => array( 129 'subs' => array(
125 array( 130 array(
@@ -146,6 +151,7 @@ class ListProcess @@ -146,6 +151,7 @@ class ListProcess
146 $result = array( 151 $result = array(
147 'title' => '折扣', 152 'title' => '折扣',
148 'name' => '所有商品', 153 'name' => '所有商品',
  154 + 'sort_col' => 6,
149 'dataType' => 'discount', 155 'dataType' => 'discount',
150 'subs' => array( 156 'subs' => array(
151 array( 157 array(
@@ -172,6 +178,7 @@ class ListProcess @@ -172,6 +178,7 @@ class ListProcess
172 $result = array( 178 $result = array(
173 'title' => '性别', 179 'title' => '性别',
174 'name' => '所有性别', 180 'name' => '所有性别',
  181 + 'sort_col' => 0,
175 'dataType' => 'gender', 182 'dataType' => 'gender',
176 'subs' => array( 183 'subs' => array(
177 array( 184 array(
@@ -180,12 +187,12 @@ class ListProcess @@ -180,12 +187,12 @@ class ListProcess
180 'name' => '所有性别' 187 'name' => '所有性别'
181 ), 188 ),
182 array( 189 array(
183 - 'dataId' => 'boys',  
184 - 'name' => '男' 190 + 'dataId' => '1,3',
  191 + 'name' => 'BOYS'
185 ), 192 ),
186 array( 193 array(
187 - 'dataId' => 'girls',  
188 - 'name' => '女' 194 + 'dataId' => '2,3',
  195 + 'name' => 'GIRLS'
189 ), 196 ),
190 ) 197 )
191 ); 198 );
@@ -198,6 +205,7 @@ class ListProcess @@ -198,6 +205,7 @@ class ListProcess
198 $result = array( 205 $result = array(
199 'title' => '品类', 206 'title' => '品类',
200 'name' => '所有品类', 207 'name' => '所有品类',
  208 + 'sort_col' => 2,
201 'dataType' => 'sort', 209 'dataType' => 'sort',
202 'subs' => array( 210 'subs' => array(
203 array( 211 array(
@@ -237,6 +245,7 @@ class ListProcess @@ -237,6 +245,7 @@ class ListProcess
237 $result = array( 245 $result = array(
238 'title' => '价格', 246 'title' => '价格',
239 'name' => '所有价格', 247 'name' => '所有价格',
  248 + 'sort_col' => 5,
240 'dataType' => 'price', 249 'dataType' => 'price',
241 'subs' => array( 250 'subs' => array(
242 array( 251 array(
@@ -263,6 +272,7 @@ class ListProcess @@ -263,6 +272,7 @@ class ListProcess
263 $result = array( 272 $result = array(
264 'title' => '尺码', 273 'title' => '尺码',
265 'name' => '所有尺码', 274 'name' => '所有尺码',
  275 + 'sort_col' => 4,
266 'dataType' => 'size', 276 'dataType' => 'size',
267 'subs' => array( 277 'subs' => array(
268 array( 278 array(
@@ -117,6 +117,32 @@ class Helpers @@ -117,6 +117,32 @@ class Helpers
117 } 117 }
118 118
119 /** 119 /**
  120 + * 根据排序类型和类型值获得正确的排序参数
  121 + * @param integer $order 类型值
  122 + * @param string $type 排序类型
  123 + * @return string 转换之后的排序参数
  124 + */
  125 + public static function transOrder($order, $type)
  126 + {
  127 + $result = '';
  128 +
  129 + switch ($type) {
  130 + case 'price':
  131 + $result = ($order == 0) ? 's_p_desc' : 's_p_asc';
  132 + break;
  133 + case 'discount':
  134 + $result = ($order == 0) ? 'p_d_desc' : 'p_d_asc';
  135 + break;
  136 + case 'newest':
  137 + default:
  138 + $result = ($order == 0) ? 's_t_desc' : 's_t_asc';
  139 + break;
  140 + }
  141 +
  142 + return $result;
  143 + }
  144 +
  145 + /**
120 * 格式化商品信息 146 * 格式化商品信息
121 * 147 *
122 * @param array $productData 需要格式化的商品数据 148 * @param array $productData 需要格式化的商品数据
No preview for this file type
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > 2 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
3 <svg xmlns="http://www.w3.org/2000/svg"> 3 <svg xmlns="http://www.w3.org/2000/svg">
4 <metadata> 4 <metadata>
5 -Created by FontForge 20120731 at Fri Oct 23 16:38:57 2015 5 +Created by FontForge 20120731 at Fri Oct 30 10:27:45 2015
6 By Ads 6 By Ads
7 </metadata> 7 </metadata>
8 <defs> 8 <defs>
@@ -19,7 +19,7 @@ Created by FontForge 20120731 at Fri Oct 23 16:38:57 2015 @@ -19,7 +19,7 @@ Created by FontForge 20120731 at Fri Oct 23 16:38:57 2015
19 bbox="-0.75 -224 3943 812.871" 19 bbox="-0.75 -224 3943 812.871"
20 underline-thickness="50" 20 underline-thickness="50"
21 underline-position="-100" 21 underline-position="-100"
22 - unicode-range="U+0078-E628" 22 + unicode-range="U+0078-E62D"
23 /> 23 />
24 <missing-glyph horiz-adv-x="374" 24 <missing-glyph horiz-adv-x="374"
25 d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" /> 25 d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" />
@@ -152,5 +152,19 @@ d="M866.5 663.5q-97.5 97.5 -228 132t-261.5 0t-228.5 -132t-132 -228.5t0 -261.5t13 @@ -152,5 +152,19 @@ d="M866.5 663.5q-97.5 97.5 -228 132t-261.5 0t-228.5 -132t-132 -228.5t0 -261.5t13
152 <glyph glyph-name="uniE628" unicode="&#xe628;" 152 <glyph glyph-name="uniE628" unicode="&#xe628;"
153 d="M505 776q77 0 148.5 -23.5t129 -67t101 -101.5t67.5 -129.5t24 -147.5q0 -64 -17 -125t-47.5 -112t-74 -94.5t-94.5 -74t-112 -47.5t-125 -17q-95 0 -182 37.5t-150 100.5t-100 150t-37 182t37 182t100 150t150 100t182 37zM505 -104q112 0 206.5 55t149.5 149.5 153 d="M505 776q77 0 148.5 -23.5t129 -67t101 -101.5t67.5 -129.5t24 -147.5q0 -64 -17 -125t-47.5 -112t-74 -94.5t-94.5 -74t-112 -47.5t-125 -17q-95 0 -182 37.5t-150 100.5t-100 150t-37 182t37 182t100 150t150 100t182 37zM505 -104q112 0 206.5 55t149.5 149.5
154 t55 206.5q0 37 -6.5 73.5t-19.5 69.5t-30.5 64t-40.5 57.5t-49.5 49.5t-57.5 40.5t-64 30t-69.5 19t-73.5 6.5q-111 0 -205.5 -55t-149.5 -149.5t-55 -206t55 -206t149.5 -149.5t205.5 -55zM528 138v-59h-58v59h58zM470 564h58v-349h-58v349z" /> 154 t55 206.5q0 37 -6.5 73.5t-19.5 69.5t-30.5 64t-40.5 57.5t-49.5 49.5t-57.5 40.5t-64 30t-69.5 19t-73.5 6.5q-111 0 -205.5 -55t-149.5 -149.5t-55 -206t55 -206t149.5 -149.5t205.5 -55zM528 138v-59h-58v59h58zM470 564h58v-349h-58v349z" />
  155 + <glyph glyph-name="uniE629" unicode="&#xe629;"
  156 +d="M442 274h-84v-76h-230v76h-81q-20 0 -33.5 -12.5t-13.5 -31.5v-395q0 -20 13.5 -33.5t33.5 -13.5h395q19 0 31.5 13.5t12.5 33.5v395q0 13 -5.5 23t-15.5 15.5t-23 5.5zM977 812h-81v-77h-230v77h-84q-10 0 -18 -3.5t-14 -10t-9 -15t-3 -18.5v-395q0 -13 5.5 -23
  157 +t15.5 -15.5t23 -5.5h395q20 0 33.5 12.5t13.5 31.5v395q0 20 -13.5 33.5t-33.5 13.5zM977 274h-81v-76h-230v76h-84q-13 0 -23 -5.5t-15.5 -15.5t-5.5 -23v-395q0 -13 5.5 -23.5t15.5 -17t23 -6.5h395q20 0 33.5 13.5t13.5 33.5v395q0 19 -13.5 31.5t-33.5 12.5z" />
  158 + <glyph glyph-name="uniE62A" unicode="&#xe62a;"
  159 +d="M497 806l-451 -386q-6 -6 -11 -13t-7 -15t-2 -17v-500q0 -32 22.5 -54.5t53.5 -22.5h256v333h308v-333h256q31 0 53.5 22.5t22.5 54.5v500q0 27 -20 45l-451 386q-15 13 -30 0z" />
  160 + <glyph glyph-name="uniE62B" unicode="&#xe62b;"
  161 +d="M761 539q0 -104 -73 -177t-177 -73q-51 0 -97 19.5t-79.5 53t-53.5 80t-20 97.5q0 104 73.5 177t177 73t176.5 -73t73 -177zM888 -164q11 22 9 48q-3 43 -15 83.5t-32 76t-46.5 66.5t-59.5 55t-69.5 42t-78.5 27t-85 9q-100 0 -186.5 -47.5t-139.5 -130t-60 -181.5
  162 +q-1 -26 10 -48q5 -12 16 -18.5t24 -6.5h673q12 0 23 6.5t17 18.5z" />
  163 + <glyph glyph-name="uniE62C" unicode="&#xe62c;" horiz-adv-x="1048"
  164 +d="M832 -127q0 -23 -11.5 -42.5t-31 -31t-43 -11.5t-43 11.5t-31 31t-11.5 42.5q0 36 25 61t60.5 25t60.5 -25t25 -61zM533 -126.5q0 -35.5 -25 -60.5t-60 -25t-60 25t-25 60.5t25 60.5t60 25t60 -25t25 -60.5zM277 620l-35 159q-3 14 -15 23.5t-27 9.5h-147
  165 +q-22 0 -37.5 -15.5t-15.5 -37.5t15.5 -38t37.5 -16h54l157 -627q3 -12 9.5 -22.5t16 -17.5t21 -11t23.5 -4h527q16 0 30.5 7t25 19.5t14.5 28.5l113 452q9 34 -13 62t-57 28h-697z" />
  166 + <glyph glyph-name="uniE62D" unicode="&#xe62d;"
  167 +d="M442 274h-84v-76h-230v76h-81q-20 0 -33.5 -12.5t-13.5 -31.5v-395q0 -20 13.5 -33.5t33.5 -13.5h395q19 0 31.5 13.5t12.5 33.5v395q0 13 -5.5 23t-15.5 15.5t-23 5.5zM977 812h-81v-77h-230v77h-84q-10 0 -18 -3.5t-14 -10t-9 -15t-3 -18.5v-395q0 -13 5.5 -23
  168 +t15.5 -15.5t23 -5.5h395q20 0 33.5 12.5t13.5 31.5v395q0 20 -13.5 33.5t-33.5 13.5zM977 274h-81v-76h-230v76h-84q-13 0 -23 -5.5t-15.5 -15.5t-5.5 -23v-395q0 -13 5.5 -23.5t15.5 -17t23 -6.5h395q20 0 33.5 13.5t13.5 33.5v395q0 19 -13.5 31.5t-33.5 12.5z" />
155 </font> 169 </font>
156 </defs></svg> 170 </defs></svg>
No preview for this file type
No preview for this file type
@@ -197,5 +197,4 @@ function tsAnimate() { @@ -197,5 +197,4 @@ function tsAnimate() {
197 } 197 }
198 } 198 }
199 199
200 -tsAnimate();  
201 - 200 +setTimeout(tsAnimate, 3000);
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 position: absolute; 2 position: absolute;
3 left: 0; 3 left: 0;
4 right: 0; 4 right: 0;
5 - top: 0; 5 + top: 2px;
6 } 6 }
7 7
8 .filter-mask { 8 .filter-mask {
1 .good-info { 1 .good-info {
2 float: left; 2 float: left;
3 - width: 44%; 3 + width: 46.4%;
4 height: 486rem / $pxConvertRem; 4 height: 486rem / $pxConvertRem;
5 - margin: 28rem / $pxConvertRem 3% 0; 5 + margin: 28rem / $pxConvertRem 0 0 2.4%;
6 6
7 7
8 .tag-container { 8 .tag-container {
@@ -24,6 +24,10 @@ $clothes: sprite-map("guang/clothes/*.png"); @@ -24,6 +24,10 @@ $clothes: sprite-map("guang/clothes/*.png");
24 } 24 }
25 25
26 .guang-detail-page { 26 .guang-detail-page {
  27 + #wrapper {
  28 + background: #f0f0f0;
  29 + }
  30 +
27 #wrapper.ios { 31 #wrapper.ios {
28 position: absolute; 32 position: absolute;
29 top: 0; 33 top: 0;
@@ -73,6 +73,7 @@ @@ -73,6 +73,7 @@
73 73
74 .info-list-container { 74 .info-list-container {
75 overflow-x: hidden; 75 overflow-x: hidden;
  76 + background: #f0f0f0;
76 } 77 }
77 78
78 .info-list.hide { 79 .info-list.hide {
@@ -29,8 +29,8 @@ @@ -29,8 +29,8 @@
29 } 29 }
30 } */ 30 } */
31 .home-header { 31 .home-header {
32 - height: 88rem / $pxConvertRem;  
33 - line-height: 88rem / $pxConvertRem; 32 + height: 90rem / $pxConvertRem;
  33 + line-height: 90rem / $pxConvertRem;
34 @include background-image(linear-gradient(#323232, #414141)); 34 @include background-image(linear-gradient(#323232, #414141));
35 position: relative; 35 position: relative;
36 .iconfont { 36 .iconfont {
@@ -14,16 +14,18 @@ @@ -14,16 +14,18 @@
14 border-right: 1px solid #e0e0e0; 14 border-right: 1px solid #e0e0e0;
15 border-top: 1px solid #e0e0e0; 15 border-top: 1px solid #e0e0e0;
16 overflow: hidden; 16 overflow: hidden;
  17 + background: #fff;
17 18
18 .brand-logo { 19 .brand-logo {
19 - width: 100%; 20 + display: table-cell;
  21 + width: 3.95rem;
20 height: 128rem / $pxConvertRem; 22 height: 128rem / $pxConvertRem;
21 line-height: 128rem / $pxConvertRem; 23 line-height: 128rem / $pxConvertRem;
22 text-align: center; 24 text-align: center;
23 font-size: 0; 25 font-size: 0;
  26 + vertical-align: middle;
24 27
25 img { 28 img {
26 - vertical-align: middle;  
27 max-width: 100%; 29 max-width: 100%;
28 max-height: 100%; 30 max-height: 100%;
29 } 31 }
@@ -52,7 +54,8 @@ @@ -52,7 +54,8 @@
52 width: 317rem / $pxConvertRem; 54 width: 317rem / $pxConvertRem;
53 height: 174rem / $pxConvertRem; 55 height: 174rem / $pxConvertRem;
54 border-top: 1px solid #e0e0e0; 56 border-top: 1px solid #e0e0e0;
55 - 57 + background: #fff;
  58 +
56 a { 59 a {
57 display: block; 60 display: block;
58 width: 100%; 61 width: 100%;
@@ -68,7 +71,7 @@ @@ -68,7 +71,7 @@
68 background: #fff; 71 background: #fff;
69 width: 100%; 72 width: 100%;
70 height: 140rem / $pxConvertRem; 73 height: 140rem / $pxConvertRem;
71 - margin-bottom: 28rem / $pxConvertRem; 74 + // margin-bottom: 28rem / $pxConvertRem;
72 border-top: 1px solid #e0e0e0; 75 border-top: 1px solid #e0e0e0;
73 overflow: hidden; 76 overflow: hidden;
74 77
@@ -30,11 +30,11 @@ @@ -30,11 +30,11 @@
30 30
31 .nav-icon, .nav-img { 31 .nav-icon, .nav-img {
32 position: absolute; 32 position: absolute;
33 - width: 60rem / $pxConvertRem;  
34 - height: 60rem / $pxConvertRem; 33 + width: 48rem / $pxConvertRem;
  34 + height: 48rem / $pxConvertRem;
35 top: 50%; 35 top: 50%;
36 - margin-top: -30rem / $pxConvertRem;  
37 - left: 24rem / $pxConvertRem; 36 + margin-top: -24rem / $pxConvertRem;
  37 + left: 30rem / $pxConvertRem;
38 } 38 }
39 39
40 .enter-subnav { 40 .enter-subnav {
@@ -4,8 +4,8 @@ @@ -4,8 +4,8 @@
4 color: #fff; 4 color: #fff;
5 width: 100%; 5 width: 100%;
6 overflow: hidden; 6 overflow: hidden;
7 - height: 88rem / $pxConvertRem;  
8 - line-height: 88rem / $pxConvertRem; 7 + height: 90rem / $pxConvertRem;
  8 + line-height: 90rem / $pxConvertRem;
9 9
10 &.boys { 10 &.boys {
11 @include background-image(linear-gradient(#323232, #414141)); 11 @include background-image(linear-gradient(#323232, #414141));
1 .discount-page { 1 .discount-page {
2 - background-color: #f0f0f0; 2 + background-color: #fff;
3 3
4 .swiper-container { 4 .swiper-container {
5 width: 100%; 5 width: 100%;
@@ -32,6 +32,7 @@ @@ -32,6 +32,7 @@
32 } 32 }
33 33
34 .list-nav { 34 .list-nav {
  35 + border:1px solid #e6e6e6;
35 > li { 36 > li {
36 float: left; 37 float: left;
37 width: 25%; 38 width: 25%;
@@ -50,9 +51,14 @@ @@ -50,9 +51,14 @@
50 } 51 }
51 52
52 .active > a { 53 .active > a {
53 - border-bottom: 2px solid #000;  
54 color: #000; 54 color: #000;
55 - 55 + .spanTest{
  56 + width: auto;
  57 + height: 100%;
  58 + border-bottom: 2px solid #000;
  59 + display: inline-block;
  60 + box-sizing:border-box;
  61 + }
56 .iconfont { 62 .iconfont {
57 color: #999; 63 color: #999;
58 64
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 3
4 .swiper-container { 4 .swiper-container {
5 width: 100%; 5 width: 100%;
6 - height: 240rem / $pxConvertRem; 6 + height: 200rem / $pxConvertRem;
7 7
8 img { 8 img {
9 height: 100%; 9 height: 100%;
@@ -23,7 +23,7 @@ @@ -23,7 +23,7 @@
23 23
24 .banner-top-single{ 24 .banner-top-single{
25 width: 100%; 25 width: 100%;
26 - height: 240rem / $pxConvertRem; 26 + height: 200rem / $pxConvertRem;
27 img { 27 img {
28 display: block; 28 display: block;
29 height: 100%; 29 height: 100%;
@@ -7,13 +7,13 @@ @@ -7,13 +7,13 @@
7 <ul id="list-nav" class="list-nav clearfix"> 7 <ul id="list-nav" class="list-nav clearfix">
8 <li class="new active"> 8 <li class="new active">
9 <a href="javascript:void(0);"> 9 <a href="javascript:void(0);">
10 - 最新 10 + <span class="spanTest">最新</span>
11 <span class="iconfont cur">&#xe616;</span> 11 <span class="iconfont cur">&#xe616;</span>
12 </a> 12 </a>
13 </li> 13 </li>
14 <li class="price"> 14 <li class="price">
15 <a href="javascript:void(0);"> 15 <a href="javascript:void(0);">
16 - 价格 16 + <span class="spanTest">价格</span>
17 <span class="icon"> 17 <span class="icon">
18 <i class="iconfont up">&#xe615;</i> 18 <i class="iconfont up">&#xe615;</i>
19 <i class="iconfont down cur">&#xe616;</i> 19 <i class="iconfont down cur">&#xe616;</i>
@@ -22,7 +22,7 @@ @@ -22,7 +22,7 @@
22 </li> 22 </li>
23 <li class="discount"> 23 <li class="discount">
24 <a href="javascript:void(0);"> 24 <a href="javascript:void(0);">
25 - 折扣 25 + <span class="spanTest">折扣</span>
26 <span class="icon"> 26 <span class="icon">
27 <i class="iconfont up">&#xe615;</i> 27 <i class="iconfont up">&#xe615;</i>
28 <i class="iconfont down cur">&#xe616;</i> 28 <i class="iconfont down cur">&#xe616;</i>
@@ -31,7 +31,7 @@ @@ -31,7 +31,7 @@
31 </li> 31 </li>
32 <li class="filter"> 32 <li class="filter">
33 <a href="javascript:void(0);"> 33 <a href="javascript:void(0);">
34 - 筛选 34 + <span class="spanTest">筛选</span>
35 <span class="iconfont">&#xe613;</span> 35 <span class="iconfont">&#xe613;</span>
36 </a> 36 </a>
37 </li> 37 </li>
1 {{# showFooterTab}} 1 {{# showFooterTab}}
2 <div class="footer-tab"> 2 <div class="footer-tab">
3 <div class="tab-item {{#if grilsHomePage}}current{{/if}}{{#if boysHomePage}}current{{/if}}{{#if kidsHomePage}}current{{/if}}{{#if lifestyleHomePage}}current{{/if}}"> 3 <div class="tab-item {{#if grilsHomePage}}current{{/if}}{{#if boysHomePage}}current{{/if}}{{#if kidsHomePage}}current{{/if}}{{#if lifestyleHomePage}}current{{/if}}">
4 - <p class="iconfont tab-icon">&#xe611;</p> 4 + <p class="iconfont tab-icon">&#xe62a;</p>
5 <p class="tab-name">首页</p> 5 <p class="tab-name">首页</p>
6 </div> 6 </div>
7 <div class="tab-item {{#if categoryPage}}current{{/if}}"> 7 <div class="tab-item {{#if categoryPage}}current{{/if}}">
8 - <p class="iconfont tab-icon">&#xe611;</p> 8 + <p class="iconfont tab-icon">&#xe62d;</p>
9 <p class="tab-name">分类</p> 9 <p class="tab-name">分类</p>
10 </div> 10 </div>
11 <div class="tab-item {{#if guangHome}}current{{/if}}"> 11 <div class="tab-item {{#if guangHome}}current{{/if}}">
@@ -13,11 +13,11 @@ @@ -13,11 +13,11 @@
13 <p class="tab-name">逛</p> 13 <p class="tab-name">逛</p>
14 </div> 14 </div>
15 <div class="tab-item {{#if shoppingCartPage}}current{{/if}}"> 15 <div class="tab-item {{#if shoppingCartPage}}current{{/if}}">
16 - <p class="iconfont tab-icon">&#xe611;</p> 16 + <p class="iconfont tab-icon">&#xe62c;</p>
17 <p class="tab-name">购物车</p> 17 <p class="tab-name">购物车</p>
18 </div> 18 </div>
19 <div class="tab-item {{#if minePage}}current{{/if}}"> 19 <div class="tab-item {{#if minePage}}current{{/if}}">
20 - <p class="iconfont tab-icon">&#xe611;</p> 20 + <p class="iconfont tab-icon">&#xe62b;</p>
21 <p class="tab-name">我的</p> 21 <p class="tab-name">我的</p>
22 </div> 22 </div>
23 </div> 23 </div>
1 <?php 1 <?php
2 2
3 use Action\AbstractAction; 3 use Action\AbstractAction;
  4 +use Plugin\Helpers;
4 5
5 /** 6 /**
6 * 男生首页 7 * 男生首页
@@ -34,4 +35,31 @@ class BoysController extends AbstractAction @@ -34,4 +35,31 @@ class BoysController extends AbstractAction
34 35
35 } 36 }
36 37
  38 +
  39 + /**
  40 + * 异步获取男首底部banner数据
  41 + * @return string 底部Banner数据
  42 + */
  43 + public function bottomBannerAction()
  44 + {
  45 + do
  46 + {
  47 + if(!$this->isAjax())
  48 + {
  49 + break;
  50 + }
  51 +
  52 + $channel = Helpers::getChannelByCookie();
  53 + $bottomBanner = Index\HomeModel::getBottomBanner($channel);
  54 +
  55 + if($bottomBanner)
  56 + {
  57 + $this->echoJson($bottomBanner);
  58 + }
  59 + }
  60 + while(false);
  61 +
  62 + echo ' ';
  63 + }
  64 +
37 } 65 }
1 <?php 1 <?php
2 2
3 use Action\AbstractAction; 3 use Action\AbstractAction;
  4 +use Plugin\Helpers;
4 5
5 /** 6 /**
6 * 女生首页 7 * 女生首页
@@ -33,4 +34,31 @@ class GirlsController extends AbstractAction @@ -33,4 +34,31 @@ class GirlsController extends AbstractAction
33 )); 34 ));
34 } 35 }
35 36
  37 +
  38 + /**
  39 + * 异步获取女首底部banner数据
  40 + * @return string 底部Banner数据
  41 + */
  42 + public function bottomBannerAction()
  43 + {
  44 + do
  45 + {
  46 + if(!$this->isAjax())
  47 + {
  48 + break;
  49 + }
  50 +
  51 + $channel = Helpers::getChannelByCookie();
  52 + $bottomBanner = Index\HomeModel::getBottomBanner($channel);
  53 +
  54 + if($bottomBanner)
  55 + {
  56 + $this->echoJson($bottomBanner);
  57 + }
  58 + }
  59 + while(false);
  60 +
  61 + echo ' ';
  62 + }
  63 +
36 } 64 }
@@ -46,7 +46,7 @@ class ClassModel @@ -46,7 +46,7 @@ class ClassModel
46 $oneClass = array(); 46 $oneClass = array();
47 $item = array(); 47 $item = array();
48 foreach ($data['data'] as $k => $v) { 48 foreach ($data['data'] as $k => $v) {
49 - $oneClass = array('name' => $k, 'ca' => array()); 49 + $oneClass = array('name' => ucfirst($k), 'ca' => array());
50 50
51 foreach ($v as $val) { 51 foreach ($v as $val) {
52 $item = array(); 52 $item = array();
@@ -45,6 +45,11 @@ class HomeModel @@ -45,6 +45,11 @@ class HomeModel
45 /* COOKIE标识访问的是创意生活频道 */ 45 /* COOKIE标识访问的是创意生活频道 */
46 const COOKIE_NAME_LIFESTYLE = 'lifestyle'; 46 const COOKIE_NAME_LIFESTYLE = 'lifestyle';
47 47
  48 + /* COOKIE标识访问的是男生频道底部Banner */
  49 + const COOKIE_NAME_BOYS_BOTTOM_BANNER = '8c48745a39373d621bf5fd80edf59b5e';
  50 + /* COOKIE标识访问的是女生频道频道底部Banner */
  51 + const COOKIE_NAME_GIRLS_BOTTOM_BANNER = 'c63939b2ad458e9cb51147940c1da2e5';
  52 +
48 /** 53 /**
49 * 选择频道 54 * 选择频道
50 * 55 *
@@ -112,6 +117,56 @@ class HomeModel @@ -112,6 +117,56 @@ class HomeModel
112 } 117 }
113 118
114 /** 119 /**
  120 + * 获取男生,女生底部banner
  121 + *
  122 + * @return string | false
  123 + */
  124 + public static function getBottomBanner($channel)
  125 + {
  126 + $result = false;
  127 + if($channel == 2) {
  128 + $resource = self::COOKIE_NAME_GIRLS_BOTTOM_BANNER;
  129 + $cache = CacheConfig::KEY_ACTION_GRILS_BOTTOM_BANNER;
  130 + } else {
  131 + $resource = self::COOKIE_NAME_BOYS_BOTTOM_BANNER;
  132 + $cache = CacheConfig::KEY_ACTION_BOYS_BOTTOM_BANNER;
  133 + }
  134 +
  135 + if (USE_CACHE) {
  136 + // 先尝试获取一级缓存(master), 有数据则直接返回.
  137 + $result = Cache::get($cache, 'master');
  138 + if (!empty($result)) {
  139 + return $result;
  140 + }
  141 + }
  142 +
  143 + // 调用接口获取数据
  144 + $banner = IndexData::getBannerStart($resource);
  145 + if (isset($banner['code']) && $banner['code'] == 200) {
  146 + // 构建数据
  147 + $data = array();
  148 + foreach ($banner['data'] as $val) {
  149 + $data['list'][] = $val;
  150 + }
  151 +
  152 + $result = FloorProcess::getContent($data, $channel);
  153 + }
  154 +
  155 + if (USE_CACHE) {
  156 + // 接口调用异常时, 不害怕,从我们的二级缓存(slave)里再取数据.
  157 + if (empty($result)) {
  158 + $result = Cache::get($cache, 'slave');
  159 + }
  160 + // 接口调用正常,数据封装完成, 则设置一级(master)和二级(slave)数据缓存
  161 + else {
  162 + Cache::set($cache, $result);
  163 + }
  164 + }
  165 +
  166 + return $result;
  167 + }
  168 +
  169 + /**
115 * 获取男生首页的楼层数据 170 * 获取男生首页的楼层数据
116 * 171 *
117 * @return array | false 172 * @return array | false
@@ -48,7 +48,7 @@ class SideModel @@ -48,7 +48,7 @@ class SideModel
48 $result[$key]['textEn'] = $value['sort_name_en']; 48 $result[$key]['textEn'] = $value['sort_name_en'];
49 $result[$key]['styleClass'] = strtolower($value['sort_name_en']); 49 $result[$key]['styleClass'] = strtolower($value['sort_name_en']);
50 $result[$key]['url'] = Helpers::getFilterUrl($value['sort_url']); 50 $result[$key]['url'] = Helpers::getFilterUrl($value['sort_url']);
51 - $result[$key]['img'] = Helpers::getImageUrl($value['sort_ico'], 60, 60); 51 + $result[$key]['img'] = Helpers::getImageUrl($value['sort_ico'], 60, 60, 1);
52 } 52 }
53 } 53 }
54 54
@@ -5,6 +5,7 @@ namespace Product; @@ -5,6 +5,7 @@ namespace Product;
5 use Configs\CacheConfig; 5 use Configs\CacheConfig;
6 use LibModels\Wap\Product\NewsaleData; 6 use LibModels\Wap\Product\NewsaleData;
7 use Plugin\DataProcess\NewSaleProcess; 7 use Plugin\DataProcess\NewSaleProcess;
  8 +use Plugin\DataProcess\ListProcess;
8 use Plugin\Helpers; 9 use Plugin\Helpers;
9 use Plugin\Cache; 10 use Plugin\Cache;
10 11
@@ -219,4 +220,22 @@ class NewsaleModel @@ -219,4 +220,22 @@ class NewsaleModel
219 220
220 return $result; 221 return $result;
221 } 222 }
  223 +
  224 +
  225 + /**
  226 + * 获取筛选数据
  227 + * @param array $data 接口返回的数据
  228 + * @return array 处理之后的数据
  229 + */
  230 + public static function filterData($data)
  231 + {
  232 + $result = array();
  233 +
  234 + /* 格式化筛选数据 */
  235 + if (isset($data['code']) && $data['code'] == 200 && isset($data['data']['filter'])) {
  236 + $result['filter'] = ListProcess::getFilterData($data['data']['filter']);
  237 + }
  238 +
  239 + return $result;
  240 + }
222 } 241 }
@@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
3 use Action\AbstractAction; 3 use Action\AbstractAction;
4 use LibModels\Wap\Passport\BackData; 4 use LibModels\Wap\Passport\BackData;
5 use LibModels\Wap\Passport\RegData; 5 use LibModels\Wap\Passport\RegData;
  6 +use Plugin\Helpers;
6 7
7 /** 8 /**
8 * 频道选择 9 * 频道选择
@@ -31,9 +32,21 @@ class BackController extends AbstractAction @@ -31,9 +32,21 @@ class BackController extends AbstractAction
31 */ 32 */
32 public function sendemailAction() 33 public function sendemailAction()
33 { 34 {
34 - if($this->isAjax()) 35 + $result = array('code' => 400, 'message' => '邮箱格式不正确,请重新输入', 'data' => '');
  36 + do
35 { 37 {
  38 + /* 判断是不是AJAX请求 */
  39 + if (!$this->isAjax())
  40 + {
  41 + break;
  42 + }
  43 +
36 $email = $this->post('email', ''); 44 $email = $this->post('email', '');
  45 + // 判断邮箱是否有效
  46 + if(!Helpers::verifyEmail($email))
  47 + {
  48 + break;
  49 + }
37 50
38 // 发送邮箱验证码 51 // 发送邮箱验证码
39 $result = BackData::sendCodeToEmail($email); 52 $result = BackData::sendCodeToEmail($email);
@@ -42,8 +55,10 @@ class BackController extends AbstractAction @@ -42,8 +55,10 @@ class BackController extends AbstractAction
42 $result['data'] = '/passport/back/success?email='.$email; 55 $result['data'] = '/passport/back/success?email='.$email;
43 } 56 }
44 57
45 - $this->echoJson($result);  
46 } 58 }
  59 + while (false);
  60 +
  61 + $this->echoJson($result);
47 } 62 }
48 63
49 /** 64 /**
@@ -51,15 +66,28 @@ class BackController extends AbstractAction @@ -51,15 +66,28 @@ class BackController extends AbstractAction
51 */ 66 */
52 public function resendemailAction() 67 public function resendemailAction()
53 { 68 {
54 - if($this->isAjax()) 69 + $result = array('code' => 400, 'message' => '重发邮件失败');
  70 + do
55 { 71 {
  72 + if(!$this->isAjax())
  73 + {
  74 + break;
  75 + }
  76 +
56 $email = $this->get('email', ''); 77 $email = $this->get('email', '');
57 78
58 // 发送邮箱验证码 79 // 发送邮箱验证码
59 - $result = BackData::sendCodeToEmail($email); 80 + $return = BackData::sendCodeToEmail($email);
  81 +
  82 + if(!empty($return))
  83 + {
  84 + $result = $return;
  85 + }
60 86
61 - $this->echoJson($result);  
62 } 87 }
  88 + while(false);
  89 +
  90 + $this->echoJson($result);
63 } 91 }
64 92
65 public function successAction() 93 public function successAction()
@@ -72,7 +100,7 @@ class BackController extends AbstractAction @@ -72,7 +100,7 @@ class BackController extends AbstractAction
72 $domain_name = 'http://' . (($domain == 'gmail.com') ? 'mail.google.com' : 'mail.' . $domain); 100 $domain_name = 'http://' . (($domain == 'gmail.com') ? 'mail.google.com' : 'mail.' . $domain);
73 101
74 $data = array( 102 $data = array(
75 - 'backUrl' => 'emailback.html', 103 + 'backUrl' => '/emailback.html',
76 'headerText' => '找回密码', 104 'headerText' => '找回密码',
77 'isPassportPage' => true, 105 'isPassportPage' => true,
78 'backEmailSuccess' => true, 106 'backEmailSuccess' => true,
@@ -133,20 +161,34 @@ class BackController extends AbstractAction @@ -133,20 +161,34 @@ class BackController extends AbstractAction
133 */ 161 */
134 public function sendcodeAction() 162 public function sendcodeAction()
135 { 163 {
136 - if($this->isAjax()) 164 + $result = array('code' => 400, 'message' => '手机号码格式不正确,请重新输入', 'data' => '');
  165 + do
137 { 166 {
  167 + /* 判断是不是AJAX请求 */
  168 + if (!$this->isAjax())
  169 + {
  170 + break;
  171 + }
138 $phoneNum = $this->post('phoneNum', ''); 172 $phoneNum = $this->post('phoneNum', '');
139 $areaCode = $this->post('areaCode', 86); 173 $areaCode = $this->post('areaCode', 86);
140 174
  175 + if(!Helpers::verifyMobile($phoneNum))
  176 + {
  177 + break;
  178 + }
  179 +
141 // 发送手机验证码 180 // 发送手机验证码
142 - $result = BackData::sendCodeToMobile($phoneNum, $areaCode);  
143 - if($result['code'] === 200) 181 + $return = BackData::sendCodeToMobile($phoneNum, $areaCode);
  182 + if($return && $return['code'] === 200)
144 { 183 {
  184 + $result = $return;
145 $result['data'] = '/passport/back/mobilecode?phoneNum='.$phoneNum.'&areaCode='.$areaCode; 185 $result['data'] = '/passport/back/mobilecode?phoneNum='.$phoneNum.'&areaCode='.$areaCode;
146 } 186 }
147 187
148 - $this->echoJson($result);  
149 } 188 }
  189 + while (false);
  190 +
  191 + $this->echoJson($result);
150 } 192 }
151 193
152 /** 194 /**
@@ -78,7 +78,7 @@ class NewsaleController extends AbstractAction @@ -78,7 +78,7 @@ class NewsaleController extends AbstractAction
78 public function selectNewSaleAction() 78 public function selectNewSaleAction()
79 { 79 {
80 if ($this->isAjax()) { 80 if ($this->isAjax()) {
81 - $gender = $this->get('gender', 'boys'); 81 + $gender = $this->get('gender', null);
82 $brand = $this->get('brand', null); 82 $brand = $this->get('brand', null);
83 $sort = $this->get('sort', null); 83 $sort = $this->get('sort', null);
84 $color = $this->get('color', null); 84 $color = $this->get('color', null);
@@ -89,30 +89,10 @@ class NewsaleController extends AbstractAction @@ -89,30 +89,10 @@ class NewsaleController extends AbstractAction
89 $limit = $this->get('limit', 60); 89 $limit = $this->get('limit', 60);
90 $page = $this->get('page', 1); 90 $page = $this->get('page', 1);
91 91
92 - // 转换性别  
93 - if ($gender === 'boys') {  
94 - $gender = '1,3';  
95 - } elseif ($gender === 'girls') {  
96 - $gender = '2,3';  
97 - } else {  
98 - $gender = '1,2,3';  
99 - }  
100 -  
101 // 转换排序方式 92 // 转换排序方式
102 - $order = $this->get('order', null); 93 + $orderVal = $this->get('order', null);
103 $type = $this->get('type', ''); 94 $type = $this->get('type', '');
104 - switch ($type) {  
105 - case 'price':  
106 - $order = ($order == 0) ? 's_p_desc' : 's_p_asc';  
107 - break;  
108 - case 'discount':  
109 - $order = ($order == 0) ? 'p_d_desc' : 'p_d_asc';  
110 - break;  
111 - case 'newest':  
112 - default:  
113 - $order = ($order == 0) ? 's_t_desc' : 's_t_asc';  
114 - break;  
115 - } 95 + $order = Helpers::transOrder($orderVal, $type);
116 96
117 // 转换频道 97 // 转换频道
118 $channel = Helpers::getChannelByCookie(); 98 $channel = Helpers::getChannelByCookie();
@@ -132,4 +112,45 @@ class NewsaleController extends AbstractAction @@ -132,4 +112,45 @@ class NewsaleController extends AbstractAction
132 } 112 }
133 } 113 }
134 114
  115 + /**
  116 + * Ajax方式查询筛选数据
  117 + *
  118 + * @return array 筛选数据
  119 + */
  120 + public function filterAction()
  121 + {
  122 + if ($this->isAjax()) {
  123 + $gender = $this->get('gender', null);
  124 + $brand = $this->get('brand', null);
  125 + $sort = $this->get('sort', null);
  126 + $color = $this->get('color', null);
  127 + $size = $this->get('size', null);
  128 + $price = $this->get('price', null);
  129 + $p_d = $this->get('discount', null);
  130 + $dayLimit = $this->get('dayLimit', null);
  131 + $limit = $this->get('limit', 60);
  132 + $page = $this->get('page', 1);
  133 +
  134 + // 转换排序方式
  135 + $orderVal = $this->get('order', null);
  136 + $type = $this->get('type', '');
  137 + $order = Helpers::transOrder($orderVal, $type);
  138 +
  139 + $channel = Helpers::getChannelByCookie();
  140 +
  141 + $data = NewsaleData::selectNewSaleProducts(
  142 + $gender, $brand, $sort, $color, $size, $price, $p_d, $channel, $dayLimit, $limit, $page, $order
  143 + );
  144 + $result = \Product\NewsaleModel::filterData($data);
  145 +
  146 + if (empty($result)) {
  147 + echo ' ';
  148 + } else {
  149 + $this->_view->display('filter', $result);
  150 + }
  151 + } else {
  152 + echo ' ';
  153 + }
  154 + }
  155 +
135 } 156 }