index.js 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <<<<<<< HEAD
  2. import Vue from 'vue'
  3. import Vuex from 'vuex'
  4. import user from './model/user'
  5. Vue.use(Vuex)
  6. let state = {
  7. // baseURL:"http://yrh.liuniu946.com",//'http://eb.shuibo.net',//请求地址配置
  8. baseURL:'http://rpg.frp.liuniu946.com',//请求地址配置
  9. urlFile:'/index',//项目部署所在文件夹
  10. userInfo: {}, //登录信息
  11. loginInterceptor:false,//是否打开强制登录
  12. // #ifdef H5 || MP-WEIXIN
  13. weichatInfo:{},//保存微信注册信息
  14. weichatObj:'',//微信对象
  15. // #endif
  16. }
  17. let mutations = {
  18. //保存微信信息
  19. setWeiChatInfo(state, provider) {
  20. state.weichatInfo = provider;
  21. },
  22. //保存微信对象
  23. setWeiChatObj(state, provider) {
  24. state.weichatObj = provider;
  25. }
  26. }
  27. let modules= {
  28. user
  29. }
  30. const store = new Vuex.Store({
  31. state,
  32. mutations,
  33. modules,
  34. actions: {}
  35. })
  36. export default store
  37. =======
  38. import Vue from 'vue'
  39. import Vuex from 'vuex'
  40. import user from './model/user'
  41. Vue.use(Vuex)
  42. const store = new Vuex.Store({
  43. state: {
  44. // baseURL:"http://yrh.liuniu946.com",//'http://eb.shuibo.net',//请求地址配置
  45. baseURL:"http://www.lalanft.net",//请求地址配置
  46. urlFile:'/index',//项目部署所在文件夹
  47. userInfo: {}, //登录信息
  48. loginInterceptor:false,//是否打开强制登录
  49. // #ifdef H5 || MP-WEIXIN
  50. weichatInfo:{},//保存微信注册信息
  51. weichatObj:'',//微信对象
  52. // #endif
  53. },
  54. mutations: {
  55. //保存微信信息
  56. setWeiChatInfo(state, provider) {
  57. state.weichatInfo = provider;
  58. },
  59. //保存微信对象
  60. setWeiChatObj(state, provider) {
  61. state.weichatObj = provider;
  62. }
  63. },
  64. modules:{
  65. user
  66. },
  67. actions: {}
  68. })
  69. export default store
  70. >>>>>>> 52a7e9ac801e5bdec57490748e56d954e229ebe5