Blame view
src/store/modules/detailStandard_k.js
739 Bytes
c4c4f1251
|
1 2 3 4 |
import urlAlias from '../url'; import request from '../request'; const { |
8fdae7108
|
5 |
detailStandardUrl |
c4c4f1251
|
6 7 8 9 10 11 12 |
} = urlAlias const state = { list:[], }; const mutations = { |
8fdae7108
|
13 14 |
INIT: (state, data) => { state.list = data; |
c4c4f1251
|
15 16 17 18 |
}, }; const actions = { |
8fdae7108
|
19 |
fetch({ commit }, param) { |
c4c4f1251
|
20 |
request({ |
8fdae7108
|
21 22 23 |
url: detailStandardUrl, data: param, success: (res) => { |
37ccd9675
|
24 |
commit('INIT', res.data) |
8fdae7108
|
25 26 27 28 29 30 31 32 |
}, fail: (res) => { console.log(" detail fail status === > ", res); }, complete: (res) => { console.log(" detail complete status === > ", res); }, }) |
c4c4f1251
|
33 |
} |
8fdae7108
|
34 |
} |
c4c4f1251
|
35 36 37 38 39 40 41 |
export default { namespaced: true, state, mutations, actions, } |