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

95 lines
3.5 KiB

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/carFinal.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. common_vendor.index.__f__("log", "at pages/views/carFinal.uvue:58", res.result.records);
  32. if (res.result.records.length == 0) {
  33. if (this.pagesCount >= 10) {
  34. if (getApp().flag == 0) {
  35. common_vendor.index.redirectTo({ url: "/pages/index/PayPal?clientInfo=" + encodeURIComponent(UTS.JSON.stringify(this.clientInfo)) });
  36. } else {
  37. common_vendor.index.redirectTo({ url: "/pages/index/PayPal_pinpai?clientInfo=" + encodeURIComponent(UTS.JSON.stringify(this.clientInfo)) });
  38. }
  39. } else {
  40. if (getApp().flag == 0) {
  41. common_vendor.index.navigateTo({ url: "/pages/index/PayPal?clientInfo=" + encodeURIComponent(UTS.JSON.stringify(this.clientInfo)) });
  42. } else {
  43. common_vendor.index.navigateTo({ url: "/pages/index/PayPal_pinpai?clientInfo=" + encodeURIComponent(UTS.JSON.stringify(this.clientInfo)) });
  44. }
  45. }
  46. } else {
  47. getApp().pid_1 = id;
  48. if (this.pagesCount >= 10) {
  49. common_vendor.index.redirectTo({
  50. url: "/pages/views/car?clientInfo=" + encodeURIComponent(UTS.JSON.stringify(this.clientInfo))
  51. });
  52. } else {
  53. common_vendor.index.navigateTo({
  54. url: "/pages/views/car?clientInfo=" + encodeURIComponent(UTS.JSON.stringify(this.clientInfo))
  55. });
  56. }
  57. }
  58. });
  59. }
  60. }
  61. });
  62. if (!Array) {
  63. const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
  64. _easycom_uni_icons2();
  65. }
  66. const _easycom_uni_icons = () => "../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
  67. if (!Math) {
  68. _easycom_uni_icons();
  69. }
  70. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  71. return {
  72. a: common_vendor.p({
  73. type: "left",
  74. size: "30"
  75. }),
  76. b: common_vendor.o((...args) => $options.getBack && $options.getBack(...args)),
  77. c: common_vendor.f($data.list, (item, index, i0) => {
  78. return {
  79. a: common_vendor.t(item.name),
  80. b: "2cb7d1cc-1-" + i0,
  81. c: index,
  82. d: common_vendor.o(($event) => $options.getPid(item.id, item.name), index)
  83. };
  84. }),
  85. d: common_vendor.p({
  86. type: "right",
  87. color: "#c0c0c0"
  88. }),
  89. e: $data.currentIndex,
  90. f: common_vendor.sei(_ctx.virtualHostId, "view")
  91. };
  92. }
  93. const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
  94. wx.createPage(MiniProgramPage);
  95. //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/views/carFinal.js.map