<template>
	<view>
		<!-- 模态框 -->
		<view class="cu-modal" :class="isShow?'show':''">
			<view class="cu-dialog">
				<view class="padding-xl text-left">
					<view>需先授权微信登录才可正常使用功能</view>
				</view>
				<view class="cu-bar bg-white">
					<navigator class="modal-bottom-oper margin-0 flex-sub text-black" open-type="exit" target="miniProgram">拒绝授权
					</navigator>
					<view class="modal-bottom-oper margin-0 flex-sub text-main-color solid-left" @tap="confirm">确认授权</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: 'vertify-login',
		emits: ['reload'],
		data() {
			return {
				isShow: false
			}
		},
		methods: {
			showModal(e) {
				this.isShow = true
			},
			hideModal(e) {
				this.isShow = false;
			},
			confirm(e) {
				this.$request.login().then(res => {
					if (res) {
						this.$emit('reload');
					}
				})
			}
		}
	}
</script>

<style>
</style>
