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

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