You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
1.1 KiB
64 lines
1.1 KiB
// import Vue from 'vue'
|
|
// import Vuex from 'vuex'
|
|
// //
|
|
// Vue.use(Vuex);
|
|
import Setting from '~/setting'
|
|
|
|
|
|
export const state = () => ({
|
|
typeI: 0,
|
|
headers: true,
|
|
footers: true,
|
|
cartnumber: 0,
|
|
logoUrl: '',
|
|
titleCon: '',
|
|
unreadNum: 0,
|
|
service_num: 0,
|
|
UploadRegisterUrl: Setting.apiBaseURL + '/upload/storeRegister',
|
|
|
|
|
|
|
|
})
|
|
|
|
export const mutations = {
|
|
|
|
typeIndex(state, data) {
|
|
state.typeI = data;
|
|
},
|
|
isHeader(state, data) {
|
|
state.headers = data;
|
|
},
|
|
isFooter(state, data) {
|
|
state.footers = data;
|
|
},
|
|
cartNum(state, data) {
|
|
state.cartnumber = data;
|
|
},
|
|
serviceNum(state, data) {
|
|
state.service_num = data;
|
|
},
|
|
logo(state, data) {
|
|
state.logoUrl = data;
|
|
},
|
|
titles(state, data) {
|
|
state.titleCon = data;
|
|
},
|
|
unreadKefu(state, data) {
|
|
state.unreadNum = data;
|
|
},
|
|
|
|
}
|
|
|
|
export const actions = {
|
|
nuxtServerInit({
|
|
commit
|
|
}, {
|
|
app
|
|
}) {
|
|
commit('cartNum', app.$cookies.get('cartNum'));
|
|
commit('unreadKefu', app.$cookies.get('unreadKefu'));
|
|
commit('logo', app.$cookies.get('logo'));
|
|
commit('titles', app.$cookies.get('titles'));
|
|
},
|
|
|
|
}
|
|
|