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.

43 lines
938 B

1 week ago
  1. "use strict";
  2. const common_vendor = require("../../common/vendor.js");
  3. const carStore = common_vendor.defineStore(
  4. "car",
  5. {
  6. state: () => ({
  7. carInfo: {
  8. carType: "car",
  9. //车型
  10. stepType: "1",
  11. //科目几
  12. carTypeName: "小车",
  13. contentType: "",
  14. //图片还是文字
  15. sift: "",
  16. //是否精选
  17. volume: "",
  18. //是否是密卷
  19. knowType: "",
  20. //分类
  21. chapter: "",
  22. //章节
  23. types: "",
  24. //题型
  25. city: "0",
  26. cityName: ""
  27. },
  28. webLink: "https://www.baidu.com/"
  29. }),
  30. actions: {
  31. setCar(key, value) {
  32. let arr = ["knowType", "chapter", "types"];
  33. if (arr.includes(key)) {
  34. arr.forEach((item) => {
  35. this.carInfo[item] = "";
  36. });
  37. }
  38. this.carInfo[key] = value;
  39. }
  40. }
  41. }
  42. );
  43. exports.carStore = carStore;