소스 검색

用户许可协议

tanxue 5 달 전
부모
커밋
a840a79fba
5개의 변경된 파일79개의 추가작업 그리고 17개의 파일을 삭제
  1. 22 1
      common/styles/global/pages.scss
  2. 38 0
      pages/login/agreeDialog.vue
  3. 19 16
      pages/login/index.vue
  4. BIN
      static/images/login/agree-sections-bj.png
  5. BIN
      static/images/login/agree-sections-close.png

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

@@ -1,7 +1,6 @@
 /***** 这里放页面样式 *****/
 // 登录页  padding-bottom: env(safe-area-inset-bottom); box-sizing: unset;
 .ezy-login-page {
-	
 	width:100%;height:100vh; background-color: #80dfff;position: relative;overflow:hidden;
 	.ezy-login-wrap{width:100%;height: 1623.08rpx;background-image: url("@/static/images/login/login-bj.jpg");@include ezy-no-repeat-cover(top);}
 	.login-body-box{
@@ -81,6 +80,28 @@
 	}
 }
 
+// 用户协议弹窗
+.agree-sections-dialog{
+	width: 100%;height: 100vh;overflow: auto;
+	.agree-sections-content{
+		width: 684rpx;height: 1308rpx;@include ezy-no-repeat-cover;
+		background-image: url("@/static/images/login/agree-sections-bj.png");
+		padding: 120rpx 0 64rpx;box-sizing: border-box;margin-top: 36%;
+		position: relative;text-align: justify;
+		display: flex;flex-direction: column;
+	}
+	.agree-title{font-size: 42rpx;text-align: center;margin-bottom: 42rpx;flex-shrink: 0;}
+	.agree-close-btn{width: 62rpx;height: 62rpx;@include ezy-no-repeat-cover;
+	position: absolute;top: 64rpx;right: 44rpx;
+	background-image: url("@/static/images/login/agree-sections-close.png");}
+	.agree-section-box{font-size: 30rpx;line-height: 1.8;overflow: auto;flex: 1;padding: 0 46rpx;}
+	@media (max-height: 800px) {
+		.agree-sections-content{margin-top: 18%;}
+	}
+	@media (max-height: 700px) {
+		.agree-sections-content{margin-top: var(--status-bar-height);}
+	}
+}
 // 选择年级和学期
 .grades-terms-page{
 	width:100%;height:100vh; 

+ 38 - 0
pages/login/agreeDialog.vue

@@ -0,0 +1,38 @@
+<template>
+	  <uni-popup ref="agreePopup" :animation="false" 
+	  mask-background-color="rgba(255, 255, 255, 0.5);">
+	  <view class="agree-sections-dialog">
+		<view class="agree-sections-content">
+			<view class="agree-title">用户许可协议</view>
+			<view class="agree-close-btn" @click="handleClose"></view>
+			<view class="agree-section-box" v-html="formatText(agreementSections)"></view>
+		</view>
+	  </view>
+	 </uni-popup>
+</template>
+
+<script setup>
+import { ref } from 'vue';
+const agreePopup = ref(null); // 索引
+// 模拟从图片中提取的协议内容,这里使用您提供的文字文本进行简单处理
+const agreementSections = ref(`一、总则
+      1.1 用户应当同意本协议的条款并按照提示完成全部的注册程序。用户在过程中点击或勾选“同意”按钮即表示用户与大连栋科软件工程有限公司(下称“栋科软件”)达成协议,完全接受本协议项下的全部条款。
+      1.2 用户注册成功后,栋科软件将给予每个用户一个用户帐号及相应的密码,该用户帐号和密码由用户负责保管;用户应当对以其用户帐号进行的所有活动和事件负法律责任。
+      1.3 栋科软件用户服务协议以及各个产品的单项服务条款和公告可由栋科软件随时更新,且无需另行通知。您在使用相关服务时,应关注并遵守其所适用的相关条款。
+      1.4 您在使用栋科软件提供的各项服务之前,应仔细阅读本服务协议。如您不同意本服务协议及,或随时对其的修改,您可以主动取消栋科软件提供的服务。
+    `);
+function formatText(text) {
+	return text.replace(/\n/g, '<br/>');
+}
+// 打开弹窗
+function handleShow() {
+	agreePopup.value.open();
+}
+// 关闭弹窗
+function handleClose() {
+	agreePopup.value.close();
+}
+defineExpose({
+		handleShow
+	})
+</script>

+ 19 - 16
pages/login/index.vue

@@ -15,23 +15,21 @@
 					<view class="agreement-checkbox-box">
 						<checkbox class="agreement-checkbox-input" color="#FFFFFF" :checked="indexData.isAgreed" @change="handleAgreementChange"/>
 						<view class="agreement-text-box">
-						  我已阅读并同意<view class="agreement-text">《用户协议》</view>和<view class="agreement-text">《隐私政策》</view>
+						  我已阅读并同意<view class="agreement-text" @click="agreeBtn">《用户协议》</view>和<view @click="agreeBtn" class="agreement-text">《隐私政策》</view>
 						</view>
 					</view>
 					<view class="login-btn yzm-btn-disabled" @click="getYzmBtn" :class="indexData.telStatus"></view>
 				</view>
 				<view class="wx-btn-img"></view>
 		</view>
-		  
+	  <agreeDialog ref="agreeDialogRef"></agreeDialog>
   </view>
 </template>
 
 <script setup>
-	import {
-		ref,
-		reactive
-	} from "vue"
+	import {ref,reactive} from "vue"
 	import { onLoad,onReady } from '@dcloudio/uni-app';
+	import agreeDialog from './agreeDialog.vue'
 	
 	let indexData = reactive({
 		phoneNumber: null,
@@ -46,8 +44,12 @@
 		token:'',
 	})
 	
-	onLoad(() => {
-			getAWSC();
+	const agreeDialogRef = ref(null);
+	
+	onLoad((options) => {
+		console.log(options,'options66666');
+		getAWSC();
+		indexInit(options);
 	})
 	
 	const getAWSC = () => {
@@ -82,15 +84,11 @@
 		    })
 	}
 	
-	// let req  ={
-	// 	sessionId:indexData.sliderObj.sessionId,
-	// 	sig:data.sliderObj.sig,
-	// }
 	const getYzmBtn = () => {
 			
 		uni.navigateTo({
 		//	url: `/pages/login/login?telNum=${data.phoneNumber}&slider=${encodeURIComponent(data.sliderObj)}`,
-				url: `/pages/login/login?data=`+JSON.stringify(sliderObj)
+				url: `/pages/login/login?telNum=${indexData.phoneNumber}&data=`+JSON.stringify(sliderObj)
 		})
 	}
 	
@@ -120,10 +118,15 @@
 		indexData.clearTelIcon = false;
 	}
 	
-	const handleAgreementChange= () => {
+	const agreeBtn = () => {
+		agreeDialogRef.value.handleShow();
+	};
+	
+	const handleAgreementChange= (event) => {
+		console.log(event,'event');	
 
-		if(indexData.isAgreed){
+		/* if(indexData.isAgreed){
 			indexData.isAgreed = !indexData.isAgreed;
-		}
+		} */
 	}
 </script>

BIN
static/images/login/agree-sections-bj.png


BIN
static/images/login/agree-sections-close.png