import urlAlias from '../url' import request from '../request' const { orderRead } = urlAlias const state = { orderInfo: {} } const mutations = { INIT: (state, orderInfo) => { state.orderInfo = orderInfo } } const actions = { getOrderInfo({ commit }, param) { return new Promise ((resolve) => request({ url: orderRead, data: param, success: (res) => { console.log(res) commit("INIT", res.data.data) resolve(res.data.data) } })) } } export default { namespaced: true, state, mutations, actions }