index.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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://gongan.igxys.com', //请求地址配置
  9. // #endif
  10. // #ifndef MP
  11. baseURL: 'http://gongan.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. project_area: 0,
  26. sys_appid: 'gonganxianred2022125',//系统AppID
  27. sys_appsecret: '2022125gonganxianred',//系统AppSecret
  28. baseName: '公安县红十字会'
  29. },
  30. mutations: {
  31. // #ifdef H5
  32. tabbar(state,provider){
  33. state.tabbarindex = provider;
  34. },
  35. //保存微信信息
  36. setWeiChatInfo(state, provider) {
  37. state.weichatInfo = provider;
  38. },
  39. setSpread(state, provider) {
  40. state.Spread = provider;
  41. },
  42. //保存微信对象
  43. setWeiChatObj(state, provider) {
  44. state.weichatObj = provider;
  45. }
  46. // #endif
  47. },
  48. modules:{
  49. user
  50. },
  51. actions: {
  52. }
  53. })
  54. export default store