Browse Source

跳转调整

wangxy 1 month ago
parent
commit
749d06107a
2 changed files with 17 additions and 1 deletions
  1. 16 0
      pages/chanpinneirong/useNeirongShuxue.js
  2. 1 1
      pages/xinshuxue/lookShipin.vue

+ 16 - 0
pages/chanpinneirong/useNeirongShuxue.js

@@ -0,0 +1,16 @@
+import cacheManager from "@/utils/cacheManager.js";
+
+export function updateXuexiProcess() {
+	const cacheData = cacheManager.get('xuexi-shuxue');
+	console.log('cacheData333333', cacheData)
+	const list = cacheData.danyuanList;
+	const defaultCurProcess = cacheData.curProcess;
+	let mList = [];
+	list.forEach(item => {
+		mList = [...mList, ...item.jieList]
+	})
+	
+	const process = mList.filter(item => item.wanchengFlag).length/mList.length * 100 || 0;
+	cacheData.curProcess = defaultCurProcess > process ? defaultCurProcess: process;
+	cacheManager.set('xuexi-shuxue', cacheData);
+}

+ 1 - 1
pages/xinshuxue/lookShipin.vue

@@ -217,7 +217,7 @@
 			},
 			getLive2() {
 				if (!this.videoId2) {
-					toast("video缺失!")
+					// toast("video缺失!")
 					return false
 				}
 				let req = {