<template>
	<view class="">
		<u-notify ref="uNotify" message=""></u-notify>
		<view class="pwd_view">
			<!-- <view class="cancel">
				<image src="../../static/images/close.png" mode="" @click=""></image>
			</view> -->
			<view class="" style="font-size: 30rpx;margin-bottom: 42rpx;">
				邀请码登录
			</view>
			<u--input placeholder="请输入账号" border="none" inputAlign="center" v-model="bacount_input"
				style="background-color: #F2F2F4;border-radius: 10rpx;font-size: 28rpx;padding: 20rpx 0;">
			</u--input>
			<view class="tips">
				备注：请输入邀请码登录，如没有邀请码请找授课老师获取
			</view>
			<view class="btn_pwd" @click="sumbit_invitation">
				进入
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "invitation_login",
		props: {
			logintype: Object
		},
		mounted() {
			
		},
		data() {
			return {
				bacount_input:''
			}
		},
		methods: {
			sumbit_invitation() {
				this.$api.roomwatchytypeinvite(this.bacount_input).then(res => {
					if (res.data.code == 200) {
						this.$refs.uNotify.show({
						    top: 30,
						    type: 'success',
						    message: '验证成功',
						    duration: 1000 * 3,
						    fontSize: 20,
						    safeAreaInsetTop:true
						})
						setTimeout(() => {
							location.reload()
						}, 1000);
					}
					else{
						this.$refs.uNotify.show({
						    top: 30,
						    type: 'error',
						    message: res.data.msg,
						    duration: 1000 * 3,
						    fontSize: 20,
						    safeAreaInsetTop:true
						})
					}
				})
			},
		}
	}
</script>

<style>
	.pwd_view {
		padding: 45rpx 60rpx;
		text-align: center;
	}

	.btn_pwd {
		margin-top: 80rpx;
		height: 80rpx;
		background: #266FE8;
		line-height: 80rpx;
		color: #fff;
		border-radius: 40rpx;
	}

/* 	.cancel {
		margin-top: -20rpx;
		margin-bottom: 50rpx;
		margin-right: -20rpx;
	}

	.cancel image {
		width: 30rpx;
		float: right;
		height: 30rpx;
	} */

	.tips {
		font-size: 24rpx;
		color: #777777;
		margin-top: 90rpx;
	}
</style>
