index.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. import Vue from 'vue'
  2. import Vuex from 'vuex'
  3. import user from './model/user'
  4. Vue.use(Vuex)
  5. const store = new Vuex.Store({
  6. state: {
  7. // #ifdef MP
  8. baseURL: 'http://jxred.igxys.com', //请求地址配置
  9. // #endif
  10. // #ifndef MP
  11. baseURL: 'http://jxred.igxys.com', //请求地址配置
  12. // #endif
  13. // baseURL: 'http://yrh.liuniu946.com', //请求地址配置
  14. urlFile: '/index', //项目部署所在文件夹
  15. loginInterceptor: false, //是否打开强制登录
  16. token:'',
  17. // #ifdef H5
  18. setWeiChatInfo:'',
  19. Spread:'',
  20. weichatInfo: {}, //保存微信注册信息
  21. weichatObj: '', //微信对象
  22. weichatBrowser: '' ,//当前是否为微信内置浏览器
  23. // #endif
  24. // shareData:'',//分享信息
  25. zxphone: '027-87012677',
  26. baseName: '武汉市江夏区红十字会'
  27. },
  28. mutations: {
  29. // #ifdef H5
  30. tabbar(state,provider){
  31. state.tabbarindex = provider;
  32. },
  33. //保存微信信息
  34. setWeiChatInfo(state, provider) {
  35. state.weichatInfo = provider;
  36. },
  37. setSpread(state, provider) {
  38. state.Spread = provider;
  39. },
  40. //保存微信对象
  41. setWeiChatObj(state, provider) {
  42. state.weichatObj = provider;
  43. }
  44. // #endif
  45. },
  46. modules:{
  47. user
  48. },
  49. actions: {
  50. }
  51. })
  52. export default store