| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- export const state = () => ({
- componentGoods: {
- fetching: false,
- data: []
- },
- collectCount: {
- fetching: false,
- data: []
- },
- collectCode: {
- // 类目关注
- fetching: false,
- data: []
- }
- })
- export const mutations = {
- REQUEST_CMPGOODS (state) {
- state.componentGoods.fetching = true
- },
- GET_CMPGOODS_SUCCESS (state, result) {
- state.componentGoods.fetching = false
- state.componentGoods.data = result
- },
- GET_CMPGOODS_FAILURE (state) {
- state.fetching = false
- },
- REQUEST_COLLECT (state) {
- state.collectCount.fetching = true
- },
- REQUEST_COLLECT_SUCCESS (state, result) {
- state.collectCount.fetching = false
- state.collectCount.data = result
- },
- REQUEST_COLLECT_FAILURE (state) {
- state.fetching = false
- },
- REQUEST_COLLECTCODE (state) {
- state.collectCode.fetching = true
- },
- REQUEST_COLLECTCODE_SUCCESS (state, result) {
- state.collectCode.fetching = false
- state.collectCode.data = result
- },
- REQUEST_COLLECTCODE_FAILURE (state) {
- state.collectCode = false
- }
- }
|