...
|
...
|
@@ -7,6 +7,7 @@ |
|
|
const orderModel = require('../models/order');
|
|
|
const notLoginCode = 400;
|
|
|
const notLoginTip = '抱歉,您暂未登录!';
|
|
|
const _ = require('lodash');
|
|
|
|
|
|
const order = {
|
|
|
orders: (req, res) => {
|
...
|
...
|
@@ -67,6 +68,14 @@ const order = { |
|
|
}
|
|
|
|
|
|
orderModel.getOrderDetail(uid, orderCode).then(result => {
|
|
|
if (result.data.promotion_formulas) {
|
|
|
_.forEach(result.data.promotion_formulas, function(val) {
|
|
|
console.log(val.promotion)
|
|
|
if (val.promotion === "活动金额") {
|
|
|
val.promotion = "VIP优惠";
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
return res.json(result);
|
|
|
}).catch(next);
|
|
|
},
|
...
|
...
|
|