index.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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://red.frp.liuniu946.com', //请求地址配置
  9. // #endif
  10. // #ifndef MP
  11. baseURL: 'http://red.frp.liuniu946.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: 'xgred20211207',//系统AppID
  27. sys_appsecret: '70211202dergxxgred20211207',//系统AppSecret
  28. },
  29. mutations: {
  30. // #ifdef H5
  31. tabbar(state,provider){
  32. state.tabbarindex = provider;
  33. },
  34. //保存微信信息
  35. setWeiChatInfo(state, provider) {
  36. state.weichatInfo = provider;
  37. },
  38. setSpread(state, provider) {
  39. state.Spread = provider;
  40. },
  41. //保存微信对象
  42. setWeiChatObj(state, provider) {
  43. state.weichatObj = provider;
  44. }
  45. // #endif
  46. },
  47. modules:{
  48. user
  49. },
  50. actions: {
  51. }
  52. })
  53. export default store