Commit 37ccd9675758a32b96d0c9a759a0e9385733e144
1 parent
54d61dc1c4
Exists in
master
订单详情页获取数据
Showing
4 changed files
with
25 additions
and
24 deletions
Show diff stats
src/pages/myOrderPaying/myOrderPaying.vue
... | ... | @@ -80,13 +80,13 @@ |
80 | 80 | </text> |
81 | 81 | <text class="order-info-price"> |
82 | 82 | <text class="p1">实付</text> |
83 | - <text class="p2">¥{{orderInfo.order_info.total_fee}}</text> | |
83 | + <text class="p2">¥{{orderInfo.order_info[0].total_fee}}</text> | |
84 | 84 | </text> |
85 | 85 | <text class="order-info-num"> |
86 | - <text>订单号:{{orderInfo.prepay_id}}</text> | |
86 | + <text>订单号:{{payId}}</text> | |
87 | 87 | </text> |
88 | 88 | <text class="order-info-time"> |
89 | - <text>下单时间:{{orderInfo.pay_time}}</text> | |
89 | + <text>下单时间:{{orderInfo.order_info[0].pay_time}}</text> | |
90 | 90 | </text> |
91 | 91 | <view class="order-info-hr"></view> |
92 | 92 | <view class="order-info-contact"> |
... | ... | @@ -164,6 +164,7 @@ export default { |
164 | 164 | }, |
165 | 165 | orderInfoList () { |
166 | 166 | const orderInfoList = this.orderInfo.order_info[0].list |
167 | + // console.log(this.orderInfo.order_info[0].list.p_name + 'sssss') | |
167 | 168 | return orderInfoList |
168 | 169 | }, |
169 | 170 | // 获取订单地址信息 | ... | ... |
src/store/modules/detailStandard_k.js
src/store/modules/myOrder.js
src/store/modules/orderRead.js
1 | - import urlAlias from '../url'; | |
2 | - import request from '../request'; | |
1 | +import urlAlias from '../url' | |
2 | +import request from '../request' | |
3 | 3 | |
4 | - const { | |
4 | +const { | |
5 | 5 | orderRead |
6 | - } = urlAlias; | |
6 | +} = urlAlias | |
7 | 7 | |
8 | 8 | const state = { |
9 | - orderInfo: {}, | |
10 | -}; | |
9 | + orderInfo: {} | |
10 | +} | |
11 | 11 | |
12 | 12 | const mutations = { |
13 | 13 | INIT: (state, orderInfo) => { |
14 | - state.orderInfo = orderInfo; | |
15 | - }, | |
16 | -}; | |
14 | + state.orderInfo = orderInfo | |
15 | + } | |
16 | +} | |
17 | 17 | |
18 | 18 | const actions = { |
19 | 19 | getOrderInfo({ commit }, param) { |
20 | - request({ | |
21 | - url: orderRead, | |
22 | - data: param, | |
23 | - success: (res) => { | |
24 | - commit("INIT", res.data.data); | |
25 | - }, | |
20 | + request({ | |
21 | + url: orderRead, | |
22 | + data: param, | |
23 | + success: (res) => { | |
24 | + commit("INIT", res.data.data) | |
25 | + } | |
26 | 26 | }) |
27 | - }, | |
28 | -}; | |
27 | + } | |
28 | +} | |
29 | 29 | |
30 | 30 | export default { |
31 | 31 | namespaced: true, |
32 | 32 | state, |
33 | 33 | mutations, |
34 | - actions, | |
35 | -}; | |
34 | + actions | |
35 | +} | ... | ... |