租房小程序前端代码
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.

129 lines
4.0 KiB

7 months ago
  1. "use strict";
  2. const common_vendor = require("../../common/vendor.js");
  3. const common_assets = require("../../common/assets.js");
  4. const _sfc_main = {
  5. data() {
  6. return {
  7. form: {
  8. name: "",
  9. idcard: "",
  10. phone: ""
  11. },
  12. rules: {
  13. name: [
  14. {
  15. type: "string",
  16. required: true,
  17. message: "请输入姓名",
  18. trigger: ["blur", "change"]
  19. }
  20. ],
  21. idcard: [
  22. {
  23. type: "string",
  24. required: true,
  25. message: "请输入身份证号码",
  26. trigger: ["blur", "change"]
  27. }
  28. ],
  29. phone: [
  30. {
  31. type: "string",
  32. required: true,
  33. message: "请输入联系方式",
  34. trigger: ["blur", "change"]
  35. }
  36. ]
  37. }
  38. };
  39. },
  40. methods: {
  41. submit() {
  42. common_vendor.index.navigateTo({
  43. url: "/pages_subpack/successful/index"
  44. });
  45. this.$refs.form.validate().then((res) => {
  46. common_vendor.index.showToast({
  47. icon: "none",
  48. title: "校验通过"
  49. });
  50. }).catch((errors) => {
  51. common_vendor.index.showToast({
  52. icon: "none",
  53. title: "校验失败"
  54. });
  55. });
  56. }
  57. }
  58. };
  59. if (!Array) {
  60. const _easycom_uv_input2 = common_vendor.resolveComponent("uv-input");
  61. const _easycom_uv_form_item2 = common_vendor.resolveComponent("uv-form-item");
  62. const _easycom_uv_button2 = common_vendor.resolveComponent("uv-button");
  63. const _easycom_uv_form2 = common_vendor.resolveComponent("uv-form");
  64. (_easycom_uv_input2 + _easycom_uv_form_item2 + _easycom_uv_button2 + _easycom_uv_form2)();
  65. }
  66. const _easycom_uv_input = () => "../../uni_modules/uv-input/components/uv-input/uv-input.js";
  67. const _easycom_uv_form_item = () => "../../uni_modules/uv-form/components/uv-form-item/uv-form-item.js";
  68. const _easycom_uv_button = () => "../../uni_modules/uv-button/components/uv-button/uv-button.js";
  69. const _easycom_uv_form = () => "../../uni_modules/uv-form/components/uv-form/uv-form.js";
  70. if (!Math) {
  71. (_easycom_uv_input + _easycom_uv_form_item + _easycom_uv_button + _easycom_uv_form)();
  72. }
  73. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  74. return {
  75. a: common_vendor.o(($event) => $data.form.name = $event),
  76. b: common_vendor.p({
  77. type: "text",
  78. placeholder: "请输入姓名",
  79. customStyle: "border-radius: 30px;margin-top:5px;background-color: #ffffff;padding:5px 20px;",
  80. border: "none",
  81. modelValue: $data.form.name
  82. }),
  83. c: common_vendor.p({
  84. label: "姓名",
  85. prop: "name"
  86. }),
  87. d: common_vendor.o(($event) => $data.form.idcard = $event),
  88. e: common_vendor.p({
  89. type: "text",
  90. placeholder: "请输入身份证号码",
  91. customStyle: "border-radius: 30px;margin-top:5px;background-color: #ffffff;padding:5px 20px;",
  92. border: "none",
  93. modelValue: $data.form.idcard
  94. }),
  95. f: common_vendor.p({
  96. label: "身份证号码",
  97. prop: "idcard"
  98. }),
  99. g: common_vendor.o(($event) => $data.form.phone = $event),
  100. h: common_vendor.p({
  101. type: "number",
  102. placeholder: "请输入联系方式",
  103. customStyle: "border-radius: 30px;margin-top:5px;background-color: #ffffff;padding:5px 20px;",
  104. border: "none",
  105. modelValue: $data.form.phone
  106. }),
  107. i: common_vendor.p({
  108. label: "联系方式",
  109. prop: "phone"
  110. }),
  111. j: common_assets._imports_0$6,
  112. k: common_assets._imports_0$6,
  113. l: common_vendor.o($options.submit),
  114. m: common_vendor.p({
  115. type: "primary",
  116. text: "申请",
  117. customStyle: "margin-top: 10px;border-color: #FF9F39;background-color: #FF9F39;border-radius: 30px;"
  118. }),
  119. n: common_vendor.sr("form", "462b301a-0"),
  120. o: common_vendor.p({
  121. labelPosition: "top",
  122. labelWidth: 200,
  123. model: $data.form,
  124. rules: $data.rules
  125. })
  126. };
  127. }
  128. const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
  129. wx.createPage(MiniProgramPage);