<template>
	<view class="se-p-30">
		<uv-form labelPosition="top" :model="form" :rules="rules" ref="form">
			<uv-form-item label="经纪人邀请码" prop="invite" labelWidth="220">
				<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>
			</uv-form-item>
			<uv-form-item>
				<uv-button type="primary" text="登录" customStyle="margin-top: 30px;background-color: #1EC77A;border-radius: 30px;" @click="submit"></uv-button>
			</uv-form-item>
		</uv-form>
	</view>
</template>

<script>
	export default{
		data(){
			return{
				form:{
					invite:"",
					password:""
				},
				rules:{
					invite:[
						{
							type: 'string',
							required: true,
							message: '请输入邀请码',
							trigger: ['blur', 'change']
						}
					]
				}
			}
		},
		methods:{
			submit() {
				uni.navigateTo({
					url:"/pages_subpack/house/index"
				})
				this.$refs.form.validate().then(res => {
					uni.showToast({
						icon: 'none',
						title: '校验通过'
					})
				}).catch(errors => {
					uni.showToast({
						icon: 'none',
						title: '校验失败'
					})
				})
			}
		}
	}
</script>

<style>
	page{
		background-color: #f5f5f5;
		
	}
</style>