Authored by 陈轩

Merge remote-tracking branch 'origin/develop' into develop

@@ -7,7 +7,6 @@ @@ -7,7 +7,6 @@
7 'use strict'; 7 'use strict';
8 8
9 const brandApi = require('./brand-api'); 9 const brandApi = require('./brand-api');
10 -const logger = global.yoho.logger;  
11 const _ = require('lodash'); 10 const _ = require('lodash');
12 const camelCase = global.yoho.camelCase; 11 const camelCase = global.yoho.camelCase;
13 12
@@ -57,8 +56,6 @@ const getBrandListData = params => { @@ -57,8 +56,6 @@ const getBrandListData = params => {
57 return brandApi.getBrandListOriginData(params).then(result => { 56 return brandApi.getBrandListOriginData(params).then(result => {
58 if (result.data) { 57 if (result.data) {
59 Object.assign(finalResult, handleBrandList(result.data.all_list)); 58 Object.assign(finalResult, handleBrandList(result.data.all_list));
60 - } else {  
61 - logger.error('getBrandListOriginData api data is null');  
62 } 59 }
63 60
64 return finalResult; 61 return finalResult;
@@ -6,7 +6,6 @@ @@ -6,7 +6,6 @@
6 */ 6 */
7 'use strict'; 7 'use strict';
8 8
9 -const logger = global.yoho.logger;  
10 const editorialListApi = require('./list-api'); 9 const editorialListApi = require('./list-api');
11 const camelCase = global.yoho.camelCase; 10 const camelCase = global.yoho.camelCase;
12 11
@@ -27,8 +26,6 @@ const editorialList = params => { @@ -27,8 +26,6 @@ const editorialList = params => {
27 }, 26 },
28 code: 200 27 code: 200
29 }); 28 });
30 - } else {  
31 - logger.error('getEitorialListData api no data');  
32 } 29 }
33 30
34 return camelCase(finalResult); 31 return camelCase(finalResult);
@@ -66,14 +66,10 @@ const getShopData = params => { @@ -66,14 +66,10 @@ const getShopData = params => {
66 }); 66 });
67 } 67 }
68 }); 68 });
69 - } else {  
70 - logger.error('getShopsDecoratorList api no data');  
71 } 69 }
72 70
73 return finalResult; 71 return finalResult;
74 }); 72 });
75 - } else {  
76 - logger.error('getShopInfoData api no data');  
77 } 73 }
78 return finalResult; 74 return finalResult;
79 }); 75 });
@@ -87,8 +83,6 @@ const getShopData = params => { @@ -87,8 +83,6 @@ const getShopData = params => {
87 logger.info('brand has no shop'); 83 logger.info('brand has no shop');
88 } 84 }
89 return finalResult; 85 return finalResult;
90 - } else {  
91 - logger.error('getBrandInfoByDomain api no data');  
92 } 86 }
93 87
94 return finalResult; 88 return finalResult;
@@ -121,13 +115,9 @@ const getBrandShopGoodsData = params => { @@ -121,13 +115,9 @@ const getBrandShopGoodsData = params => {
121 }, 115 },
122 code: 200 116 code: 200
123 }; 117 };
124 - } else {  
125 - logger.error('getBrandShopGoodsOriginData api no data');  
126 } 118 }
127 return camelCase(finalResult); 119 return camelCase(finalResult);
128 }); 120 });
129 - } else {  
130 - logger.error('getBrandInfoByDomain api no data');  
131 } 121 }
132 return camelCase(finalResult); 122 return camelCase(finalResult);
133 }); 123 });
@@ -294,6 +294,23 @@ const yoho = { @@ -294,6 +294,23 @@ const yoho = {
294 }, 294 },
295 295
296 /** 296 /**
  297 + * 更新头部信息
  298 + * @param args {""}
  299 + * @param success
  300 + * @param fail
  301 + */
  302 + updateNavigationBar(args, success, fail) {
  303 + if (this.isApp) {
  304 + window.yohoInterface.triggerEvent(success || nullFun, fail || nullFun, {
  305 + method: 'update.navigationBarStyle',
  306 + arguments: args
  307 + });
  308 + } else {
  309 + tip(tipInfo);
  310 + }
  311 + },
  312 +
  313 + /**
297 * 显示 loading 314 * 显示 loading
298 * @param args Boolen 315 * @param args Boolen
299 * @param success 316 * @param success
@@ -274,14 +274,16 @@ @@ -274,14 +274,16 @@
274 tab 274 tab
275 }, 275 },
276 created() { 276 created() {
277 - const self = this;  
278 -  
279 this.getCateList(); 277 this.getCateList();
280 278
281 - bus.$on('channel.change', function(page, channel) {  
282 - self.gender = channelTrans[channel].code;  
283 - self.cateNavLeftData = self.brandCate[channelTrans[channel].key];  
284 - self.cateNavRightData = self.cateNavLeftData ? self.cateNavLeftData[0].sub : []; 279 + bus.$on('channel.change', (page, channel) => {
  280 + this.gender = channelTrans[channel].code;
  281 + this.cateNavLeftData = this.brandCate[channelTrans[channel].key];
  282 + this.cateNavRightData = this.cateNavLeftData ? this.cateNavLeftData[0].sub : [];
  283 + this.rightAll = {
  284 + sortId: this.cateNavLeftData[0].relationParameter.sort,
  285 + categoryName: this.cateNavLeftData[0].categoryName
  286 + };
285 }); 287 });
286 } 288 }
287 }; 289 };
@@ -210,7 +210,7 @@ @@ -210,7 +210,7 @@
210 210
211 header.defaultSelectedIndex = '1'; 211 header.defaultSelectedIndex = '1';
212 header.right.des = this.editmodel ? '完成' : '编辑'; 212 header.right.des = this.editmodel ? '完成' : '编辑';
213 - return yoho.goPageView({ 213 + return yoho.updateNavigationBar({
214 header: header 214 header: header
215 }); 215 });
216 }); 216 });
@@ -228,7 +228,7 @@ @@ -228,7 +228,7 @@
228 228
229 header.defaultSelectedIndex = '0'; 229 header.defaultSelectedIndex = '0';
230 header.right.des = this.editmodel ? '完成' : '编辑'; 230 header.right.des = this.editmodel ? '完成' : '编辑';
231 - return yoho.goPageView({ 231 + return yoho.updateNavigationBar({
232 header: header 232 header: header
233 }); 233 });
234 }); 234 });
1 <template> 1 <template>
2 - <div class="top-box clearfix" v-bind:class='{"top-box-left" : this.$parent.$refs.filter.isVisible,"top-change" : topChange || !shareData.isBlkShop}' v-infinite-scroll="changeTopStatus()"> 2 + <div class="top-box clearfix" v-bind:class='{"top-change" : topChange || !shareData.isBlkShop}' v-infinite-scroll="changeTopStatus()">
3 <span class="icon icon-back back" @click="goBack()"></span> 3 <span class="icon icon-back back" @click="goBack()"></span>
4 <span class="brand-name" v-if="!shareData.isBlkShop">{{shareData.brandName}}</span> 4 <span class="brand-name" v-if="!shareData.isBlkShop">{{shareData.brandName}}</span>
5 <div class="right"> 5 <div class="right">
@@ -54,10 +54,6 @@ @@ -54,10 +54,6 @@
54 } 54 }
55 } 55 }
56 56
57 - .top-box-left {  
58 - left: -665px;  
59 - }  
60 -  
61 .top-change { 57 .top-change {
62 background-color: #fff; 58 background-color: #fff;
63 color: #000; 59 color: #000;