Blame view
src/store/modules/read.js
655 Bytes
7a2dda446 首页逻辑修改 |
1 2 3 4 5 6 7 8 |
import urlAlias from '../url'; import request from '../request'; const { read } = urlAlias; const state = { |
7d6833f2c 地址列表 |
9 |
goodInfo: {}, |
7a2dda446 首页逻辑修改 |
10 11 12 13 14 |
}; const mutations = { INIT: (state, goodInfo) => { state.goodInfo = goodInfo; |
7d6833f2c 地址列表 |
15 |
|
7a2dda446 首页逻辑修改 |
16 17 18 19 20 21 22 |
}, }; const actions = { fetch({ commit }, param) { request({ url: read, |
7d6833f2c 地址列表 |
23 |
data: param, |
7a2dda446 首页逻辑修改 |
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
success: (res) => { commit('INIT', res.data.data) }, fail: (res) => { console.log("fail status === > ", res); }, complete: (res) => { console.log("complete status === > ", res); }, }) }, }; export default { namespaced: true, state, mutations, actions, }; |