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

59 lines
1.3 KiB

6 months ago
6 months ago
6 months ago
  1. <template>
  2. <view class="se-p-30">
  3. <uv-form labelPosition="top" :model="form" :rules="rules" ref="form">
  4. <uv-form-item label="经纪人邀请码" prop="invite" labelWidth="220">
  5. <uv-input v-model="form.invite" type="text" placeholder="请输入邀请码" customStyle="border-radius: 30px;margin-top:5px;background-color: #ffffff;padding:5px 20px;" border="none"></uv-input>
  6. </uv-form-item>
  7. <uv-form-item>
  8. <uv-button type="primary" text="登录" customStyle="margin-top: 30px;background-color: #1EC77A;border-radius: 30px;" @click="submit"></uv-button>
  9. </uv-form-item>
  10. </uv-form>
  11. </view>
  12. </template>
  13. <script>
  14. export default{
  15. data(){
  16. return{
  17. form:{
  18. invite:"",
  19. password:""
  20. },
  21. rules:{
  22. invite:[
  23. {
  24. type: 'string',
  25. required: true,
  26. message: '请输入邀请码',
  27. trigger: ['blur', 'change']
  28. }
  29. ]
  30. }
  31. }
  32. },
  33. methods:{
  34. submit() {
  35. uni.navigateTo({
  36. url:"/pages_subpack/success/index?type=homeowner"
  37. })
  38. this.$refs.form.validate().then(res => {
  39. uni.showToast({
  40. icon: 'none',
  41. title: '校验通过'
  42. })
  43. }).catch(errors => {
  44. uni.showToast({
  45. icon: 'none',
  46. title: '校验失败'
  47. })
  48. })
  49. }
  50. }
  51. }
  52. </script>
  53. <style>
  54. page{
  55. background-color: #f5f5f5;
  56. }
  57. </style>