驾考受理查询支付宝小程序、网页
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.

38 lines
669 B

6 months ago
  1. // 页面路径:store/index.js
  2. import Vue from 'vue'
  3. import Vuex from 'vuex'
  4. Vue.use(Vuex);//vue的插件机制
  5. import api from '@/plugins/api.js'
  6. //Vuex.Store 构造器选项
  7. const store = new Vuex.Store({
  8. state:{//存放状态
  9. info : {},
  10. codeShow : false,
  11. searchShow : false,
  12. },
  13. getters : {
  14. },
  15. mutations : {
  16. getConfList(state){
  17. api('getConfList', {}, res => {
  18. if(res.code == 200){
  19. res.result.forEach(n => {
  20. if(n.keyValue == 'code'){
  21. state.codeShow = n.url == '0'
  22. }
  23. if(n.keyValue == 'search'){
  24. state.searchShow = n.url == '0'
  25. }
  26. })
  27. }
  28. })
  29. },
  30. },
  31. actions : {
  32. },
  33. })
  34. export default store