123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- import Vue from 'vue'
- import Vuex from 'vuex'
- Vue.use(Vuex)
- const store = new Vuex.Store({
- state: {
- baseURL: 'https://sos.liuniu946.com',
- urlFile: '/index',
- hasLogin: false,
- userInfo: {},
- loginInterceptor: false,
- orderInfo: {},
- token:'',
-
- setWeiChatInfo:'',
- Lat:'',
- Lng:'',
- weichatInfo: {},
- weichatObj: '',
- weichatBrowser: '' ,
-
-
- },
- mutations: {
-
- login(state) {
- state.hasLogin = true;
- },
-
- logout(state) {
- state.hasLogin = false;
- state.userInfo = {};
- uni.removeStorage({
- key: 'userInfo'
- })
- },
-
- setUserInfo(state, provider) {
- state.userInfo = provider;
- uni.setStorage({
- key: 'userInfo',
- data: provider
- })
- },
-
-
- setWeiChatInfo(state, provider) {
- state.weichatInfo = provider;
- },
-
- setWeiChatObj(state, provider) {
- state.weichatObj = provider;
- }
-
- },
- actions: {
- }
- })
- export default store
|