chenxiong 3 лет назад
Родитель
Сommit
6a573c9b21
2 измененных файлов с 45 добавлено и 5 удалено
  1. 45 5
      pages2/bank/questionBank.vue
  2. BIN
      static/arrow-left.png

+ 45 - 5
pages2/bank/questionBank.vue

@@ -376,7 +376,13 @@
 		<view class="dialog" v-if="showDialog">
 			<image class="pointer" src="/static/pointer.png" mode=""></image>
 			<view class="text">左右滑动切换上下题</view>
-			<view class="btn" @click="hideDialog">我知道了</view>
+			<view class="btn" @click="showDialog = false">我知道了</view>
+		</view>
+		
+		<view class="dialog-arrow" v-if="showArrow">
+			<image class="pointer" src="/static/arrow-left.png" mode=""></image>
+			<view class="text">您当前正在测试, 若想退出请点击左上角返回按钮。</view>
+			<view class="btn" @click="showArrow = false">我知道了</view>
 		</view>
 
 		<view class="dialog_wrap" v-if="testOver">
@@ -468,6 +474,7 @@ export default {
 			lastCount: 0, //剩余没有回答的题目数
 			chapterId: 0,
 			moduleId: 0,
+			showArrow:false, //退出提示
 			isFromVideo:'',
 			gradeId:'',
 			cgType: 0 //对应设计稿弹窗编码
@@ -492,13 +499,13 @@ export default {
 		}
 
 		if (isBack) {
-			console.log(getApp());
 			let app = getApp();
 			let globalData = app.globalData;
 
 			for (var k in globalData.bankData) {
 				this[k] = globalData.bankData[k];
 			}
+			this.showArrow = true;
 
 			this.timer = setInterval(() => {
 				if (this.lastTime <= 0) {
@@ -1283,9 +1290,6 @@ export default {
 		openFooterTab() {
 			this.show = true;
 		},
-		hideDialog() {
-			this.showDialog = false;
-		},
 		changeIndex(index) {
 			this.current = index;
 		},
@@ -2231,6 +2235,42 @@ export default {
 	}
 }
 
+.dialog-arrow {
+	padding-top:124rpx;
+	position: fixed;
+	left: 0;
+	top: 0;
+	width: 100%;
+	height: 100%;
+	background-color: rgba(0, 0, 0, 0.8);
+	z-index: 20000;
+	
+	.pointer {
+		margin-left:87rpx;
+		display: block;
+		width:95rpx;
+		height:98rpx;
+	}
+
+	.text {
+		padding-left:177rpx;
+		font-size: 32rpx;
+		color: #ffffff;
+	}
+
+	.btn {
+		width: 242rpx;
+		height: 82rpx;
+		border: 2rpx solid #ffffff;
+		border-radius: 16rpx;
+		text-align: center;
+		line-height: 82rpx;
+		margin: 500rpx auto 0;
+		color: #fff;
+		font-size: 32rpx;
+	}
+}
+
 .dialog_wrap {
 	position: fixed;
 	left: 0;

BIN
static/arrow-left.png