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

104 lines
3.2 KiB

6 months ago
6 months ago
6 months ago
  1. "use strict";
  2. const common_vendor = require("../../common/vendor.js");
  3. const _sfc_main = {
  4. data() {
  5. return {
  6. form: {
  7. name: "",
  8. password: ""
  9. },
  10. rules: {
  11. name: [
  12. {
  13. type: "string",
  14. required: true,
  15. message: "请输入账号",
  16. trigger: ["blur", "change"]
  17. }
  18. ],
  19. password: [
  20. {
  21. type: "string",
  22. required: true,
  23. message: "请输入密码",
  24. trigger: ["blur", "change"]
  25. }
  26. ]
  27. }
  28. };
  29. },
  30. methods: {
  31. submit() {
  32. common_vendor.index.navigateTo({
  33. url: "/pages_subpack/success/index?type=broker"
  34. });
  35. this.$refs.form.validate().then((res) => {
  36. common_vendor.index.showToast({
  37. icon: "none",
  38. title: "校验通过"
  39. });
  40. }).catch((errors) => {
  41. common_vendor.index.showToast({
  42. icon: "none",
  43. title: "校验失败"
  44. });
  45. });
  46. }
  47. }
  48. };
  49. if (!Array) {
  50. const _easycom_uv_input2 = common_vendor.resolveComponent("uv-input");
  51. const _easycom_uv_form_item2 = common_vendor.resolveComponent("uv-form-item");
  52. const _easycom_uv_button2 = common_vendor.resolveComponent("uv-button");
  53. const _easycom_uv_form2 = common_vendor.resolveComponent("uv-form");
  54. (_easycom_uv_input2 + _easycom_uv_form_item2 + _easycom_uv_button2 + _easycom_uv_form2)();
  55. }
  56. const _easycom_uv_input = () => "../../uni_modules/uv-input/components/uv-input/uv-input.js";
  57. const _easycom_uv_form_item = () => "../../uni_modules/uv-form/components/uv-form-item/uv-form-item.js";
  58. const _easycom_uv_button = () => "../../uni_modules/uv-button/components/uv-button/uv-button.js";
  59. const _easycom_uv_form = () => "../../uni_modules/uv-form/components/uv-form/uv-form.js";
  60. if (!Math) {
  61. (_easycom_uv_input + _easycom_uv_form_item + _easycom_uv_button + _easycom_uv_form)();
  62. }
  63. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  64. return {
  65. a: common_vendor.o(($event) => $data.form.name = $event),
  66. b: common_vendor.p({
  67. type: "text",
  68. placeholder: "请输入账号",
  69. customStyle: "border-radius: 30px;margin-top:5px;background-color: #ffffff;padding:5px 20px;",
  70. border: "none",
  71. modelValue: $data.form.name
  72. }),
  73. c: common_vendor.p({
  74. label: "账号",
  75. prop: "name"
  76. }),
  77. d: common_vendor.o(($event) => $data.form.password = $event),
  78. e: common_vendor.p({
  79. type: "password",
  80. placeholder: "请输入密码",
  81. customStyle: "border-radius: 30px;margin-top:5px;background-color: #ffffff;padding:5px 20px;",
  82. border: "none",
  83. modelValue: $data.form.password
  84. }),
  85. f: common_vendor.p({
  86. label: "密码",
  87. prop: "password"
  88. }),
  89. g: common_vendor.o($options.submit),
  90. h: common_vendor.p({
  91. type: "primary",
  92. text: "登录",
  93. customStyle: "margin-top: 30px;background-color: #1EC7B6;border-radius: 30px;"
  94. }),
  95. i: common_vendor.sr("form", "8a55433a-0"),
  96. j: common_vendor.p({
  97. labelPosition: "top",
  98. model: $data.form,
  99. rules: $data.rules
  100. })
  101. };
  102. }
  103. const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
  104. wx.createPage(MiniProgramPage);