import Vue from 'vue'
import Vuex from 'vuex'
import user from './model/user'
Vue.use(Vuex)
const store = new Vuex.Store({
	state: {
		// #ifdef MP
		baseURL: 'http://gongan.igxys.com', //请求地址配置
		// #endif
		// #ifndef MP
		baseURL: 'http://gongan.igxys.com', //请求地址配置
		// #endif
		// baseURL: 'http://yrh.liuniu946.com', //请求地址配置
		urlFile: '/index', //项目部署所在文件夹
		loginInterceptor: false, //是否打开强制登录
		token:'',
		// #ifdef H5 
		setWeiChatInfo:'',
		Spread:'',
		weichatInfo: {}, //保存微信注册信息
		weichatObj: '', //微信对象
		weichatBrowser: '' ,//当前是否为微信内置浏览器
		// #endif
		// shareData:'',//分享信息
		project_area: 0,
		sys_appid: 'gonganxianred2022125',//系统AppID
		sys_appsecret: '2022125gonganxianred',//系统AppSecret
		baseName: '公安县红十字会'
	},
	mutations: {
	
		// #ifdef H5
		tabbar(state,provider){
			state.tabbarindex = provider;
		},
		//保存微信信息
		setWeiChatInfo(state, provider) {
			state.weichatInfo = provider;
		},
		setSpread(state, provider) {
			state.Spread = provider;
		},
		//保存微信对象
		setWeiChatObj(state, provider) {
			state.weichatObj = provider;
		}
		// #endif
	},
	modules:{
		user
	},
	actions: {

	}
})

export default store
