Authored by 王水玲

搜索相关js,css 检验

@@ -31,6 +31,7 @@ const _formShopData = (data, shopId, isApp) => { @@ -31,6 +31,7 @@ const _formShopData = (data, shopId, isApp) => {
31 if (data.decorator) { 31 if (data.decorator) {
32 _.forEach(data.decorator.list, (floor) => { 32 _.forEach(data.decorator.list, (floor) => {
33 let resData = JSON.parse(floor.resourceData); 33 let resData = JSON.parse(floor.resourceData);
  34 +
34 floor[_.camelCase(floor.resourceName)] = true; 35 floor[_.camelCase(floor.resourceName)] = true;
35 36
36 // 店铺banner 37 // 店铺banner
@@ -61,6 +62,7 @@ const _formShopData = (data, shopId, isApp) => { @@ -61,6 +62,7 @@ const _formShopData = (data, shopId, isApp) => {
61 let brand = { 62 let brand = {
62 list: [] 63 list: []
63 }; 64 };
  65 +
64 brandId = ''; 66 brandId = '';
65 67
66 // 少于2个不展示 单品店:单品店根据品牌id查询 68 // 少于2个不展示 单品店:单品店根据品牌id查询
@@ -71,7 +73,7 @@ const _formShopData = (data, shopId, isApp) => { @@ -71,7 +73,7 @@ const _formShopData = (data, shopId, isApp) => {
71 _.forEach(resData, (item) => { 73 _.forEach(resData, (item) => {
72 if (item.brandDomain) { 74 if (item.brandDomain) {
73 brand.list.push({ 75 brand.list.push({
74 - url: helpers.urlFormat('', '', item.brandDomain) + (isApp ? `?openby:yohobuy={"action":"go.brand","params":{"shop_id":${shopId},"brand_id":${item.id}}}` : ''), 76 + url: helpers.urlFormat('', '', item.brandDomain) + (isApp ? `?openby:yohobuy={"action":"go.brand","params":{"shop_id":${shopId},"brand_id":${item.id}}}` : ''), //eslint-disable-line
75 img: helpers.image(item.brandIco, 640, 400), 77 img: helpers.image(item.brandIco, 640, 400),
76 brandName: item.brandName 78 brandName: item.brandName
77 }); 79 });
@@ -95,6 +97,7 @@ const _formShopData = (data, shopId, isApp) => { @@ -95,6 +97,7 @@ const _formShopData = (data, shopId, isApp) => {
95 let bannerTop = { 97 let bannerTop = {
96 data: [] 98 data: []
97 }; 99 };
  100 +
98 _.forEach(resData, (item) => { 101 _.forEach(resData, (item) => {
99 if (item.data[0]) { 102 if (item.data[0]) {
100 bannerTop.data.push({ 103 bannerTop.data.push({
@@ -134,7 +137,7 @@ const _formShopData = (data, shopId, isApp) => { @@ -134,7 +137,7 @@ const _formShopData = (data, shopId, isApp) => {
134 137
135 _.forEach(resData, (item) => { 138 _.forEach(resData, (item) => {
136 goods.push({ 139 goods.push({
137 - url: helpers.urlFormat(item.productId, item.goodsId, item.cnAlphabet) + (isApp ? `?openby:yohobuy={"action":"go.productDetail","params":{"product_skn":${item.productSkn}}` : ''), 140 + url: helpers.urlFormat(item.productId, item.goodsId, item.cnAlphabet) + (isApp ? `?openby:yohobuy={"action":"go.productDetail","params":{"product_skn":${item.productSkn}}` : ''),//eslint-disable-line
138 img: helpers.image(item.src, 235, 314), 141 img: helpers.image(item.src, 235, 314),
139 productName: item.productName, 142 productName: item.productName,
140 salesPrice: item.salesPrice, 143 salesPrice: item.salesPrice,
@@ -155,7 +158,7 @@ const _formShopData = (data, shopId, isApp) => { @@ -155,7 +158,7 @@ const _formShopData = (data, shopId, isApp) => {
155 158
156 formatData = _.assign({ 159 formatData = _.assign({
157 logoImg: data.shopInfo.shopLogo, 160 logoImg: data.shopInfo.shopLogo,
158 - storeName: (data.shopInfo.isShowShopName === 'Y') ? list.shopName : '', 161 + storeName: (data.shopInfo.isShowShopName === 'Y') ? data.shopInfo.shopName : '',
159 collect: data.shopInfo.isFavorite === 'Y', 162 collect: data.shopInfo.isFavorite === 'Y',
160 url: helpers.urlFormat('', { 163 url: helpers.urlFormat('', {
161 shop_id: shopId 164 shop_id: shopId
@@ -183,12 +186,12 @@ const _formShopData = (data, shopId, isApp) => { @@ -183,12 +186,12 @@ const _formShopData = (data, shopId, isApp) => {
183 }, formatData); 186 }, formatData);
184 } else { 187 } else {
185 formatData = _.assign({ 188 formatData = _.assign({
186 - allGoods: `${helpers.urlFormat('', allGoodsParam, 'search')}&openby:yohobuy={"action":"go.list","params":{"title":"全部商品", "actiontype":"0","shop_id":"' . self::$shopId . '","page":"1"}}`, 189 + allGoods: `${helpers.urlFormat('', allGoodsParam, 'search')}&openby:yohobuy={"action":"go.list","params":{"title":"全部商品", "actiontype":"0","shop_id":"' . self::$shopId . '","page":"1"}}`,//eslint-disable-line
187 shopIntroHref: helpers.urlFormat('/product/index/intro', { 190 shopIntroHref: helpers.urlFormat('/product/index/intro', {
188 shop_id: shopId, 191 shop_id: shopId,
189 app_version: isApp 192 app_version: isApp
190 }), 193 }),
191 - more_url: formatData.more_url + `?openby:yohobuy{"action":"go.list","params":{"shop_id":${shopId},"title":"人气单品"}}` 194 + more_url: formatData.more_url + `?openby:yohobuy{"action":"go.list","params":{"shop_id":${shopId},"title":"人气单品"}}`//eslint-disable-line
192 }, formatData); 195 }, formatData);
193 } 196 }
194 } 197 }
@@ -240,7 +243,7 @@ const _getShopData = (req, shopId, uid, isApp) => { @@ -240,7 +243,7 @@ const _getShopData = (req, shopId, uid, isApp) => {
240 let data = {}; 243 let data = {};
241 let channel = req.yoho.channel; 244 let channel = req.yoho.channel;
242 245
243 - return Promise.all([searchModel.getShopDecorator(shopId), searchModel.getShopInfo(shopId, uid)]).then((result) => { 246 + return Promise.all([listModel.getShopDecorator(shopId), listModel.getShopInfo(shopId, uid)]).then((result) => {
244 data = { 247 data = {
245 decorator: result[0], // 店铺装修资源数据 248 decorator: result[0], // 店铺装修资源数据
246 shopInfo: result[1] // 店铺信息 249 shopInfo: result[1] // 店铺信息
@@ -254,7 +257,7 @@ const _getShopData = (req, shopId, uid, isApp) => { @@ -254,7 +257,7 @@ const _getShopData = (req, shopId, uid, isApp) => {
254 } 257 }
255 258
256 // 店铺分类 259 // 店铺分类
257 - return searchModel.getShopCategory(shopId, channel).then((shopCategory) => { 260 + return listModel.getShopCategory(shopId, channel).then((shopCategory) => {
258 data = _.assign({ 261 data = _.assign({
259 shopCategory: shopCategory 262 shopCategory: shopCategory
260 }, data); 263 }, data);
@@ -272,7 +275,7 @@ const _baseShop = (req, res, data) => { @@ -272,7 +275,7 @@ const _baseShop = (req, res, data) => {
272 cartUrl: helpers.urlFormat('/cart/index/index') 275 cartUrl: helpers.urlFormat('/cart/index/index')
273 }, req.query); 276 }, req.query);
274 277
275 - Promise.all([searchModel.getShopDecorator(data.shopsId), searchModel.getShopBrands(data.shopsId)]).then((result) => { 278 + Promise.all([listModel.getShopDecorator(data.shopsId), listModel.getShopBrands(data.shopsId)]).then((result) => {
276 result[0] = result[0] || {}; 279 result[0] = result[0] || {};
277 280
278 console.log(result[0], result[1]); 281 console.log(result[0], result[1]);
@@ -345,7 +348,7 @@ const _shop = (req, res, shopId) => { @@ -345,7 +348,7 @@ const _shop = (req, res, shopId) => {
345 _getShopData(req, shopId, uid, isApp).then((result) => { 348 _getShopData(req, shopId, uid, isApp).then((result) => {
346 if (result.goBrand) { 349 if (result.goBrand) {
347 // 跳转基础模板 350 // 跳转基础模板
348 - _baseShop(req, res, result.goBrand); 351 + _baseShop(req, res, result.goBrand);
349 } else { 352 } else {
350 result = _.assign(result, pageHeader); 353 result = _.assign(result, pageHeader);
351 354
@@ -390,7 +393,7 @@ const brand = (req, res, next) => { @@ -390,7 +393,7 @@ const brand = (req, res, next) => {
390 res.redirect('/?go=1'); 393 res.redirect('/?go=1');
391 } 394 }
392 395
393 - searchModel.getBrandLogoByDomain(domain).then((result) => { 396 + listModel.getBrandLogoByDomain(domain).then((result) => {
394 brandLogo = result; 397 brandLogo = result;
395 398
396 title = brandLogo.name; 399 title = brandLogo.name;
@@ -407,7 +410,7 @@ const brand = (req, res, next) => { @@ -407,7 +410,7 @@ const brand = (req, res, next) => {
407 if (brandLogo.type === '2' && brandLogo.shopId) { 410 if (brandLogo.type === '2' && brandLogo.shopId) {
408 _shop(req, res, brandLogo.shopId); 411 _shop(req, res, brandLogo.shopId);
409 } else { // 获取品牌店铺信息 412 } else { // 获取品牌店铺信息
410 - searchModel.getBrandShops(brandId).then((brandShop) => { 413 + listModel.getBrandShops(brandId).then((brandShop) => {
411 if (brandId === 0) { 414 if (brandId === 0) {
412 params.query = domain; 415 params.query = domain;
413 } 416 }
@@ -415,20 +418,20 @@ const brand = (req, res, next) => { @@ -415,20 +418,20 @@ const brand = (req, res, next) => {
415 // 从搜索页过来的,显示搜索框, 和进入品牌引导信息 或者品牌关联多店铺 418 // 从搜索页过来的,显示搜索框, 和进入品牌引导信息 或者品牌关联多店铺
416 if (req.query.from === 'search' || brandShop.length > 0) { 419 if (req.query.from === 'search' || brandShop.length > 0) {
417 params = { 420 params = {
418 - brandWay: brandShop ? brandShop : brandLogo, 421 + brandWay: brandShop ? brandShop : brandLogo,
419 search: { 422 search: {
420 default: req.query.query, 423 default: req.query.query,
421 url: helpers.urlFormat('', null, 'search') 424 url: helpers.urlFormat('', null, 'search')
422 } 425 }
423 }; 426 };
424 } else if (brandId !== 0) { // 品牌一览过来的展示品牌介绍和LOGO 427 } else if (brandId !== 0) { // 品牌一览过来的展示品牌介绍和LOGO
425 - return Promise.all([searchModel.getBrandIntro(brandId, uid), searchModel.getBrandBanner(brandId)]).then((result) => {  
426 - title = result[0].title;  
427 - delete result[0].title; 428 + return Promise.all([listModel.getBrandIntro(brandId, uid), listModel.getBrandBanner(brandId)]).then((resData) => { //eslint-disable-line
  429 + title = resData[0].title;
  430 + delete resData[0].title;
428 431
429 return _.assign({ 432 return _.assign({
430 - banner: result[1]  
431 - }, result[0]); 433 + banner: resData[1]
  434 + }, resData[0]);
432 }); 435 });
433 } 436 }
434 }).then((brandHome) => { 437 }).then((brandHome) => {
@@ -455,8 +458,8 @@ const shopIntro = (req, res, next) => { @@ -455,8 +458,8 @@ const shopIntro = (req, res, next) => {
455 let appVersion = req.body.appVersion || false; 458 let appVersion = req.body.appVersion || false;
456 let params = {}; 459 let params = {};
457 460
458 - if (shopId){  
459 - searchModel.getShopIntro(shopId).then((result) => { 461 + if (shopId) {
  462 + listModel.getShopIntro(shopId).then((result) => {
460 if (appVersion) { 463 if (appVersion) {
461 params = { 464 params = {
462 title: '店铺简介' 465 title: '店铺简介'
@@ -509,13 +512,13 @@ const favoriteBrand = (req, res, next) => { @@ -509,13 +512,13 @@ const favoriteBrand = (req, res, next) => {
509 }); 512 });
510 return false; 513 return false;
511 } else if (opt !== 'ok') { // 取消收藏 514 } else if (opt !== 'ok') { // 取消收藏
512 - searchModel.setFavoriteCancel(id, uid, type).then((data) => { 515 + listModel.setFavoriteCancel(id, uid, type).then((data) => {
513 res.json(data); 516 res.json(data);
514 return false; 517 return false;
515 }).catch(next); 518 }).catch(next);
516 } 519 }
517 520
518 - searchModel.setFavorite(id, uid, type).then((result) => { 521 + listModel.setFavorite(id, uid, type).then((result) => {
519 if (!result.code) { // 收藏 522 if (!result.code) { // 收藏
520 result = { 523 result = {
521 code: 401, 524 code: 401,
@@ -4,7 +4,6 @@ @@ -4,7 +4,6 @@
4 * @date: 2016/07/21 4 * @date: 2016/07/21
5 */ 5 */
6 'use strict'; 6 'use strict';
7 -const utils = '../../../utils';  
8 const logger = global.yoho.logger; 7 const logger = global.yoho.logger;
9 const camelCase = global.yoho.camelCase; 8 const camelCase = global.yoho.camelCase;
10 const _ = require('lodash'); 9 const _ = require('lodash');
@@ -38,7 +38,7 @@ const _searchGoods = (params) => { @@ -38,7 +38,7 @@ const _searchGoods = (params) => {
38 limit: '60' 38 limit: '60'
39 }, params); 39 }, params);
40 40
41 - params.order = params.order === '0' ? 's_t_desc' :'s_t_asc'; 41 + params.order = params.order === '0' ? 's_t_desc' : 's_t_asc';
42 42
43 return api.get('', _.assign({ 43 return api.get('', _.assign({
44 method: method 44 method: method
@@ -52,7 +52,7 @@ const _searchGoods = (params) => { @@ -52,7 +52,7 @@ const _searchGoods = (params) => {
52 */ 52 */
53 const getNewFocus = (channel) => { 53 const getNewFocus = (channel) => {
54 return serviceAPI.get('operations/api/v5/resource/get', { 54 return serviceAPI.get('operations/api/v5/resource/get', {
55 - content_code: contentCode['new'][channel] 55 + content_code: contentCode.new[channel]
56 }, { 56 }, {
57 cache: true 57 cache: true
58 }).then((result) => { 58 }).then((result) => {
@@ -30,9 +30,9 @@ @@ -30,9 +30,9 @@
30 <p class="store-name">{{storeName}}</p> 30 <p class="store-name">{{storeName}}</p>
31 <div class="collect"> 31 <div class="collect">
32 {{#if collect}} 32 {{#if collect}}
33 - <div class="alreadyCollect" id="collect"></div> 33 + <div class="already-collect" id="collect"></div>
34 {{else}} 34 {{else}}
35 - <div class="notCollect buriedpoint" id="collect" data-bp-id="shop_branner_collect_1"></div> 35 + <div class="not-collect buriedpoint" id="collect" data-bp-id="shop_branner_collect_1"></div>
36 {{/if}} 36 {{/if}}
37 </div> 37 </div>
38 </div> 38 </div>
@@ -15,11 +15,11 @@ module.exports = { @@ -15,11 +15,11 @@ module.exports = {
15 port: 6001, 15 port: 6001,
16 siteUrl: '//m.yohobuy.com', 16 siteUrl: '//m.yohobuy.com',
17 domains: { 17 domains: {
18 - //api: 'http://devapi.yoho.cn:58078/',  
19 - //service: 'http://devservice.yoho.cn:58077/' 18 + // api: 'http://devapi.yoho.cn:58078/',
  19 + // service: 'http://devservice.yoho.cn:58077/'
20 // 20 //
21 - //api: 'http://testapi.yoho.cn:28078/',  
22 - //service: 'http://testservice.yoho.cn:28077/' 21 + // api: 'http://testapi.yoho.cn:28078/',
  22 + // service: 'http://testservice.yoho.cn:28077/'
23 23
24 api: 'http://api.yoho.cn/', 24 api: 'http://api.yoho.cn/',
25 service: 'http://service.yoho.cn/' 25 service: 'http://service.yoho.cn/'
1 -var $ = require('yoho-jquery'),  
2 - phone, 1 +var $ = require('yoho-jquery');
  2 +var phone,
3 reg, 3 reg,
4 orderCode = $('#orderCode').html(), 4 orderCode = $('#orderCode').html(),
5 oldUserCouponPic = $('#oldUserCouponPic').html(), 5 oldUserCouponPic = $('#oldUserCouponPic').html(),
@@ -18,7 +18,7 @@ function getQueryString(name) { @@ -18,7 +18,7 @@ function getQueryString(name) {
18 var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i'); 18 var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
19 var r = window.location.search.substr(1).match(reg); 19 var r = window.location.search.substr(1).match(reg);
20 20
21 - if (r != null) { 21 + if (r !== null) {
22 return window.unescape(r[2]); 22 return window.unescape(r[2]);
23 } 23 }
24 return null; 24 return null;
@@ -40,7 +40,7 @@ function downLoadApp() { @@ -40,7 +40,7 @@ function downLoadApp() {
40 }, 500); 40 }, 500);
41 } 41 }
42 42
43 -$('#float-layer-close').on('touchend', function(e) { 43 +$('#float-layer-close').on('touchend', function() {
44 $('#float-layer-app').hide(); 44 $('#float-layer-app').hide();
45 window.setCookie('_float-layer-app', 'id490655927', 45 window.setCookie('_float-layer-app', 'id490655927',
46 { 46 {
@@ -24,10 +24,10 @@ var $goodsContainer = $('#goods-container'), @@ -24,10 +24,10 @@ var $goodsContainer = $('#goods-container'),
24 var winH = $(window).height(), 24 var winH = $(window).height(),
25 noResult = '<p class="no-result">未找到相关搜索结果</p>'; 25 noResult = '<p class="no-result">未找到相关搜索结果</p>';
26 26
27 -//默认筛选条件 27 +// 默认筛选条件
28 var defaultOpt = require('../../common/query-param'); 28 var defaultOpt = require('../../common/query-param');
29 29
30 -var storeOpt = $.extend({}, defaultOpt); //存储默认筛选条件以便重置 30 +var storeOpt = $.extend({}, defaultOpt); // 存储默认筛选条件以便重置
31 31
32 var now = new Date(), 32 var now = new Date(),
33 month = now.getMonth() + 1, 33 month = now.getMonth() + 1,
@@ -35,7 +35,7 @@ var now = new Date(), @@ -35,7 +35,7 @@ var now = new Date(),
35 35
36 var $listNav = $('#list-nav'), 36 var $listNav = $('#list-nav'),
37 37
38 - //导航数据信息 38 + // 导航数据信息
39 navInfo = { 39 navInfo = {
40 today: { 40 today: {
41 reload: true, 41 reload: true,
@@ -53,10 +53,10 @@ var $listNav = $('#list-nav'), @@ -53,10 +53,10 @@ var $listNav = $('#list-nav'),
53 end: false 53 end: false
54 } 54 }
55 }, 55 },
56 - $pre = $listNav.find('.active'), //纪录进入筛选前的active项,初始为选中项 56 + $pre = $listNav.find('.active'), // 纪录进入筛选前的active项,初始为选中项
57 searching; 57 searching;
58 58
59 -require('../../common/suspend-cart'); //悬浮购物车 59 +require('../../common/suspend-cart'); // 悬浮购物车
60 require('../../common'); 60 require('../../common');
61 61
62 ellipsis.init(); 62 ellipsis.init();
@@ -94,14 +94,14 @@ function search(opt) { @@ -94,14 +94,14 @@ function search(opt) {
94 94
95 if (opt) { 95 if (opt) {
96 96
97 - //筛选项变更则重置reload为true 97 + // 筛选项变更则重置reload为true
98 for (att in navInfo) { 98 for (att in navInfo) {
99 if (navInfo.hasOwnProperty(att)) { 99 if (navInfo.hasOwnProperty(att)) {
100 navInfo[att].reload = true; 100 navInfo[att].reload = true;
101 } 101 }
102 } 102 }
103 103
104 - //处理active状态 104 + // 处理active状态
105 $listNav.children('.active').removeClass('active'); 105 $listNav.children('.active').removeClass('active');
106 $pre.addClass('active'); 106 $pre.addClass('active');
107 107
@@ -161,12 +161,14 @@ function search(opt) { @@ -161,12 +161,14 @@ function search(opt) {
161 p_d: opt.id 161 p_d: opt.id
162 }; 162 };
163 break; 163 break;
  164 + default:
  165 + break;
164 } 166 }
165 167
166 - $.extend(defaultOpt, ext); //扩展筛选项 168 + $.extend(defaultOpt, ext); // 扩展筛选项
167 } 169 }
168 170
169 - //导航类别 171 + // 导航类别
170 if ($pre.hasClass('today')) { 172 if ($pre.hasClass('today')) {
171 navType = 'today'; 173 navType = 'today';
172 dayLimit = 1; 174 dayLimit = 1;
@@ -185,7 +187,7 @@ function search(opt) { @@ -185,7 +187,7 @@ function search(opt) {
185 page = 1; 187 page = 1;
186 } else if (nav.end) { 188 } else if (nav.end) {
187 189
188 - //不需要重新加载并且数据请求结束 190 + // 不需要重新加载并且数据请求结束
189 return; 191 return;
190 } 192 }
191 193
@@ -215,6 +217,8 @@ function search(opt) { @@ -215,6 +217,8 @@ function search(opt) {
215 case 'sale': 217 case 'sale':
216 $container = $dgc; 218 $container = $dgc;
217 break; 219 break;
  220 + default:
  221 + break;
218 } 222 }
219 223
220 if (data === ' ') { 224 if (data === ' ') {
@@ -230,7 +234,7 @@ function search(opt) { @@ -230,7 +234,7 @@ function search(opt) {
230 num = $container.find('.good-info').length; 234 num = $container.find('.good-info').length;
231 $container.append(data); 235 $container.append(data);
232 236
233 - //lazy good-infos who append in 237 + // lazy good-infos who append in
234 lazyLoad($container.find('.good-info:gt(' + (num - 1) + ') .lazy')); 238 lazyLoad($container.find('.good-info:gt(' + (num - 1) + ') .lazy'));
235 } 239 }
236 240
@@ -267,12 +271,12 @@ $.ajax({ @@ -267,12 +271,12 @@ $.ajax({
267 success: function(data) { 271 success: function(data) {
268 $goodsContainer.append(data); 272 $goodsContainer.append(data);
269 273
270 - //初始化filter&注册filter回调 274 + // 初始化filter&注册filter回调
271 filter.initFilter({ 275 filter.initFilter({
272 fCbFn: search, 276 fCbFn: search,
273 hCbFn: function() { 277 hCbFn: function() {
274 278
275 - //切换active状态到$pre上 279 + // 切换active状态到$pre上
276 $pre.addClass('active'); 280 $pre.addClass('active');
277 $pre.siblings('.filter').removeClass('active'); 281 $pre.siblings('.filter').removeClass('active');
278 } 282 }
@@ -281,16 +285,16 @@ $.ajax({ @@ -281,16 +285,16 @@ $.ajax({
281 }); 285 });
282 lazyLoad($('.lazy')); 286 lazyLoad($('.lazy'));
283 287
284 -$listNav.bind('contextmenu', function(e) { 288 +$listNav.bind('contextmenu', function() {
285 return false; 289 return false;
286 }); 290 });
287 291
288 -//导航栏点击逻辑说明:  
289 -//1.点击非active项时切换active状态  
290 -//2.价格和折扣active状态时继续点击切换排序  
291 -//3.筛选无active时点击展开筛选面板  
292 -//4.筛选有active时点击隐藏筛选面板并恢复点击筛选前active项的active状态  
293 -//5.当前active为筛选并且点击其他项时,隐藏筛选面板 292 +// 导航栏点击逻辑说明:
  293 +// 1.点击非active项时切换active状态
  294 +// 2.价格和折扣active状态时继续点击切换排序
  295 +// 3.筛选无active时点击展开筛选面板
  296 +// 4.筛选有active时点击隐藏筛选面板并恢复点击筛选前active项的active状态
  297 +// 5.当前active为筛选并且点击其他项时,隐藏筛选面板
294 // navHammer = new Hammer($listNav[0]); 298 // navHammer = new Hammer($listNav[0]);
295 $listNav.on('touchend touchcancel', function(e) { 299 $listNav.on('touchend touchcancel', function(e) {
296 var $this = $(e.target).closest('li'), 300 var $this = $(e.target).closest('li'),
@@ -301,11 +305,11 @@ $listNav.on('touchend touchcancel', function(e) { @@ -301,11 +305,11 @@ $listNav.on('touchend touchcancel', function(e) {
301 e.preventDefault(); 305 e.preventDefault();
302 if ($this.hasClass('filter')) { 306 if ($this.hasClass('filter')) {
303 307
304 - //筛选面板切换状态 308 + // 筛选面板切换状态
305 if ($this.hasClass('active')) { 309 if ($this.hasClass('active')) {
306 filter.hideFilter(); 310 filter.hideFilter();
307 311
308 - //点击筛选钱的active项回复active 312 + // 点击筛选钱的active项回复active
309 $pre.addClass('active'); 313 $pre.addClass('active');
310 $this.removeClass('active'); 314 $this.removeClass('active');
311 } else { 315 } else {
@@ -331,15 +335,15 @@ $listNav.on('touchend touchcancel', function(e) { @@ -331,15 +335,15 @@ $listNav.on('touchend touchcancel', function(e) {
331 335
332 $active = $this.siblings('.active'); 336 $active = $this.siblings('.active');
333 337
334 - $pre = $this; //$pre为除筛选导航的其他导航项,若当前active的为筛选,则把$pre置为当前点击项 338 + $pre = $this; // $pre为除筛选导航的其他导航项,若当前active的为筛选,则把$pre置为当前点击项
335 339
336 if ($active.hasClass('filter')) { 340 if ($active.hasClass('filter')) {
337 341
338 - //若之前active项为筛选,则隐藏筛选面板 342 + // 若之前active项为筛选,则隐藏筛选面板
339 filter.hideFilter(); 343 filter.hideFilter();
340 } else { 344 } else {
341 345
342 - //切换container显示 346 + // 切换container显示
343 $goodsContainer.children('.container:not(.hide)').addClass('hide'); 347 $goodsContainer.children('.container:not(.hide)').addClass('hide');
344 348
345 switch (navType) { 349 switch (navType) {
@@ -354,9 +358,11 @@ $listNav.on('touchend touchcancel', function(e) { @@ -354,9 +358,11 @@ $listNav.on('touchend touchcancel', function(e) {
354 case 'sale': 358 case 'sale':
355 $dgc.removeClass('hide'); 359 $dgc.removeClass('hide');
356 break; 360 break;
  361 + default:
  362 + break;
357 } 363 }
358 364
359 - //重置筛选项 365 + // 重置筛选项
360 filter.resetFilter(); 366 filter.resetFilter();
361 defaultOpt = $.extend({}, storeOpt); 367 defaultOpt = $.extend({}, storeOpt);
362 } 368 }
@@ -374,7 +380,7 @@ $listNav.on('touchend touchcancel', function(e) { @@ -374,7 +380,7 @@ $listNav.on('touchend touchcancel', function(e) {
374 380
375 function scrollHandler() { 381 function scrollHandler() {
376 382
377 - //当scroll到1/4$goodsContainer高度后继续请求下一页数据 383 + // 当scroll到1/4$goodsContainer高度后继续请求下一页数据
378 if ($(window).scrollTop() + winH > 384 if ($(window).scrollTop() + winH >
379 $(document).height() - 0.25 * $goodsContainer.height() - 50) { 385 $(document).height() - 0.25 * $goodsContainer.height() - 50) {
380 if ($pre !== undefined) { 386 if ($pre !== undefined) {
@@ -383,15 +389,15 @@ function scrollHandler() { @@ -383,15 +389,15 @@ function scrollHandler() {
383 } 389 }
384 } 390 }
385 391
386 -//srcoll to load more 392 +// srcoll to load more
387 $(window).scroll(function() { 393 $(window).scroll(function() {
388 window.requestAnimationFrame(scrollHandler); 394 window.requestAnimationFrame(scrollHandler);
389 }); 395 });
390 396
391 -//初始请求最新第一页数据 397 +// 初始请求最新第一页数据
392 search(); 398 search();
393 399
394 -$listNav.on('touchstart', 'li', function(e) { 400 +$listNav.on('touchstart', 'li', function() {
395 $(this).addClass('bytouch'); 401 $(this).addClass('bytouch');
396 }).on('touchend touchcancel', function() { 402 }).on('touchend touchcancel', function() {
397 $listNav.find('li').removeClass('bytouch'); 403 $listNav.find('li').removeClass('bytouch');
@@ -33,7 +33,7 @@ var $input = $('#search-input input'), @@ -33,7 +33,7 @@ var $input = $('#search-input input'),
33 $buriedpoint = $('.buriedpoint'), 33 $buriedpoint = $('.buriedpoint'),
34 $search = $('#search'); 34 $search = $('#search');
35 35
36 -var shopId, sort, brand, outlets; 36 +var shopId, sort, brand, outlets, ageLevel;
37 37
38 // 默认筛选条件 38 // 默认筛选条件
39 var defaultOpt = require('../../common/query-param'); 39 var defaultOpt = require('../../common/query-param');
@@ -155,7 +155,7 @@ function getQueryString(name) { @@ -155,7 +155,7 @@ function getQueryString(name) {
155 shopId = getQueryString('shop_id'); 155 shopId = getQueryString('shop_id');
156 sort = getQueryString('sort'); 156 sort = getQueryString('sort');
157 outlets = getQueryString('outlets'); 157 outlets = getQueryString('outlets');
158 -age_level = outlets = getQueryString('ageLevel'); 158 +ageLevel = outlets = getQueryString('ageLevel');
159 159
160 /** 160 /**
161 * 筛选注册的回调,筛选子项点击后逻辑 161 * 筛选注册的回调,筛选子项点击后逻辑
@@ -277,8 +277,8 @@ function search(opt) { @@ -277,8 +277,8 @@ function search(opt) {
277 params.shop_id = shopId; 277 params.shop_id = shopId;
278 } 278 }
279 279
280 - if (age_level) {  
281 - params.age_level = age_level; 280 + if (ageLevel) {
  281 + params.age_level = ageLevel;
282 } 282 }
283 283
284 if (sort) { 284 if (sort) {
@@ -494,6 +494,8 @@ $listNav.on('touchend touchcancel', function(e) { @@ -494,6 +494,8 @@ $listNav.on('touchend touchcancel', function(e) {
494 case 'discount': 494 case 'discount':
495 $dgc.removeClass('hide'); 495 $dgc.removeClass('hide');
496 break; 496 break;
  497 + default:
  498 + break;
497 } 499 }
498 } 500 }
499 501
@@ -5,16 +5,14 @@ @@ -5,16 +5,14 @@
5 var $ = require('yoho-jquery'), 5 var $ = require('yoho-jquery'),
6 IScroll = require('yoho-iscroll/build/iscroll-probe'), 6 IScroll = require('yoho-iscroll/build/iscroll-probe'),
7 lazyLoad = require('yoho-jquery-lazyload'), 7 lazyLoad = require('yoho-jquery-lazyload'),
8 - Swiper = require('yoho-swiper'),  
9 - bannerSwiper, 8 + Swiper = require('yoho-swiper');
  9 +var bannerSwiper,
10 multiSwiper, 10 multiSwiper,
11 myScroll, 11 myScroll,
12 imgH, 12 imgH,
13 nav1H, 13 nav1H,
14 main1H, 14 main1H,
15 main1oH, 15 main1oH,
16 - nav2H,  
17 - main2oH,  
18 scH, 16 scH,
19 $nav1 = $('#pos-nav'), 17 $nav1 = $('#pos-nav'),
20 $nav2 = $('#pos-list'), 18 $nav2 = $('#pos-list'),
@@ -304,6 +302,8 @@ myScroll.on('scroll', function() { @@ -304,6 +302,8 @@ myScroll.on('scroll', function() {
304 }; 302 };
305 hotData(scrollCall); 303 hotData(scrollCall);
306 break; 304 break;
  305 + default:
  306 + break;
307 } 307 }
308 } 308 }
309 309
@@ -380,8 +380,6 @@ $(window).load(function() { @@ -380,8 +380,6 @@ $(window).load(function() {
380 nav1H = $('#nav').outerHeight(); 380 nav1H = $('#nav').outerHeight();
381 main1H = $('#nav-main').height(); 381 main1H = $('#nav-main').height();
382 main1oH = $('#nav-main').outerHeight(); 382 main1oH = $('#nav-main').outerHeight();
383 - nav2H = $('#list-nav').outerHeight();  
384 - main2oH = $('#goods-container').outerHeight();  
385 setTimeout(function() { 383 setTimeout(function() {
386 scH = $('#scroller').outerHeight(); 384 scH = $('#scroller').outerHeight();
387 }, 1000); 385 }, 1000);
@@ -460,6 +458,8 @@ function search(opt) { @@ -460,6 +458,8 @@ function search(opt) {
460 age_level: opt.id 458 age_level: opt.id
461 }; 459 };
462 break; 460 break;
  461 + default:
  462 + break;
463 } 463 }
464 $.extend(defaultOpt, ext); // 扩展筛选项 464 $.extend(defaultOpt, ext); // 扩展筛选项
465 } 465 }
@@ -517,6 +517,8 @@ function search(opt) { @@ -517,6 +517,8 @@ function search(opt) {
517 case 'discount': 517 case 'discount':
518 $container = $dgc; 518 $container = $dgc;
519 break; 519 break;
  520 + default:
  521 + break;
520 } 522 }
521 523
522 if (data === '') { 524 if (data === '') {
@@ -565,7 +567,7 @@ function getQueryString(name) { @@ -565,7 +567,7 @@ function getQueryString(name) {
565 var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i'); 567 var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
566 var r = window.location.search.substr(1).match(reg); 568 var r = window.location.search.substr(1).match(reg);
567 569
568 - if (r != null) { 570 + if (r !== null) {
569 return window.unescape(r[2]); 571 return window.unescape(r[2]);
570 } 572 }
571 return null; 573 return null;
@@ -602,7 +604,7 @@ $.ajax({ @@ -602,7 +604,7 @@ $.ajax({
602 } 604 }
603 }); 605 });
604 606
605 -$listNav.bind('contextmenu', function(e) { 607 +$listNav.bind('contextmenu', function() {
606 return false; 608 return false;
607 }); 609 });
608 610
@@ -682,6 +684,8 @@ $subNav.on('touchend touchcancel', function(e) { @@ -682,6 +684,8 @@ $subNav.on('touchend touchcancel', function(e) {
682 case 'discount': 684 case 'discount':
683 $dgc.removeClass('hide'); 685 $dgc.removeClass('hide');
684 break; 686 break;
  687 + default:
  688 + break;
685 } 689 }
686 690
687 } 691 }
@@ -711,6 +715,8 @@ $subNav.on('touchend touchcancel', function(e) { @@ -711,6 +715,8 @@ $subNav.on('touchend touchcancel', function(e) {
711 case 'discount': 715 case 'discount':
712 $dgc.removeClass('hide'); 716 $dgc.removeClass('hide');
713 break; 717 break;
  718 + default:
  719 + break;
714 } 720 }
715 } 721 }
716 722
@@ -763,14 +769,14 @@ search({ @@ -763,14 +769,14 @@ search({
763 nextPage: false 769 nextPage: false
764 }); 770 });
765 771
766 -$listNav.on('touchstart', 'li', function(e) { 772 +$listNav.on('touchstart', 'li', function() {
767 $(this).addClass('bytouch'); 773 $(this).addClass('bytouch');
768 }).on('touchend touchcancel', function() { 774 }).on('touchend touchcancel', function() {
769 $listNav.find('li').removeClass('bytouch'); 775 $listNav.find('li').removeClass('bytouch');
770 myScroll.refresh(); 776 myScroll.refresh();
771 }); 777 });
772 778
773 -$nav2.on('touchstart', 'li', function(e) { 779 +$nav2.on('touchstart', 'li', function() {
774 $(this).addClass('bytouch'); 780 $(this).addClass('bytouch');
775 }).on('touchend touchcancel', function() { 781 }).on('touchend touchcancel', function() {
776 $nav2.find('li').removeClass('bytouch'); 782 $nav2.find('li').removeClass('bytouch');
@@ -806,7 +812,7 @@ $collect.on('touchstart', function() { @@ -806,7 +812,7 @@ $collect.on('touchstart', function() {
806 812
807 searching = true; 813 searching = true;
808 814
809 - if ($collect.hasClass('alreadyCollect')) { 815 + if ($collect.hasClass('already-collect')) {
810 opt = 'cancel'; 816 opt = 'cancel';
811 } else { 817 } else {
812 opt = 'ok'; 818 opt = 'ok';
@@ -822,11 +828,13 @@ $collect.on('touchstart', function() { @@ -822,11 +828,13 @@ $collect.on('touchstart', function() {
822 type: 'shop' 828 type: 'shop'
823 }, 829 },
824 success: function(data) { 830 success: function(data) {
  831 + var url = '';
  832 +
825 if (data.code === 200) { 833 if (data.code === 200) {
826 - if ($collect.hasClass('alreadyCollect')) {  
827 - $collect.attr('class', 'notCollect'); 834 + if ($collect.hasClass('already-collect')) {
  835 + $collect.attr('class', 'not-collect');
828 } else { 836 } else {
829 - $collect.attr('class', 'alreadyCollect'); 837 + $collect.attr('class', 'already-collect');
830 } 838 }
831 } 839 }
832 840
@@ -110,7 +110,7 @@ @@ -110,7 +110,7 @@
110 position: absolute; 110 position: absolute;
111 left: 0; 111 left: 0;
112 top: 0; 112 top: 0;
113 - color: #C0C0C0; 113 + color: #c0c0c0;
114 z-index: 2; 114 z-index: 2;
115 } 115 }
116 } 116 }
@@ -131,15 +131,15 @@ @@ -131,15 +131,15 @@
131 &:visited, 131 &:visited,
132 &:hover, 132 &:hover,
133 &:active { 133 &:active {
134 - color: #000;  
135 - } 134 + color: #000;
  135 + }
136 } 136 }
137 137
138 .circle-rightbottom { 138 .circle-rightbottom {
139 position: absolute; 139 position: absolute;
140 width: 25PX; 140 width: 25PX;
141 - height: 0PX; 141 + height: 0;
142 border: 0 solid #323232; 142 border: 0 solid #323232;
143 border-bottom: 25PX solid #323232; 143 border-bottom: 25PX solid #323232;
144 - border-radius: 0 0 25PX 0; 144 + border-radius: 0 0 25PX;
145 } 145 }
1 .newarrival-page { 1 .newarrival-page {
2 background-color: #fff; 2 background-color: #fff;
3 3
4 - .swiper-container { 4 + .swiper-container {
5 width: 100%; 5 width: 100%;
6 height: 310px; 6 height: 310px;
7 7
@@ -25,19 +25,19 @@ @@ -25,19 +25,19 @@
25 height: 200px; 25 height: 200px;
26 } 26 }
27 27
28 - .swiper-slide{ 28 + .swiper-slide {
29 width: 100%; 29 width: 100%;
30 height: 200px; 30 height: 200px;
31 img { 31 img {
32 - display: block;  
33 - height: 100%;  
34 - width: 100%; 32 + display: block;
  33 + height: 100%;
  34 + width: 100%;
35 } 35 }
36 } 36 }
37 37
38 .list-nav { 38 .list-nav {
39 - border-top:2px solid #fff;  
40 - border-bottom:1px solid #e6e6e6; 39 + border-top: 2px solid #fff;
  40 + border-bottom: 1px solid #e6e6e6;
41 41
42 > li { 42 > li {
43 float: left; 43 float: left;
@@ -48,8 +48,8 @@ @@ -48,8 +48,8 @@
48 font-size: 28px; 48 font-size: 28px;
49 color: #999; 49 color: #999;
50 } 50 }
51 - .bytouch{  
52 - background:#eee; 51 + .bytouch {
  52 + background: #eee;
53 } 53 }
54 a { 54 a {
55 display: inline-block; 55 display: inline-block;
@@ -61,14 +61,14 @@ @@ -61,14 +61,14 @@
61 61
62 .active > a { 62 .active > a {
63 color: #000; 63 color: #000;
64 - box-sizing:border-box; 64 + box-sizing: border-box;
65 } 65 }
66 .active > .iconfont { 66 .active > .iconfont {
  67 + color: #000;
  68 + &.cur {
67 color: #000; 69 color: #000;
68 - &.cur {  
69 - color: #000;  
70 - }  
71 } 70 }
  71 + }
72 72
73 .filter .iconfont { 73 .filter .iconfont {
74 font-size: 24px; 74 font-size: 24px;
@@ -47,19 +47,19 @@ @@ -47,19 +47,19 @@
47 background-size: contain; 47 background-size: contain;
48 } 48 }
49 49
50 - .alreadyCollect{ 50 + .already-collect {
51 width: 128px; 51 width: 128px;
52 height: 50px; 52 height: 50px;
53 border-radius: 10px; 53 border-radius: 10px;
54 - background-image: url('/product/already-collect.png') no-repeat; 54 + background-image: url("/product/already-collect.png") no-repeat;
55 background-size: contain; 55 background-size: contain;
56 } 56 }
57 57
58 - .notCollect{ 58 + .not-collect {
59 width: 128px; 59 width: 128px;
60 height: 50px; 60 height: 50px;
61 border-radius: 10px; 61 border-radius: 10px;
62 - background-image: url('/product/not-collect.png') no-repeat; 62 + background-image: url("/product/not-collect.png") no-repeat;
63 background-size: contain; 63 background-size: contain;
64 } 64 }
65 65
@@ -78,7 +78,7 @@ @@ -78,7 +78,7 @@
78 border-sizing: border-box; 78 border-sizing: border-box;
79 border-bottom: 1px solid #e1e1e1; 79 border-bottom: 1px solid #e1e1e1;
80 80
81 - li{ 81 + li {
82 color: #b1b1b1; 82 color: #b1b1b1;
83 display: block; 83 display: block;
84 height: 28px; 84 height: 28px;
@@ -128,7 +128,6 @@ @@ -128,7 +128,6 @@
128 img { 128 img {
129 width: 245px; 129 width: 245px;
130 height: 120px; 130 height: 120px;
131 - vertical-align: top;  
132 margin-left: 30px; 131 margin-left: 30px;
133 float: left; 132 float: left;
134 } 133 }
@@ -246,11 +245,11 @@ @@ -246,11 +245,11 @@
246 .list-price { 245 .list-price {
247 height: 60px; 246 height: 60px;
248 background: #aaaeac; 247 background: #aaaeac;
249 - color: #FFFFFF; 248 + color: #fff;
250 font-size: 22px; 249 font-size: 22px;
251 margin-top: -60px; 250 margin-top: -60px;
252 position: relative; 251 position: relative;
253 - opacity: 0.90; 252 + opacity: 0.9;
254 padding-left: 15px; 253 padding-left: 15px;
255 254
256 p { 255 p {
@@ -315,16 +314,16 @@ @@ -315,16 +314,16 @@
315 314
316 .new:after { 315 .new:after {
317 height: 28px; 316 height: 28px;
318 - content: ''; 317 + content: "";
319 border-left: 1px solid #e1e1e1; 318 border-left: 1px solid #e1e1e1;
320 position: absolute; 319 position: absolute;
321 top: 25px; 320 top: 25px;
322 left: 163px; 321 left: 163px;
323 - } 322 + }
324 323
325 .price:after { 324 .price:after {
326 - height: 28px;  
327 - content: ''; 325 + height: 28px;
  326 + content: "";
328 border-left: 1px solid #e1e1e1; 327 border-left: 1px solid #e1e1e1;
329 position: absolute; 328 position: absolute;
330 top: 25px; 329 top: 25px;
@@ -333,7 +332,7 @@ @@ -333,7 +332,7 @@
333 332
334 .discount:after { 333 .discount:after {
335 height: 28px; 334 height: 28px;
336 - content: ''; 335 + content: "";
337 border-left: 1px solid #e1e1e1; 336 border-left: 1px solid #e1e1e1;
338 position: absolute; 337 position: absolute;
339 top: 25px; 338 top: 25px;
@@ -346,8 +345,8 @@ @@ -346,8 +345,8 @@
346 } 345 }
347 } 346 }
348 347
349 - .list-nav .icon .up {  
350 - top: -28px; 348 + .list-nav .icon .up {
  349 + top: -28px;
351 } 350 }
352 351
353 .list-nav .icon .down { 352 .list-nav .icon .down {
@@ -379,7 +378,6 @@ @@ -379,7 +378,6 @@
379 background: #fff; 378 background: #fff;
380 border-top: 1px solid #eaeaea; 379 border-top: 1px solid #eaeaea;
381 380
382 -  
383 ul { 381 ul {
384 display: table-row; 382 display: table-row;
385 } 383 }
@@ -394,7 +392,6 @@ @@ -394,7 +392,6 @@
394 margin-top: 30px; 392 margin-top: 30px;
395 float: right; 393 float: right;
396 border-right: 1px solid #eaeaea; 394 border-right: 1px solid #eaeaea;
397 - display: inline-block;  
398 } 395 }
399 } 396 }
400 397
@@ -430,7 +427,7 @@ @@ -430,7 +427,7 @@
430 position: absolute; 427 position: absolute;
431 width: 100%; 428 width: 100%;
432 height: 14px; 429 height: 14px;
433 - background: resolve('product/sharp.png') no-repeat center center; 430 + background: resolve("product/sharp.png") no-repeat center center;
434 } 431 }
435 432
436 .foot-list-3 .sub-group { 433 .foot-list-3 .sub-group {
@@ -439,8 +436,8 @@ @@ -439,8 +436,8 @@
439 } 436 }
440 } 437 }
441 438
442 - .bytouch{  
443 - background:#eee; 439 + .bytouch {
  440 + background: #eee;
444 } 441 }
445 442
446 .new-arrival { 443 .new-arrival {
@@ -486,14 +483,14 @@ @@ -486,14 +483,14 @@
486 height: 100%; 483 height: 100%;
487 color: #999; 484 color: #999;
488 485
489 - b {  
490 - height: 28px; 486 + b {
  487 + height: 28px;
491 border-left: 1px solid #e1e1e1; 488 border-left: 1px solid #e1e1e1;
492 - float: right;  
493 - margin-top: 25px; 489 + float: right;
  490 + margin-top: 25px;
  491 + }
494 } 492 }
495 } 493 }
496 - }  
497 494
498 .active .cur { 495 .active .cur {
499 color: #000; 496 color: #000;
@@ -503,7 +500,6 @@ @@ -503,7 +500,6 @@
503 color: #000; 500 color: #000;
504 } 501 }
505 502
506 -  
507 .new .iconfont { 503 .new .iconfont {
508 transform: scale(0.8); 504 transform: scale(0.8);
509 font-weight: bold; 505 font-weight: bold;
@@ -541,7 +537,7 @@ @@ -541,7 +537,7 @@
541 } 537 }
542 538
543 .category-list-only-one-row { 539 .category-list-only-one-row {
544 - border-top: none!important; 540 + border-top: none !important;
545 } 541 }
546 542
547 .category-list-last-full-row { 543 .category-list-last-full-row {
@@ -8,10 +8,10 @@ @@ -8,10 +8,10 @@
8 } 8 }
9 9
10 .descripition { 10 .descripition {
11 - margin: 40px 20px 0px 20px; 11 + margin: 40px 20px 0;
12 font-size: 22px; 12 font-size: 22px;
13 line-height: 36px; 13 line-height: 36px;
14 - padding: 40px 20px 40px 20px; 14 + padding: 40px 20px;
15 border-top: 1px solid #e6e6e6; 15 border-top: 1px solid #e6e6e6;
16 border-bottom: 1px solid #e6e6e6; 16 border-bottom: 1px solid #e6e6e6;
17 text-indent: 2em; 17 text-indent: 2em;
@@ -26,7 +26,7 @@ @@ -26,7 +26,7 @@
26 } 26 }
27 27
28 .sign-icon > span { 28 .sign-icon > span {
29 - width:auto; 29 + width: auto;
30 } 30 }
31 } 31 }
32 32
@@ -38,7 +38,6 @@ @@ -38,7 +38,6 @@
38 text-align: left; 38 text-align: left;
39 height: 90px; 39 height: 90px;
40 line-height: 90px; 40 line-height: 90px;
41 - vertical-align:middle;  
42 display: block; 41 display: block;
43 width: 100%; 42 width: 100%;
44 } 43 }
@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
7 /** 7 /**
8 * 根据频道判断出性别 8 * 根据频道判断出性别
9 */ 9 */
10 -const getGenderByChannel =(channel) => { 10 +const getGenderByChannel = (channel) => {
11 channel = channel ? channel : 'boys'; 11 channel = channel ? channel : 'boys';
12 12
13 switch (channel) { 13 switch (channel) {