index.js 999 B

12345678910111213141516171819202122232425262728293031323334353637383940
  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. // baseURL:"http://yrh.liuniu946.com",//'http://eb.shuibo.net',//请求地址配置
  8. // baseURL:'http://heyu.frp.liuniu946.com',//请求地址配置
  9. // baseURL:'https://grayscale.bet',//请求地址配置
  10. baseURL: 'https://zta.andreessen.info',
  11. // baseURL: '',
  12. urlFile:'/index',//项目部署所在文件夹
  13. userInfo: {}, //登录信息
  14. loginInterceptor:false,//是否打开强制登录
  15. // #ifdef H5 || MP-WEIXIN
  16. weichatInfo:{},//保存微信注册信息
  17. weichatObj:'',//微信对象
  18. // #endif
  19. },
  20. mutations: {
  21. //保存微信信息
  22. setWeiChatInfo(state, provider) {
  23. state.weichatInfo = provider;
  24. },
  25. //保存微信对象
  26. setWeiChatObj(state, provider) {
  27. state.weichatObj = provider;
  28. },
  29. setBaseUrl(state, provider) {
  30. state.baseURL = provider;
  31. }
  32. },
  33. modules:{
  34. user
  35. },
  36. actions: {}
  37. })
  38. export default store