Browse Source

Merge remote-tracking branch 'origin/2025鹅状元数学' into 2025鹅状元数学

wangxy 1 month ago
parent
commit
8aab78200f
1 changed files with 22 additions and 41 deletions
  1. 22 41
      pages/chanpinneirong/index.vue

+ 22 - 41
pages/chanpinneirong/index.vue

@@ -105,26 +105,7 @@
 		},
 		onShow() {
 			console.log('学习页面显示,尝试恢复滚动位置')
-			this.chanpinId = cacheManager.get('auth').chanpinId
-			this.danyuanId = cacheManager.get('auth').danyuanId
-			this.banbenId = cacheManager.get('auth').banbenId
-			//用于返回
-			this.dengjiId = cacheManager.get('auth').dengjiId
-			this.cacheManagerLocal = cacheManager.get('xuexi-shuxue') || {}
-			// 使用缓存A@
-			this.danyuanInfo = this.cacheManagerLocal
-			this.curProcess = this.cacheManagerLocal.curProcess
-			this.fontDanyuanId = this.cacheManagerLocal.fontDanyuanId
-			this.nextDanyuanId = this.cacheManagerLocal.nextDanyuanId
-			this.dagangList = this.cacheManagerLocal.dagangList || []
-			const result = this.jisuanWanchengStatus(this.dagangList);
-			if (result.allCompleted) {
-				console.log('全部完成');
-			} else {
-				this.danyuanInfo.curJieId = result.firstUncompleted.jieId
-				console.log('未完成项目:', result.firstUncompleted);
-				console.log('未完成项目jieId:', result.firstUncompleted.jieId);
-			}
+	
 			
 		},
 		onHide() {
@@ -144,27 +125,27 @@
 				this.dengjiId = options.dengjiId
 				this.loadDataFromApi()
 			} else {
-				console.log('使用缓存onLoad');
-				// this.chanpinId = cacheManager.get('auth').chanpinId
-				// this.danyuanId = cacheManager.get('auth').danyuanId
-				// this.banbenId = cacheManager.get('auth').banbenId
-				// //用于返回
-				// this.dengjiId = cacheManager.get('auth').dengjiId
-				// this.cacheManagerLocal = cacheManager.get('xuexi-shuxue') || {}
-				// // 使用缓存A@
-				// this.danyuanInfo = this.cacheManagerLocal
-				// this.curProcess = this.cacheManagerLocal.curProcess
-				// this.fontDanyuanId = this.cacheManagerLocal.fontDanyuanId
-				// this.nextDanyuanId = this.cacheManagerLocal.nextDanyuanId
-				// this.dagangList = this.cacheManagerLocal.dagangList || []
-				// const result = this.jisuanWanchengStatus(this.dagangList);
-				// if (result.allCompleted) {
-				// 	console.log('全部完成');
-				// } else {
-				// 	this.danyuanInfo.curJieId = result.firstUncompleted.jieId
-				// 	console.log('未完成项目:', result.firstUncompleted);
-				// 	console.log('未完成项目jieId:', result.firstUncompleted.jieId);
-				// }
+				console.log('使用缓存');
+				this.chanpinId = cacheManager.get('auth').chanpinId
+				this.danyuanId = cacheManager.get('auth').danyuanId
+				this.banbenId = cacheManager.get('auth').banbenId
+				//用于返回
+				this.dengjiId = cacheManager.get('auth').dengjiId
+				this.cacheManagerLocal = cacheManager.get('xuexi-shuxue') || {}
+				// 使用缓存A@
+				this.danyuanInfo = this.cacheManagerLocal
+				this.curProcess = this.cacheManagerLocal.curProcess
+				this.fontDanyuanId = this.cacheManagerLocal.fontDanyuanId
+				this.nextDanyuanId = this.cacheManagerLocal.nextDanyuanId
+				this.dagangList = this.cacheManagerLocal.dagangList || []
+				const result = this.jisuanWanchengStatus(this.dagangList);
+				if (result.allCompleted) {
+					console.log('全部完成');
+				} else {
+					this.danyuanInfo.curJieId = result.firstUncompleted.jieId
+					console.log('未完成项目:', result.firstUncompleted);
+					console.log('未完成项目jieId:', result.firstUncompleted.jieId);
+				}