index.js 690 B

1234567891011121314151617181920212223242526272829
  1. import Vue from 'vue'
  2. import Vuex from 'vuex'
  3. Vue.use(Vuex)
  4. export default new Vuex.Store({
  5. state: {
  6. weaterRes: {
  7. aqiDetail: {},
  8. weather_pic: '',
  9. weather: '',
  10. temperature: '',
  11. },
  12. windowWidth: 1920 + 1080,
  13. wsUrl: process.env.NODE_ENV === "development" ? '172.16.120.92:8085' : '121.40.217.77:8085',
  14. // wsUrl: '121.40.217.77:8085',
  15. },
  16. mutations: {
  17. changClient(state, val) {
  18. state.windowWidth = val
  19. },
  20. changWeater(state, val) {
  21. state.weaterRes = val
  22. console.log(state.weaterRes)
  23. }
  24. },
  25. actions: {},
  26. modules: {}
  27. })