index.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. import Vue from 'vue'
  2. import Vuex from 'vuex'
  3. import user from './model/user'
  4. //引入axios模块(先下载`axios`--)
  5. // import axios from 'axios'
  6. import axios from 'axios'
  7. //将axios挂载在vue原型链上
  8. // Vue.prototype.$axios = axios;
  9. Vue.prototype.$axios =axios
  10. Vue.use(Vuex)
  11. const store = new Vuex.Store({
  12. state: {
  13. // baseURL:"http://yrh.liuniu946.com",//'http://eb.shuibo.net',//请求地址配置
  14. <<<<<<< HEAD
  15. baseURL:'https://xl.liuniu946.com',//请求地址配置
  16. =======
  17. // baseURL:'http://lnpt.frp.liuniu946.com',//请求地址配置
  18. baseURL:'https://xl.liuniu946.com/',//请求地址配置
  19. >>>>>>> 36454b703a427b7eecd45bbd3f7a0b56c9aa477d
  20. urlFile:'/index',//项目部署所在文件夹
  21. userInfo: {}, //登录信息
  22. loginInterceptor:false,//是否打开强制登录
  23. // #ifdef H5 || MP-WEIXIN
  24. weichatInfo:{},//保存微信注册信息
  25. weichatObj:'',//微信对象
  26. // #endif
  27. },
  28. mutations: {
  29. //保存微信信息
  30. setWeiChatInfo(state, provider) {
  31. state.weichatInfo = provider;
  32. },
  33. //保存微信对象
  34. setWeiChatObj(state, provider) {
  35. state.weichatObj = provider;
  36. }
  37. },
  38. modules:{
  39. user
  40. },
  41. actions: {}
  42. })
  43. export default store