Blame view
src/store/modules/orderRead.js
573 Bytes
37ccd9675 订单详情页获取数据 |
1 2 |
import urlAlias from '../url' import request from '../request' |
9a8f39ae3 订单 |
3 |
|
37ccd9675 订单详情页获取数据 |
4 |
const { |
9a8f39ae3 订单 |
5 |
orderRead |
37ccd9675 订单详情页获取数据 |
6 |
} = urlAlias |
9a8f39ae3 订单 |
7 8 |
const state = { |
37ccd9675 订单详情页获取数据 |
9 10 |
orderInfo: {} } |
9a8f39ae3 订单 |
11 12 13 |
const mutations = { INIT: (state, orderInfo) => { |
37ccd9675 订单详情页获取数据 |
14 15 16 |
state.orderInfo = orderInfo } } |
9a8f39ae3 订单 |
17 18 19 |
const actions = { getOrderInfo({ commit }, param) { |
36e559203 逻辑完善 |
20 |
return new Promise ((resolve) => request({ |
37ccd9675 订单详情页获取数据 |
21 22 |
url: orderRead, data: param, |
eed6c3ca9 订单列表添加支付和取消功能,修改订... |
23 24 |
success: (res) => { console.log(res) |
607bc3a4d 修改了直接购买的流程,添加弹窗,选... |
25 |
commit("INIT", res.data.data) |
36e559203 逻辑完善 |
26 |
resolve(res.data.data) |
37ccd9675 订单详情页获取数据 |
27 |
} |
36e559203 逻辑完善 |
28 |
})) |
37ccd9675 订单详情页获取数据 |
29 30 |
} } |
9a8f39ae3 订单 |
31 32 33 34 35 |
export default { namespaced: true, state, mutations, |
37ccd9675 订单详情页获取数据 |
36 37 |
actions } |