Browse Source

考试调整

wangxy 6 tháng trước cách đây
mục cha
commit
32db322f92
3 tập tin đã thay đổi với 29 bổ sung6 xóa
  1. 21 2
      components/chengji/chengji.vue
  2. 4 2
      pages/unitTest/index.vue
  3. 4 2
      pages/wrong/index.vue

+ 21 - 2
components/chengji/chengji.vue

@@ -1,7 +1,7 @@
 <template>
 	<uni-popup ref="popupRef" :animation="false" :is-mask-click="false"
 	 mask-background-color="rgba(255, 255, 255, 0.6);" class="ezy-popup-width-all">
-		<view class="ezy-result-page">
+		<view class="ezy-result-page"  :style="{backgroundImage: 'url(' + courseBjFun() + ')'}">
 			<view class="icon-title-navBar-box">
 				<view @click="handleBack" class="nav-bar-icon"></view>
 				<view class="nav-bar-title">成绩</view>
@@ -66,6 +66,7 @@
 	import {
 		useQuestionTools
 	} from "@/components/question/useQuestionTools.js";
+	import cacheManager from "@/utils/cacheManager";
 	
 	const {
 		getLetterByIndex
@@ -79,6 +80,10 @@
 		list: {
 			type: Array,
 		},
+		cardId: {
+			type: [String,Number],
+			default: 1
+		}
 	})
 
 	const emits = defineEmits(['back'])
@@ -142,9 +147,23 @@
 			return item.reply
 		}
 	}
+	
+	function courseBjFun() {
+		const cardId = Number(props.cardId);
+		switch (cardId) {
+			case 1:
+				return 'static/images/course/couse-shuxue-bj.png'
+				break;
+			case 2:
+				return 'static/images/course/course-yingyu-bj.png'
+				break;
+			default:
+				break;
+		}
+	}
 
 	defineExpose({
 		showPopup,
-    closePopup
+		closePopup
 	})
 </script>

+ 4 - 2
pages/unitTest/index.vue

@@ -26,7 +26,7 @@
 		
 
 		<!-- 答卷 -->
-		<chengji ref="chengjiRef" :list="list"  @back="handleBack"></chengji>
+		<chengji ref="chengjiRef" :list="list"  @back="handleBack" :cardId="cardId"></chengji>
 		<!-- 分数弹窗 -->
 		<uniPointsVue ref="uniPointsRef" @checkAnswer="checkAnswer" @goStudy="goStudyContinue" :isLastZhang="!!haveFlag" :studyFlag="studyFlag"></uniPointsVue>
 		<!-- 填空 -->
@@ -59,6 +59,7 @@
 	import {onLoad} from "@dcloudio/uni-app"
 	
 
+
 	const {
 		count,
 		total,
@@ -79,6 +80,7 @@
 		initPage,
 		handleCloseTishi
 	} = useExam();
+	const cardId = Number(cacheManager.get('auth').cardId);
 
 	const uniPointsRef = ref(null);
 	const chengjiRef = ref(null);
@@ -138,7 +140,7 @@
 	}
 	
 	function courseBjFun() {
-		switch (Number(cacheManager.get('auth').cardId)) {
+		switch (cardId) {
 			case 1:
 				return 'static/images/course/couse-shuxue-bj.png'
 				break;

+ 4 - 2
pages/wrong/index.vue

@@ -64,7 +64,8 @@
 				</view>
 			</view>
 		</view>
-		<cuoti ref="wrongRef" :list="data.wrongList" @back="handleBackFromCuoti"></cuoti>
+
+		<cuoti ref="wrongRef" :cardId="cardId" :list="data.wrongList" @back="handleBackFromCuoti"></cuoti>
 		<CustomTabBar :cardId="cardId" :nianji="nianji" :zhangId="zhangId"></CustomTabBar>
 	</view>
 </template>
@@ -120,7 +121,7 @@
 		},
 		wrongList: [],
 	})
-
+	cardId.value = data.current+1;
 	function handleBack() {
 		uni.redirectTo({
 			url: '/pages/my/index'
@@ -134,6 +135,7 @@
 	function onChangeTab(e) {
 		if (data.current !== e.currentIndex) {
 			data.current = e.currentIndex;
+			cardId.value = data.current+1;
 			if (data.current == 0) {
 				data.shuxue.page = 0
 			} else if (data.current == 1) {