1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- export const state = () => ({
- newType: {
- fetching: false,
- data: []
- },
- detail: {
- fetching: false,
- data: []
- },
- list: {
- fetching: false,
- data: []
- }
- })
- export const mutations = {
- REQUEST_NEWTYPE (state) {
- state.newType.fetching = true
- },
- GET_NEWTYPE_SUCCESS (state, result) {
- state.newType.fetching = false
- state.newType.data = result
- },
- GET_NEWTYPE_FAILURE (state) {
- state.newType.fetching = false
- },
- REQUEST_DETAIL (state) {
- state.detail.fetching = true
- },
- GET_DETAIL_SUCCESS (state, result) {
- state.detail.fetchiong = false
- state.detail.data = result
- },
- GET_DETAIL_FAILURE (state) {
- state.detail.fetching = false
- },
- REQUEST_LIST (state) {
- state.list.fetching = true
- },
- GET_LIST_SUCCESS (state, result) {
- state.list.fetching = false
- state.list.data = result
- },
- GET_LIST_FAILURE (state) {
- state.list.fetching = false
- }
- }
|