<template>
	<view class="authorization-box" v-if="show">
		<view class="title">{{$t('index.athor-login')}}</view>
		<view class="message">{{$t('index.login-note')}}</view>
		<view class="btn-box">
			<button class="button" type="primary" @click="toLogin" hover-class="none">{{$t('index.login')}}</button>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			show: {
				type: Boolean,
				default: false
			},
			url: String
		},
		data() {
			return {

			}
		},
		methods: {
			toLogin() {
				uni.navigateTo({
					url: `/pages/login/index?url=${encodeURIComponent(JSON.stringify(this.url))}`
				});
			}
		}
	}
</script>

<style lang="scss">
	.authorization-box {
		box-sizing: border-box;
		// height: 100vh;
		padding-top: 100rpx;
		// background-color: #FFFFFF;

		.title {
			text-align: center;
			font-size: 16px;
			color: #B60001;
			font-weight: bold;
		}

		.message {
			font-size: 14px;
			margin-top: 60rpx;
			text-align: center;
			color: #99A0AF;
		}

		.btn-box {
			margin-top: 100rpx;

			.button {
				width: 300rpx;
				height: 40px;
				line-height: 40px;
				background-color: #B60001;
				font-size: 14px;
				color: #FFFFFF;
			}
		}
	}
</style>