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

56 lines
1.3 KiB

10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 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. import { commonIndexLogin,commonIndexLoginByInviteCode } from "@/common/api.js"
  15. export default{
  16. data(){
  17. return{
  18. form:{
  19. invite:""
  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. this.$refs.form.validate().then(res => {
  36. commonIndexLoginByInviteCode({inviteCode:this.form.invite}).then(response=>{
  37. uni.navigateTo({
  38. url:"/pages_subpack/success/index?type=homeowner"
  39. })
  40. }).catch(error=>{
  41. })
  42. }).catch(errors => {
  43. })
  44. }
  45. }
  46. }
  47. </script>
  48. <style>
  49. page{
  50. background-color: #f5f5f5;
  51. }
  52. </style>