export const state = () => ({ orderList: { fetching: false, data: [] }, logisticsInfo: { fetching: false, data: [] } }) export const mutations = { REQUEST_ORDERLIST (state) { state.orderList.fetching = true }, GET_ORDERLIST_FAILURE (state) { state.orderList.fetching = false }, GET_ORDERLIST_SUCCESS (state, result) { state.orderList.fetching = false state.orderList.data = result }, REQUEST_LOGISTICS (state) { state.logisticsInfo.fetching = true }, GET_LOGISTICS_FAILURE (state) { state.logisticsInfo.fetching = false }, GET_LOGISTICS_SUCCESS (state, result) { state.logisticsInfo.fetching = false state.logisticsInfo.data = result } }