<template>
	<view class="login_two">
		<view class="top">
			<view class="left" :className="current==0?info1:info2">手机号登录</view>
			<view class="right" :className="current==1?info1:info2">账号密码登录</view>
		</view>
		<swiper class="scroll-view-height" @change="swipeIndex" :current="current" :duration="300">
		    <swiper-item>
					<view class="inputBox">
						<input type="text" class="inp" placeholder="手机号">
						<input type="text" class="inp" placeholder="请输入验证码">
						<button class="yzm">获取验证码</button>
					</view>
		    </swiper-item>
			
		    <swiper-item>
					<view class="inputBox">
						<input type="text" class="inp inp2" placeholder="用户名/绑定手机/绑定邮箱">
						<input type="text" class="inp" placeholder="登录密码">
						<button class="yzm">获取验证码</button>
					</view>
					<text @click="goto" style="font-size: 14px;float: right;padding: 20rpx;padding-right: 30rpx;">忘记密码</text>
		  </swiper-item>
		</swiper>
		
		<view class="mid">
			<!-- <view class="quan"></view> -->
			<radio value="r1" @click="radioCheck" :checked="isOK" />
			<view class="">
				我已阅读并同意<text>《教育小程序服务条款》</text>和 <text>《 隐私协议》</text>新用户自动注册
			</view>
		</view>
		
		<button class="btn">登录</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				current:0,
				info1:'',
				info2:'',
				isOK:false
			}
		},
		methods: {
			// 登录方式切换
			swipeIndex(index){
				// console.log(index);
			},
			// 是否同意条约
			radioCheck(){
				this.isOK=!this.isOK
			},
			// 忘记密码
			goto(){
				uni.navigateTo({
					url:"/pages/login_three/login_three"
				})
			}
		}
	}
</script>

<style lang="scss">
	.login_two{
		.top{
			width: 500rpx;
			display: flex;
			justify-content: space-between;
			margin: auto;
			margin-top: 100rpx;
			margin-bottom: 60rpx;
			.info1{
				font-weight: bold;
				
			}
			.info2{
				
			}
		}
		.inputBox{
			padding: 0 30rpx;
			position: relative;
			.yzm{
				position: absolute;
				bottom: 10rpx;
				right: 20rpx;
				font-size: 12px;
				background-color: #7eb5f6;
				color: #fff;
			}
			.inp{
				padding: 10rpx 15rpx;
				// margin-top: 50rpx;
				border-bottom: 1px #ccc solid;
			}
			.inp:nth-child(1){
				margin-bottom: 50rpx;
			}
		}
		
		.mid{
			display: flex;
			justify-content: flex-start;
			width: 750rpx;
			padding: 0rpx 20rpx;
			font-size: 13px;
			/deep/ .uni-radio-input{
				width: 15px;
				height: 15px;
			}
			text{
				color: #4a97f2;
			}
		}
		
		.btn{
			background-color: #0056a8;
			color: #ffffff;
			border-radius: 30px;
			margin: 30rpx 35rpx;
			// padding: 0rpx 10rpx;
			font-size: 16px;
		}
	}
</style>
