<template>
	<view>
		<!-- 头部 -->
		<headContent>
			<template #left>
				<view class="head-revers-back iconfont" @click.stop="reversBackBtn()">&#xe604;</view>
			</template>
		</headContent>

		<view class="page-content">
			<text class="login-title">登录</text>
			<text class="login-content">Hi, 欢迎来到币王</text>

			<tabList ref="tabListRef" :tabIndex.sync="tabIndexs" />
			<!-- <component :is="phoneLogin"/> -->

			<phoneLogin v-show="tabIndexs === 0" />

			<emailLogin v-show="tabIndexs === 1" />


			<view class="form-hint">
				<text>忘记密码?</text>
				<text class="form-hint-link"></text>
				<text @click.stop="register">立即注册</text>
			</view>
		</view>


	</view>
</template>

<script>
	import {
		reverseBack
	} from "@/utils/common.js"
	import phoneLogin from "./modules/phone.vue"
	import emailLogin from "./modules/email.vue"
	import mailboxLogin from "./modules/mailbox.vue"
	import tabList from "./modules/tab.vue"
	export default {
		name: 'login',
		components: {
			phoneLogin,
			emailLogin,
			mailboxLogin,
			tabList
		},
		data() {
			return {
				tabIndexs: 1,
			};
		},
		methods: {
			reversBackBtn() {
				reverseBack()
			},
			register(){
				uni.navigateTo({
					url: '/pages/login/register'
				})
			}
		}
	}
</script>
<style>
	page {
		background-color: #fff;
	}
</style>
<style lang="scss" scoped>
	@import "~./common.scss"
</style>