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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
| (function (vc) {
|
| vc.extends({
| data: {
| storeOrderCartDetailInfo: {
| orderId:'',
| cartId: '',
| prodName: '',
| specValue: '',
| stateName: '',
| price: '',
| cartNum: '',
| payPrice: '',
| createTime: '',
| address: {
| username: '',
| tel: '',
| address: ''
| },
| remark: '',
| events:[]
|
|
| }
| },
| _initMethod: function () {
| let cartId = vc.getParam('cartId');
|
| if (!vc.notNull(cartId)) {
| vc.toast('非法操作');
| vc.getBack();
| return;
| }
| $that.storeOrderCartDetailInfo.cartId = cartId;
| $that.storeOrderCartDetailInfo.orderId = vc.getParam('orderId');
|
| $that._listOrderCart();
| $that._listOrderAddress();
| $that._listOrderCartEvent();
|
| },
| _initEvent: function () {
|
| },
| methods: {
| _listOrderCart: function () {
| var param = {
| params: {
| page: 1,
| row: 1,
| cartId: $that.storeOrderCartDetailInfo.cartId
| }
| };
| //发送get请求
| vc.http.apiGet('/storeOrder/queryStoreOrderCart',
| param,
| function (json, res) {
| var _storeOrderCart = JSON.parse(json);
| vc.copyObject(_storeOrderCart.data[0], $that.storeOrderCartDetailInfo);
| let _orderCart = _storeOrderCart.data[0];
| let _productSpecDetails = _orderCart.productSpecDetails;
| let _specValue = '';
| _productSpecDetails.forEach(detail => {
| _specValue += (detail.detailValue + "/");
| });
| $that.storeOrderCartDetailInfo.specValue = _specValue;
|
| }, function (errInfo, error) {
| console.log('请求失败处理');
| }
| );
| },
| _listOrderAddress: function () {
| var param = {
| params: {
| page: 1,
| row: 1,
| orderId: $that.storeOrderCartDetailInfo.orderId
| }
| };
| //发送get请求
| vc.http.apiGet('/storeOrder/queryStoreOrderAddress',
| param,
| function (json, res) {
| var _storeOrderAddress = JSON.parse(json);
| vc.copyObject(_storeOrderAddress.data[0], $that.storeOrderCartDetailInfo.address);
| }, function (errInfo, error) {
| console.log('请求失败处理');
| }
| );
| },
| _listOrderCartEvent:function(){
| var param = {
| params: {
| page: 1,
| row: 50,
| orderId: $that.storeOrderCartDetailInfo.orderId,
| cartId: $that.storeOrderCartDetailInfo.cartId
| }
| };
| //发送get请求
| vc.http.apiGet('/storeOrder/queryStoreOrderCartEvent',
| param,
| function (json, res) {
| var _storeOrderEvent = JSON.parse(json);
| $that.storeOrderCartDetailInfo.events = _storeOrderEvent.data;
| }, function (errInfo, error) {
| console.log('请求失败处理');
| }
| );
| },
| _goBack: function () {
| vc.goBack()
| }
| }
| });
|
| })(window.vc);
|
|