景徳镇旅游微信小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
525 B

8 months ago
8 months ago
8 months ago
  1. import Vue from 'vue'
  2. import Vuex from 'vuex'
  3. Vue.use(Vuex); //vue的插件机制
  4. import api from '@/api/api.js'
  5. //Vuex.Store 构造器选项
  6. const store = new Vuex.Store({
  7. state: {
  8. configList: [], //配置列表
  9. image : 'https://img-s-msn-com.akamaized.net/tenant/amp/entityid/BB1msKSi.img',
  10. },
  11. getters: {
  12. },
  13. mutations: {
  14. // 初始化配置
  15. initConfig(state){
  16. api('getConfig', res => {
  17. if(res.code == 200){
  18. state.configList = res.result
  19. }
  20. })
  21. },
  22. },
  23. actions: {},
  24. })
  25. export default store