commit message

This commit is contained in:
Chopper
2021-05-13 10:56:04 +08:00
commit ec3e958037
728 changed files with 132685 additions and 0 deletions

View File

@@ -0,0 +1 @@

View File

View File

@@ -0,0 +1,11 @@
// 全部商品分类
export const SET_CATEGORY = (state, data) => {
state.category = data
}
export const SET_NAVLIST = (state, data) => {
state.navList = data
}
export const SET_CARTNUM = (state, data) => {
state.cartNum = data
}

19
buyer/src/vuex/store.js Normal file
View File

@@ -0,0 +1,19 @@
import Vue from 'vue';
import Vuex from 'vuex';
import * as actions from './actions';
import * as mutations from './mutations';
import * as getters from './getters';
import storage from '@/plugins/storage.js'
Vue.use(Vuex);
export default new Vuex.Store({
state: {
category: [], // 全部分类
navList: [],
cartNum: storage.getItem('cartNum') || 0
},
getters,
actions,
mutations
});