wangxy 1 month ago
parent
commit
715da7118e

+ 13 - 5
pages/chanpinneirong/index.vue

@@ -219,17 +219,25 @@ import { toast } from '../../utils/common';
 			},
 
 			handlePlay(da, code) {
-				console.log('da', da)
+				
 				let jieId = null;
 				if (code == 'jixu') {
 					if(this.curWanchengStatus){
 						toast("当前单元节内容全部学习完毕,请切换下一单元!")
 						return
 					}
-					jieId = da.jieId;
-					uni.navigateTo({
-						url: `/pages/xinshuxue/lookShipin?jieId=${jieId}`
-					})
+					
+					if (da.type == 1) {
+						jieId = da.jieId;
+						uni.navigateTo({
+							url: `/pages/xinshuxue/lookShipin?jieId=${jieId}`
+						})
+					} else {
+						jieId = da.jieId;
+						uni.navigateTo({
+							url: `/pages/xinshuxue/unitTest?jieId=${jieId}`
+						})
+					}
 				} else {
 					jieId = da.jieId;
 					if (da.type == 1) {

+ 3 - 1
pages/xinshuxue/components/useShuxueUnitTest.js

@@ -10,6 +10,7 @@ import {
 	catchError,
 	toast
 } from "@/utils/common.js"
+import cacheManager from "@/utils/cacheManager.js";
 
 
 export function useShuxueTest(handleSeeResult,handleSeeResultClose) {
@@ -121,7 +122,8 @@ export function useShuxueTest(handleSeeResult,handleSeeResultClose) {
 			toast("单元测试数据提交异常");
 			return;
 		}
-
+		// 更新单元测试状态
+		cacheManager.updateStatusAndProess(data.jieId)
 		// 执行跳页
 		uni.$emit('unitShuxueTest-submit', {
 			rightAnswer: cdata.dui,

+ 2 - 0
pages/xinshuxue/lookShipin.vue

@@ -125,6 +125,8 @@
 			saveJieWancheng() {
 				httpApi.getShuxueChanpinWancheng({jieId: this.jieInfo.jieId}).then(res => {
 					if (res.data) {
+						// 更新单员状态
+						cacheManager.updateStatusAndProess(this.jieInfo.jieId)
 						// 学习完成提示弹窗
 						this.$refs.popupRef.open();
 					}