...
|
...
|
@@ -15,12 +15,18 @@ const helper = global.yoho.helpers; |
|
|
// 结算页面
|
|
|
const index = (req, res, next) => {
|
|
|
orderModel.index(req.user.uid).then(result => {
|
|
|
let data = result.data;
|
|
|
|
|
|
// 设置头部路径索引focus
|
|
|
result.data.bcNavFocus = 2;
|
|
|
data.bcNavFocus = 2;
|
|
|
|
|
|
// 构造诡异的配送方式数据【显示普通快递的文字,确用顺丰发货和顺丰的快递费】
|
|
|
data.delivery_way = _.concat(_.assign(_.find(data.delivery_way, {delivery_way_id: 2}), {
|
|
|
delivery_way_name: '普通快递'
|
|
|
}));
|
|
|
|
|
|
// 发票抬头
|
|
|
result.data.invoices.invoiceTitle = [
|
|
|
data.invoices.invoiceTitle = [
|
|
|
{
|
|
|
name: '个人',
|
|
|
value: 1,
|
...
|
...
|
@@ -33,17 +39,17 @@ const index = (req, res, next) => { |
|
|
];
|
|
|
|
|
|
// 返回购物车链接
|
|
|
result.data.goCartLink = helper.urlFormat('/shopping/cart');
|
|
|
data.goCartLink = helper.urlFormat('/shopping/cart');
|
|
|
|
|
|
// 拆单是否显示左右切换
|
|
|
_.forEach(result.data.shopping_cart_data.package_list, i => {
|
|
|
_.forEach(data.shopping_cart_data.package_list, i => {
|
|
|
if (i.goods_list.length > 4) {
|
|
|
i.showToggle = true;
|
|
|
}
|
|
|
});
|
|
|
|
|
|
// 是否打印价格radio
|
|
|
result.data.printPriceRadio = [
|
|
|
data.printPriceRadio = [
|
|
|
{
|
|
|
value: '1',
|
|
|
name: '是'
|
...
|
...
|
@@ -56,7 +62,7 @@ const index = (req, res, next) => { |
|
|
];
|
|
|
|
|
|
res.display('order', {
|
|
|
content: result.data,
|
|
|
content: data,
|
|
|
defaultHeader: false
|
|
|
});
|
|
|
}).catch(next);
|
...
|
...
|
|