| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- export const state = () => ({
- componentGoods: {
- fetching: false,
- data: []
- },
- collectCount: {
- fetching: false,
- data: []
- },
- collectCode: {
- // 类目关注
- fetching: false,
- data: []
- },
- // 当个物料信息
- nowProductInfo: {
- 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
- },
- REQUEST_NOWPRODUCTINFO (state) {
- state.nowProductInfo.fetching = true
- },
- REQUEST_NOWPRODUCTINFO_SUCCESS (state, result) {
- state.nowProductInfo.fetching = false
- state.nowProductInfo.data = result
- },
- REQUEST_NOWPRODUCTINFO_FAILURE (state) {
- state.nowProductInfo = false
- }
- }
|