index.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. import Vue from 'vue'
  2. import Vuex from 'vuex'
  3. Vue.use(Vuex)
  4. export default new Vuex.Store({
  5. state: {
  6. statusBarHeight:null,
  7. topbarOffsetHeight:null,
  8. tabbarHeight:null,
  9. hasSafeArea:null,
  10. platform:null,
  11. isUpdateUserInfo:false,
  12. appId:'wxc351e5dcc35e5b30',
  13. version:null,
  14. service:null,
  15. latitude:null,
  16. longitude:null,
  17. userInfo:null,
  18. imageCdn:null,
  19. videoCdn:null,
  20. IMloadSig:null,
  21. },
  22. mutations: {
  23. setStatusBarHeight(state,preload){
  24. state.statusBarHeight=preload;
  25. },
  26. setTopbarOffsetHeight(state,preload){
  27. state.topbarOffsetHeight=preload;
  28. },
  29. setTabBarHeight(state,preload){
  30. state.tabbarHeight=preload;
  31. },
  32. setHasSafeArea(state,preload){
  33. state.hasSafeArea=preload;
  34. },
  35. setPlatform(state,preload){
  36. state.platform=preload;
  37. },
  38. setIsUpdateUserInfo(state,preload){
  39. state.isUpdateUserInfo=preload;
  40. },
  41. setVersion(state,preload){
  42. state.version=preload;
  43. },
  44. setService(state,preload){
  45. state.service=preload;
  46. },
  47. setLatitude(state,preload){
  48. state.latitude=preload;
  49. },
  50. setLongitude(state,preload){
  51. state.longitude=preload;
  52. },
  53. setUserInfo(state,preload){
  54. state.userInfo=preload;
  55. },
  56. setImageCdn(state,preload){
  57. state.imageCdn=preload;
  58. },
  59. setVideoCdn(state,preload){
  60. state.videoCdn=preload;
  61. },
  62. setImLoadSig(state,preload){
  63. state.IMloadSig=preload;
  64. }
  65. },
  66. modules: {
  67. }
  68. })