|
@@ -86,19 +86,27 @@ exports.getSaleGoodsData = (params) => { |
|
@@ -86,19 +86,27 @@ exports.getSaleGoodsData = (params) => { |
86
|
|
86
|
|
87
|
switch (userInfo.curLevel) {
|
87
|
switch (userInfo.curLevel) {
|
88
|
case '1':
|
88
|
case '1':
|
89
|
- finalResult.goods[key].salePrice = value.vip1Price;
|
|
|
90
|
- finalResult.goods[key].vip1 = true;
|
89
|
+ finalResult.goods[key] = {
|
|
|
90
|
+ salePrice: value.vip1Price,
|
|
|
91
|
+ vip1: true
|
|
|
92
|
+ };
|
91
|
break;
|
93
|
break;
|
92
|
case '2':
|
94
|
case '2':
|
93
|
- finalResult.goods[key].salePrice = value.vip2Price;
|
|
|
94
|
- finalResult.goods[key].vip2 = true;
|
95
|
+ finalResult.goods[key] = {
|
|
|
96
|
+ salePrice: value.vip2Price,
|
|
|
97
|
+ vip2: true
|
|
|
98
|
+ };
|
95
|
break;
|
99
|
break;
|
96
|
case '3':
|
100
|
case '3':
|
97
|
- finalResult.goods[key].salePrice = value.vip3Price;
|
|
|
98
|
- finalResult.goods[key].vip3 = true;
|
101
|
+ finalResult.goods[key] = {
|
|
|
102
|
+ salePrice: value.vip3Price,
|
|
|
103
|
+ vip3: true
|
|
|
104
|
+ };
|
99
|
break;
|
105
|
break;
|
100
|
default:
|
106
|
default:
|
101
|
- finalResult.goods[key].vip = true;
|
107
|
+ finalResult.goods[key] = {
|
|
|
108
|
+ vip: true
|
|
|
109
|
+ };
|
102
|
delete finalResult.goods[key].salesPrice;
|
110
|
delete finalResult.goods[key].salesPrice;
|
103
|
break;
|
111
|
break;
|
104
|
}
|
112
|
}
|
|
@@ -285,6 +293,8 @@ exports.getSaleOthersData = (params, channel) => { |
|
@@ -285,6 +293,8 @@ exports.getSaleOthersData = (params, channel) => { |
285
|
delete finalResult.goods[key].tags.isSale;// 屏蔽 sale 标签
|
293
|
delete finalResult.goods[key].tags.isSale;// 屏蔽 sale 标签
|
286
|
delete finalResult.goods[key].discount; // 屏蔽折扣信息
|
294
|
delete finalResult.goods[key].discount; // 屏蔽折扣信息
|
287
|
});
|
295
|
});
|
|
|
296
|
+ } else {
|
|
|
297
|
+ logger.error('goods list api code no 200');
|
288
|
}
|
298
|
}
|
289
|
|
299
|
|
290
|
// 获取焦点图数据
|
300
|
// 获取焦点图数据
|
|
@@ -317,19 +327,27 @@ exports.getSaleOthersData = (params, channel) => { |
|
@@ -317,19 +327,27 @@ exports.getSaleOthersData = (params, channel) => { |
317
|
|
327
|
|
318
|
switch (userInfo.curLevel) {
|
328
|
switch (userInfo.curLevel) {
|
319
|
case '1':
|
329
|
case '1':
|
320
|
- finalResult.goods[key].salePrice = value.vip1_price;
|
|
|
321
|
- finalResult.goods[key].vip1 = true;
|
330
|
+ finalResult.goods[key] = {
|
|
|
331
|
+ salePrice: value.vip1_price,
|
|
|
332
|
+ vip1: true
|
|
|
333
|
+ };
|
322
|
break;
|
334
|
break;
|
323
|
case '2':
|
335
|
case '2':
|
324
|
- finalResult.goods[key].salePrice = value.vip2_price;
|
|
|
325
|
- finalResult.goods[key].vip2 = true;
|
336
|
+ finalResult.goods[key] = {
|
|
|
337
|
+ salePrice: value.vip2_price,
|
|
|
338
|
+ vip2: true
|
|
|
339
|
+ };
|
326
|
break;
|
340
|
break;
|
327
|
case '3':
|
341
|
case '3':
|
328
|
- finalResult.goods[key].salePrice = value.vip3_price;
|
|
|
329
|
- finalResult.goods[key].vip3 = true;
|
342
|
+ finalResult.goods[key] = {
|
|
|
343
|
+ salePrice: value.vip3_price,
|
|
|
344
|
+ vip3: true
|
|
|
345
|
+ };
|
330
|
break;
|
346
|
break;
|
331
|
default:
|
347
|
default:
|
332
|
- finalResult.goods[key].vip = true;
|
348
|
+ finalResult.goods[key] = {
|
|
|
349
|
+ vip: true
|
|
|
350
|
+ };
|
333
|
delete finalResult.goods[key].salesPrice;
|
351
|
delete finalResult.goods[key].salesPrice;
|
334
|
break;
|
352
|
break;
|
335
|
}
|
353
|
}
|
|
@@ -378,10 +396,11 @@ exports.getSaleDiscountData = (params, channel) => { |
|
@@ -378,10 +396,11 @@ exports.getSaleDiscountData = (params, channel) => { |
378
|
finalResult.saleTitle = saleHandler.handleDiscountTitleData(result[2].data[0]);
|
396
|
finalResult.saleTitle = saleHandler.handleDiscountTitleData(result[2].data[0]);
|
379
|
if (result[2].data[0].web_url) {
|
397
|
if (result[2].data[0].web_url) {
|
380
|
finalResult.topBanner = {
|
398
|
finalResult.topBanner = {
|
381
|
- list: []
|
|
|
382
|
- };
|
|
|
383
|
- finalResult.topBanner.list[0] = {
|
|
|
384
|
- img: result[2].data[0].web_url
|
399
|
+ list: [
|
|
|
400
|
+ {
|
|
|
401
|
+ img: result[2].data[0].web_url
|
|
|
402
|
+ }
|
|
|
403
|
+ ]
|
385
|
};
|
404
|
};
|
386
|
} else {
|
405
|
} else {
|
387
|
logger.error('discount activity data[0] web_url empty');
|
406
|
logger.error('discount activity data[0] web_url empty');
|