|
@@ -7,6 +7,7 @@ |
|
@@ -7,6 +7,7 @@ |
7
|
const orderModel = require('../models/order');
|
7
|
const orderModel = require('../models/order');
|
8
|
const notLoginCode = 400;
|
8
|
const notLoginCode = 400;
|
9
|
const notLoginTip = '抱歉,您暂未登录!';
|
9
|
const notLoginTip = '抱歉,您暂未登录!';
|
|
|
10
|
+const _ = require('lodash');
|
10
|
|
11
|
|
11
|
const order = {
|
12
|
const order = {
|
12
|
orders: (req, res) => {
|
13
|
orders: (req, res) => {
|
|
@@ -67,6 +68,14 @@ const order = { |
|
@@ -67,6 +68,14 @@ const order = { |
67
|
}
|
68
|
}
|
68
|
|
69
|
|
69
|
orderModel.getOrderDetail(uid, orderCode).then(result => {
|
70
|
orderModel.getOrderDetail(uid, orderCode).then(result => {
|
|
|
71
|
+ if (result.data.promotion_formulas) {
|
|
|
72
|
+ _.forEach(result.data.promotion_formulas, function(val) {
|
|
|
73
|
+ console.log(val.promotion)
|
|
|
74
|
+ if (val.promotion === "活动金额") {
|
|
|
75
|
+ val.promotion = "VIP优惠";
|
|
|
76
|
+ }
|
|
|
77
|
+ })
|
|
|
78
|
+ }
|
70
|
return res.json(result);
|
79
|
return res.json(result);
|
71
|
}).catch(next);
|
80
|
}).catch(next);
|
72
|
},
|
81
|
},
|