Authored by 沈志敏

Merge branch 'develop' of git.yoho.cn:fe/yohoblk-wap 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);
@@ -10,7 +10,10 @@ const testUid = 8039837; // 测试uid @@ -10,7 +10,10 @@ const testUid = 8039837; // 测试uid
10 10
11 const refund = { 11 const refund = {
12 refund(req, res) { 12 refund(req, res) {
13 - res.render('refund'); 13 + res.render('refund', {
  14 + module: 'me',
  15 + page: 'refund'
  16 + });
14 }, 17 },
15 order(req, res, next) { 18 order(req, res, next) {
16 const uid = req.user.uid || 8050882; 19 const uid = req.user.uid || 8050882;
@@ -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 });
@@ -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 };
@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
7 </div> 7 </div>
8 <div class="filter-params"> 8 <div class="filter-params">
9 <ul class="filter-cates"> 9 <ul class="filter-cates">
10 - <li class="filter-cate" v-for="classify in config" v-if="typeof classify === 'object'" @click="entrySub($key)"> 10 + <li class="filter-cate" v-for="classify in config" v-if="showCate($key, classify)" @click="entrySub($key)">
11 <i class="icon icon-right right"></i> 11 <i class="icon icon-right right"></i>
12 <span class="filter-cate-label">{{$key | filter-en-cn }}</span> 12 <span class="filter-cate-label">{{$key | filter-en-cn }}</span>
13 <span class="filter-cate-val">{{showLabel($key)}}</span> 13 <span class="filter-cate-val">{{showLabel($key)}}</span>
@@ -55,6 +55,19 @@ @@ -55,6 +55,19 @@
55 } 55 }
56 }, 56 },
57 methods: { 57 methods: {
  58 + // 只显示 可选值 大于 1的 筛选项
  59 + // groupSort 特殊处理
  60 + showCate: function(cateName, cateVals) {
  61 + if (toString.call(cateVals) === '[object Array]') {
  62 + if (cateName === 'groupSort') {
  63 + // TODO
  64 + } else if (cateVals.length > 1) {
  65 + return true;
  66 + }
  67 + }
  68 +
  69 + return false;
  70 + },
58 clearVals: function() { 71 clearVals: function() {
59 // remove all value 72 // remove all value
60 this.$set('selected', {}); 73 this.$set('selected', {});
@@ -127,6 +140,10 @@ @@ -127,6 +140,10 @@
127 <style> 140 <style>
128 @import "../../../scss/common/color"; 141 @import "../../../scss/common/color";
129 142
  143 + .app.ios .filter {
  144 + padding-top: 40px;
  145 + }
  146 +
130 .filter { 147 .filter {
131 position: fixed; 148 position: fixed;
132 z-index: 1001; 149 z-index: 1001;
@@ -185,6 +202,10 @@ @@ -185,6 +202,10 @@
185 .filter-cate-val { 202 .filter-cate-val {
186 float: right; 203 float: right;
187 font-size: 28px; 204 font-size: 28px;
  205 + max-width: 50%;
  206 + white-space: nowrap;
  207 + text-overflow: ellipsis;
  208 + overflow: hidden;
188 } 209 }
189 210
190 .filter-cate-val, 211 .filter-cate-val,
@@ -116,12 +116,12 @@ @@ -116,12 +116,12 @@
116 }); 116 });
117 117
118 reasonConfig.specialReasons = []; 118 reasonConfig.specialReasons = [];
119 - res.data.specialExchangeReason.forEach(obj => reasonConfig.specialReasons.push(obj.id)); 119 + res.data.specialReturnReason.forEach(obj => reasonConfig.specialReasons.push(obj.id));
120 reasonConfig.reasons = [{ 120 reasonConfig.reasons = [{
121 id: 0, 121 id: 0,
122 name: '请选择' 122 name: '请选择'
123 - }].concat(res.data.exchangeReason);  
124 - reasonConfig.specialNotice = res.data.specialNoticeBo; 123 + }].concat(res.data.returnReason);
  124 + reasonConfig.specialNotice = res.data.specialNotice;
125 125
126 this.list = res.data.goodsList; 126 this.list = res.data.goodsList;
127 this.$set('refundData', res.data); 127 this.$set('refundData', res.data);
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;