tanxue 3 kuukautta sitten
vanhempi
commit
292051c3c4
2 muutettua tiedostoa jossa 50 lisäystä ja 1 poistoa
  1. 1 1
      common/styles/global/pages.scss
  2. 49 0
      pages/login/agreeFirstDialog.vue

+ 1 - 1
common/styles/global/pages.scss

@@ -116,7 +116,7 @@
 	@media (max-height: 600px) {margin-bottom: 0;}
 }
 // 第一次登录时隐私协议弹窗
-.agree-sections-dialog{
+.agree-first-sections-dialog{
 	width: 635rpx;height: 702rpx;padding: 300rpx 36rpx 42rpx;box-sizing: border-box;text-align: center;margin-bottom: 26%;
 	background-image: url("@/static/images/login/agree-dialog-bj.png");@include ezy-no-repeat-cover;
 	.agree-tip{

+ 49 - 0
pages/login/agreeFirstDialog.vue

@@ -0,0 +1,49 @@
+<template>
+	<uni-popup ref="agreeFirstDialog" :animation="false" :is-mask-click="false"
+	 mask-background-color="rgba(255, 255, 255, 0.6);">
+	 <view class="agree-first-sections-dialog">
+			<view class="sections-content-box">
+				<view class="agree-tip">我们将通过<text @click="agreeBtn('yhxy')">《用户协议》</text>和<text @click="agreeBtn('ystk')">《隐私政策》</text> 向您介绍我们为您提供的服务、我们如何处理个人信息以及您享有的权利。点击“同意”按钮,表示您已知情并同意以上协议。</view>
+				<view class="first-confirm-btn" @click="confirmBtn">同意</view>
+				<text class="not-confirm-btn" @click="handleClose">不同意</text>
+			</view>
+	 </view>
+	</uni-popup>
+	<agree-content-dialog ref="agreeContentDialogRef" :agreeType="agreeType"></agree-content-dialog>
+</template>
+
+<script setup>
+	import { ref } from 'vue';
+	import agreeContentDialog from './agreeContentDialog.vue';
+	const agreeContentDialogRef = ref(null);
+	const agreeType = ref(null);
+	const agreeFirstDialog = ref(null); // 索引
+	const $emit = defineEmits(['first-confirm-btn'])
+	const agreeBtn = (data) => {
+		if (data === 'yhxy') {
+			agreeType.value = 'yhxy'
+		} else {
+			agreeType.value = 'ystk'
+		}
+		agreeContentDialogRef.value.handleShow();
+	};
+	// 打开弹窗
+	function handleShow() {
+		agreeFirstDialog.value.open();
+	}
+	// 关闭弹窗
+	function handleClose() {
+		agreeFirstDialog.value.close();
+	}
+	// 同意并登录按钮
+	function confirmBtn(){
+		$emit('first-confirm-btn');
+		agreeFirstDialog.value.close();
+	}
+	defineExpose({
+			handleShow
+		})
+</script>
+
+<style>
+</style>