index.js 886 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import Vue from 'vue'
  2. import Vuex from 'vuex'
  3. import user from './model/user'
  4. Vue.use(Vuex)
  5. let state = {
  6. // baseURL:"http://yrh.liuniu946.com",//'http://eb.shuibo.net',//请求地址配置
  7. baseURL:'http://rpg.frp.liuniu946.com',//请求地址配置
  8. urlFile:'/index',//项目部署所在文件夹
  9. userInfo: {}, //登录信息
  10. loginInterceptor:false,//是否打开强制登录
  11. // #ifdef H5 || MP-WEIXIN
  12. weichatInfo:{},//保存微信注册信息
  13. weichatObj:'',//微信对象
  14. // #endif
  15. }
  16. let mutations = {
  17. //保存微信信息
  18. setWeiChatInfo(state, provider) {
  19. state.weichatInfo = provider;
  20. },
  21. //保存微信对象
  22. setWeiChatObj(state, provider) {
  23. state.weichatObj = provider;
  24. }
  25. }
  26. let modules= {
  27. user
  28. }
  29. const store = new Vuex.Store({
  30. state,
  31. mutations,
  32. modules,
  33. actions: {}
  34. })
  35. export default store