index.js 837 B

12345678910111213141516171819202122232425262728293031323334
  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:'https://vote.myjie.cn',//请求地址配置
  9. baseURL: window.location.protocol + "//" + window.location.host,
  10. urlFile:'/index',//项目部署所在文件夹
  11. loginInterceptor:false,//是否打开强制登录
  12. // #ifdef H5 || MP-WEIXIN
  13. weichatInfo:{},//保存微信注册信息
  14. weichatObj:'',//微信对象
  15. // #endif
  16. },
  17. mutations: {
  18. //保存微信信息
  19. setWeiChatInfo(state, provider) {
  20. state.weichatInfo = provider;
  21. },
  22. //保存微信对象
  23. setWeiChatObj(state, provider) {
  24. state.weichatObj = provider;
  25. }
  26. },
  27. modules:{
  28. user
  29. },
  30. actions: {}
  31. })
  32. export default store