Przeglądaj źródła

修改 缓存机制

wangguoyu 3 miesięcy temu
rodzic
commit
bf9ad859ff

+ 1 - 1
pages/newEnglish/components/beiPage.vue

@@ -146,7 +146,7 @@
 			const { wanchangflag } = res.data;
       if (wanchangflag == 1) {
         // 通知岛重新调用接口
-        cacheManager.remove('daoPageCache')
+        cacheManager.remove('zhangInfo')
       }
 		})
 	}

+ 1 - 1
pages/pay/order.vue

@@ -313,7 +313,7 @@
 				subjectId: data.levelList[0].subjectId,
 				currentZhang: 0
 			})
-			cacheManager.remove('daoPageCache')
+			cacheManager.remove('zhangInfo')
 			uni.redirectTo({
 				url: `/pages/study/index`
 			})

+ 1 - 1
pages/pay/productDialog.vue

@@ -52,7 +52,7 @@
 			subjectId: data.subjectId,
 			currentZhang: 0
 		})
-		cacheManager.remove('daoPageCache')
+		cacheManager.remove('zhangInfo')
 		uni.redirectTo({
 			url: `/pages/study/index`
 		})

+ 1 - 1
pages/selectGradesTerms/index.vue

@@ -146,7 +146,7 @@
 					currentZhang: 0		
 				})
 				// 通知岛重新调用接口
-				cacheManager.remove('daoPageCache')
+				cacheManager.remove('zhangInfo')
 				if (subjectId == 2 && typeId == 1) {
 					// 新版英语跳转版本章选择页面
 					uni.redirectTo({

+ 1 - 1
pages/selectVersion/selectVersion.vue

@@ -146,7 +146,7 @@
 				zhangId: data.shangxiaVersionId,
 			})
 			// 通知岛重新调用接口
-			cacheManager.remove('daoPageCache')
+			cacheManager.remove('zhangInfo')
 			uni.redirectTo({
 				url: `/pages/study/index`
 			})

+ 2 - 8
pages/study/index.vue

@@ -284,7 +284,7 @@
 					eggDialogRef.value.eggShow();
 				})
 			}
-			if (!cacheManager.get('daoPageCache').isCache) {
+			if (!cacheManager.get('zhangInfo')) {
 				console.log('不实用换葱');
 				chooseMethodNoCache()
 			} else {
@@ -377,9 +377,7 @@
 					currentZhang: 0
 				})
 			}
-			cacheManager.set('daoPageCache', {
-				isCache: true
-			})
+	
 
 			nextTick(() => {
 				translateData(res.data)
@@ -419,10 +417,6 @@
 					currentZhang: 0
 				})
 			}
-			cacheManager.set('daoPageCache', {
-				isCache: true
-			})
-
 			nextTick(() => {
 				translateData(res.data)
 				zhangList.value = res.data.zhangList

+ 6 - 6
unpackage/dist/cache/.vite/deps/_metadata.json

@@ -1,19 +1,19 @@
 {
-  "hash": "af725ee9",
-  "configHash": "8e9ff15d",
-  "lockfileHash": "2697756a",
-  "browserHash": "df1a4484",
+  "hash": "9089c2c2",
+  "configHash": "5978ec27",
+  "lockfileHash": "32571fb3",
+  "browserHash": "e7ddfcd6",
   "optimized": {
     "uview-plus": {
       "src": "../../../../../node_modules/uview-plus/index.js",
       "file": "uview-plus.js",
-      "fileHash": "b0c382ff",
+      "fileHash": "d88180c2",
       "needsInterop": false
     },
     "ts-md5/dist/md5": {
       "src": "../../../../../node_modules/ts-md5/dist/md5.js",
       "file": "ts-md5_dist_md5.js",
-      "fileHash": "7f31a37e",
+      "fileHash": "9b180fa3",
       "needsInterop": true
     }
   },