2021-05-13 10:56:04 +08:00
|
|
|
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: {
|
2021-07-30 17:11:36 +08:00
|
|
|
navList: [], // 首页快捷导航
|
2021-07-21 15:27:39 +08:00
|
|
|
cartNum: storage.getItem('cartNum') || 0,
|
2021-07-30 17:11:36 +08:00
|
|
|
logoImg: require('@/assets/images/logo2.png'),
|
2021-08-04 17:07:39 +08:00
|
|
|
hotWordsList: storage.getItem('hotWordsList'),
|
|
|
|
category: localStorage.getItem('category')
|
2021-05-13 10:56:04 +08:00
|
|
|
},
|
|
|
|
getters,
|
|
|
|
actions,
|
|
|
|
mutations
|
|
|
|
});
|