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,
|
2022-05-17 09:19:36 +08:00
|
|
|
logoImg: storage.getItem('logoImg') || require('@/assets/images/logo2.png'),
|
2022-06-06 16:08:58 +08:00
|
|
|
siteName:storage.getItem('siteName')|| 'lilishop',
|
2021-08-04 17:07:39 +08:00
|
|
|
hotWordsList: storage.getItem('hotWordsList'),
|
2021-08-06 11:32:29 +08:00
|
|
|
category: JSON.parse(localStorage.getItem('category'))
|
2021-05-13 10:56:04 +08:00
|
|
|
},
|
|
|
|
getters,
|
|
|
|
actions,
|
|
|
|
mutations
|
|
|
|
});
|