<template>
	<uni-popup ref="agreePopup" :animation="false" :is-mask-click="false"
	 mask-background-color="rgba(0,0,0, 0.76);">
	 <view class="agree-sections-dialog">
			<view class="sections-content-box">
				<view class="agree-title">用户协议及隐私保护</view>
				<view class="agree-tip">我已阅读并同意《用户协议》和《隐私政策》</view>
				<view class="confirm-btn" @click="confirmBtn"></view>
				<text class="not-confirm-btn" @click="handleClose">不同意</text>
			</view>
	 </view>
	</uni-popup>
</template>

<script setup>
	import { ref } from 'vue';
	const agreePopup = ref(null); // 索引
	const $emit = defineEmits(['confirm-btn'])
	// 打开弹窗
	function handleShow() {
		agreePopup.value.open();
	}
	// 关闭弹窗
	function handleClose() {
		agreePopup.value.close();
	}
	// 同意并登录按钮
	function confirmBtn(){
		$emit('confirm-btn');
		agreePopup.value.close();
	}
	defineExpose({
			handleShow
		})
</script>

<style>
</style>