index.js 881 B

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