wangguoyu 1 month ago
parent
commit
39becf72ce
2 changed files with 9 additions and 5 deletions
  1. 1 1
      components/custom-tabbar/custom-tabbar.vue
  2. 8 4
      pages/chanpinneirong/index.vue

+ 1 - 1
components/custom-tabbar/custom-tabbar.vue

@@ -95,7 +95,7 @@
 					return;
 					return;
 				}
 				}
 
 
-				if (path == '/pages/chanpinneirong/index' && !cacheManager.get('auth').typeId) {
+				if (path == '/pages/chanpinneirong/index' && !cacheManager.get('auth').chanpinId) {
 					this.$refs.popupRef.open();
 					this.$refs.popupRef.open();
 					return false
 					return false
 				}
 				}

+ 8 - 4
pages/chanpinneirong/index.vue

@@ -113,13 +113,17 @@
 				this.banbenId = options.banbenId
 				this.banbenId = options.banbenId
 				this.loadDataFromApi()
 				this.loadDataFromApi()
 			} else {
 			} else {
+				console.log('使用缓存');
+				
 				this.chanpinId = cacheManager.get('auth').chanpinId
 				this.chanpinId = cacheManager.get('auth').chanpinId
+				this.danyuanId = cacheManager.get('auth').danyuanId
+				this.banbenId = cacheManager.get('auth').banbenId
 				this.cacheManagerLocal = cacheManager.get('xuexi-' + this.chanpinId)
 				this.cacheManagerLocal = cacheManager.get('xuexi-' + this.chanpinId)
 				// 使用缓存
 				// 使用缓存
-				this.danyuanInfo = this.cacheManagerLocal.data
-				this.fontDanyuanId = this.cacheManagerLocal.data.fontDanyuanId
-				this.nextDanyuanId = this.cacheManagerLocal.data.nextDanyuanId
-				this.dagangList = this.cacheManagerLocal.data.dagangList || []
+				this.danyuanInfo = this.cacheManagerLocal
+				this.fontDanyuanId = this.cacheManagerLocal.fontDanyuanId
+				this.nextDanyuanId = this.cacheManagerLocal.nextDanyuanId
+				this.dagangList = this.cacheManagerLocal.dagangList || []
 			}
 			}
 		},
 		},