Blame view
src/store/modules/orderRead.js
516 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) { |
37ccd9675
|
20 21 22 23 |
request({ url: orderRead, data: param, success: (res) => { |
607bc3a4d
|
24 25 |
commit("INIT", res.data.data) console.log('res',res) |
37ccd9675
|
26 |
} |
9a8f39ae3
|
27 |
}) |
37ccd9675
|
28 29 |
} } |
9a8f39ae3
|
30 31 32 33 34 |
export default { namespaced: true, state, mutations, |
37ccd9675
|
35 36 |
actions } |