12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- import Vue from 'vue'
- import Vuex from 'vuex'
- import user from './model/user'
- import {tabbar,tabbar1} from '@/utils/tabbar.js'
- Vue.use(Vuex)
- const store = new Vuex.Store({
- namespaced: true,
- state: {
- baseURL:"http://new.yiqushangshi.com",//'http://eb.shuibo.net',//请求地址配置
- // baseURL: 'http://new.yiqushangshi.com', //请求地址配置
- urlFile: '/index', //项目部署所在文件夹
- userInfo: {}, //登录信息
- loginInterceptor: false, //是否打开强制登录
- // #ifdef H5 || MP-WEIXIN
- weichatInfo: {}, //保存微信注册信息
- weichatObj: '', //微信对象
- // #endif
- },
- getters:{
- jump(item){
- if(item==true){
- return tabbar
- }else return tabbar1
- }
- },
- mutations: {
- //保存微信信息
- setWeiChatInfo(state, provider) {
- state.weichatInfo = provider;
- },
- //保存微信对象
- setWeiChatObj(state, provider) {
- state.weichatObj = provider;
- }
- },
- modules: {
- user
- },
- actions: {}
- })
- export default store
|