酒店桌布为微信小程序
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.

31 lines
520 B

9 months ago
9 months ago
9 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. },
  10. getters: {
  11. // 角色 true为水洗店 false为酒店
  12. userShop(){
  13. return true
  14. }
  15. },
  16. mutations: {
  17. // 初始化配置
  18. initConfig(state){
  19. api('getConfig', res => {
  20. if(res.code == 200){
  21. state.configList = res.result
  22. }
  23. })
  24. },
  25. },
  26. actions: {},
  27. })
  28. export default store