合同小程序前端代码仓库
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.

89 lines
2.9 KiB

3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
  1. "use strict";
  2. const common_vendor = require("../../common/vendor.js");
  3. const api = require("../../api.js");
  4. const js_airport = require("../../js/airport.js");
  5. const _sfc_main = common_vendor.defineComponent({
  6. data() {
  7. return {
  8. currentIndex: "",
  9. letter: "",
  10. clientInfo: new UTSJSONObject({}),
  11. indexList: [],
  12. certFront: "",
  13. carPic: "",
  14. certBack: ""
  15. };
  16. },
  17. onLoad(options) {
  18. this.clientInfo = UTS.JSON.parse(decodeURIComponent(options.clientInfo));
  19. common_vendor.index.__f__("log", "at pages/views/carOne.uvue:52", this.clientInfo.appOrderCarList[0].carSeries);
  20. },
  21. mounted() {
  22. api.getList().then((res = null) => {
  23. let list = js_airport.transformBrands(res.result);
  24. this.indexList = list;
  25. });
  26. },
  27. methods: {
  28. scrollToIndex(letter = null) {
  29. this.letter = letter;
  30. this.currentIndex = letter;
  31. },
  32. getID(id = null, name = null) {
  33. common_vendor.index.__f__("log", "at pages/views/carOne.uvue:66", id);
  34. this.clientInfo.appOrderCarList[0].carSeries = name;
  35. getApp().pid = id;
  36. common_vendor.index.redirectTo({
  37. url: "/pages/views/carTwo?clientInfo=" + encodeURIComponent(UTS.JSON.stringify(this.clientInfo))
  38. });
  39. },
  40. getBack() {
  41. common_vendor.index.__f__("log", "at pages/views/carOne.uvue:78", 1);
  42. common_vendor.index.navigateBack({ delta: 1 });
  43. }
  44. }
  45. });
  46. if (!Array) {
  47. const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
  48. _easycom_uni_icons2();
  49. }
  50. const _easycom_uni_icons = () => "../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
  51. if (!Math) {
  52. _easycom_uni_icons();
  53. }
  54. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  55. return {
  56. a: common_vendor.p({
  57. type: "left",
  58. size: "30"
  59. }),
  60. b: common_vendor.o((...args) => $options.getBack && $options.getBack(...args)),
  61. c: common_vendor.f($data.indexList, (item, index, i0) => {
  62. return {
  63. a: common_vendor.t(item.letter),
  64. b: common_vendor.f(item.cars, (car, i, i1) => {
  65. return {
  66. a: common_vendor.t(car.name),
  67. b: i,
  68. c: common_vendor.o(($event) => $options.getID(car.id, car.name), i)
  69. };
  70. }),
  71. c: common_vendor.sei(item.letter, "view"),
  72. d: index
  73. };
  74. }),
  75. d: $data.currentIndex,
  76. e: common_vendor.f($data.indexList, (item, index, i0) => {
  77. return {
  78. a: common_vendor.t(item.letter),
  79. b: common_vendor.n($data.letter == item.letter ? "test1" : ""),
  80. c: index,
  81. d: common_vendor.o(($event) => $options.scrollToIndex(item.letter), index)
  82. };
  83. }),
  84. f: common_vendor.sei(_ctx.virtualHostId, "view")
  85. };
  86. }
  87. const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
  88. wx.createPage(MiniProgramPage);
  89. //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/views/carOne.js.map