orderDetail.js
2.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/**
* 个人中心 controller
* @author: chengyao.guo<chengyao.guo@yoho.cn>
* @date: 2016/08/10
*/
'use strict';
const headerModel = require('../../../doraemon/models/header'); // 头部model
const orderDetailModel = require('../models/orderDetail');
exports.orderDetail = (req, res, next) => {
let params = {
uid: req.user.uid || 6228593
};
let headerData = headerModel.setNav({
navTitle: '订单详情'
});
orderDetailModel.orderDetail(params).then(result => {
if (result) {
res.render('orderDetail', Object.assign(result, {
isLogin: params.uid ? true : false,
module: 'home',
page: 'index',
title: 'Yoho!Buy 有货',
pageHeader: headerData,
pageFooter: true,
orderDetail: [
{
'orderNum': '1111',
'pay_expire': '2016-07-28 17:26:28',
'user_confirm_paid': 'N',
'payment_type_str': '在线支付',
'use_limit_code': 'Y',
'is_cancel': 'N',
'uid': '20000266',
'update_time': '0',
'name': '张三',
'phoneNum': '15999999999',
'isVirtual': false,
'mobile': '15999999999',
'orderNum': '1606688700',
'address': '测试地址测试地址测试地址测试地址',
'orderStatus': '已取消',
'orderTime': '2016-08-17 11:24:28',
'logisticsUrl': '#',
'logisticsCompany': '顺丰',
'logisticsNum': '111111',
'yohoCoin': '999',
'invoice': {
'title': '有货',
'contentValue': '有货',
'pdfUrl': '#'
},
'qrcode': '#',
'orderBalance': [{
'promotion': '商品总金额',
'account': '100.00'
}, {
'promotion': '运费',
'account': '10.00'
}],
'price': '999.99'
}
]
}));
}
}).catch(next);
};