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.
36 lines
587 B
36 lines
587 B
import Vue from 'vue';
|
|
import Vuex from 'vuex';
|
|
|
|
Vue.use(Vuex);
|
|
|
|
|
|
const store = new Vuex.Store({
|
|
state: {
|
|
vuex_loginInfo: uni.getStorageSync('vuex_loginInfo') ? uni.getStorageSync('vuex_loginInfo') : {},
|
|
},
|
|
mutations: {
|
|
|
|
update_vuex_loginInfo(state, payload) {
|
|
state.vuex_loginInfo = payload
|
|
uni.setStorageSync('vuex_loginInfo', payload);
|
|
},
|
|
|
|
goLogin(state) {
|
|
uni.clearStorageSync()
|
|
state.vuex_loginInfo = {}
|
|
// state.vuex_userInfo = {}
|
|
uni.navigateTo({
|
|
url: '/pages/login/login'
|
|
})
|
|
},
|
|
|
|
},
|
|
|
|
actions: {
|
|
|
|
|
|
},
|
|
|
|
});
|
|
|
|
export default store;
|