<template>
	<form class="login-form">
		<view class="form-item">
			<input class="form-input" v-model="formData.email" type="email" inputmode="email" name="email"
				placeholder-class="form-input-place" placeholder="请输入您的邮箱地址" />
		</view>
		<view class="form-item">
			<input class="form-input" v-model="formData.code" name="code" placeholder-class="form-input-place"
				placeholder="邀请码 (选填)" />
		</view>
		<view class="form-agreement">
			<view class="agreement-confirm">
				<text class="confirm-icon iconfont">&#xe6c5;</text>
			</view>
			<text>我已阅读并同意</text>
			<text class="agreement-name">《用户协议》</text>
		</view>
		<view class="form-btn" @click.stop="formSubmit">
			下一步
		</view>
		<view class="form-hint" >
			已有账号？<text class="hint-btn"> 立即登录</text>
		</view>

		<slider-verify ref="sliderVerifyRef" @slideImgSuccess="slideImgSuccess"/>
	</form>
</template>

<script>
	export default {
		data() {
			return {
				formData: {
					email: 'biking2023@163.com',
					code: ''
				}
			};
		},
		methods: {
			formSubmit(e) {
				console.log('formSubmit = ', this.formData)
				this.$refs.sliderVerifyRef.open();
			},
			slideImgSuccess(){
				uni.navigateTo({
					url: `/pages/login/email-verify?email=${this.formData.email}`
				})
			},
			formReset() {
			
			}
		}
	}
</script>

<style lang="scss" scoped>
	@import "~./../common.scss"
</style>