index.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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://myc.frp.liuniu946.com",//'http://eb.shuibo.net',//请求地址配置
  8. // baseURL:"http://cys.liuniu946.com",//'http://eb.shuibo.net',//请求地址配置
  9. loginInterceptor:true,//是否打开强制登录
  10. urlFile:'/index',//项目部署所在文件夹
  11. // #ifdef H5 || MP-WEIXIN
  12. weichatInfo:{},//保存微信注册信息
  13. weichatObj:'',//微信对象
  14. // #endif
  15. // #ifdef APP-PLUS
  16. isShowIllegality:false,//不显示ios审核不允许的功能
  17. // #endif
  18. // #ifndef APP-PLUS
  19. isShowIllegality:true,//允许显示隐藏信息
  20. // #endif
  21. latitude: '',
  22. longitude: '',
  23. storeInfo: {}
  24. },
  25. mutations: {
  26. //保存微信信息
  27. setWeiChatInfo(state, provider) {
  28. state.weichatInfo = provider;
  29. },
  30. //保存微信对象
  31. setWeiChatObj(state, provider) {
  32. state.weichatObj = provider;
  33. },
  34. // 修改显示隐藏ios审核不允许显示的功能
  35. changeState(state, provider){
  36. state.isShowIllegality = provider;
  37. },
  38. setLat(state, provider) {
  39. state.latitude = provider
  40. },
  41. setLon(state, provider) {
  42. state.longitude = provider
  43. },
  44. setStoreInfo(state,provider) {
  45. state.storeInfo = provider
  46. }
  47. },
  48. modules:{
  49. user
  50. },
  51. actions: {}
  52. })
  53. export default store