wangguoyu 1 month ago
parent
commit
0c8e155826
1 changed files with 4 additions and 3 deletions
  1. 4 3
      pages/chanpinneirong/index.vue

+ 4 - 3
pages/chanpinneirong/index.vue

@@ -1,7 +1,6 @@
 <template>
 	<view class="ezy-xuexi-page">
 		<view class="icon-title-navBar-box">
-			<view @click="handleBack" class="nav-bar-icon"></view>
 			<text class="nav-bar-title">学习</text>
 		</view>
 		<view class="ezy-page-body xuexi-page-body">
@@ -102,9 +101,10 @@
 			danyuanInfoVue
 		},
 		onShow() {
-			console.log('学习页面显示,使用缓存数据')
+		
 			console.log('this.needRefresh',this.needRefresh)
 			console.log('this.hasCache',this.hasCache)
+				console.log('学习页面显示,使用缓存数据')
 			this.currentTabIndex = 1
 			// 如果从其他页面返回需要刷新数据
 			if (this.needRefresh) {
@@ -137,7 +137,6 @@
 				this.hasCache = false;
 					const cacheDataAuth = cacheManager.get('auth');
 				this.initFromOptions(cacheDataAuth);
-				this.loadDataFromApi();
 			}
 		},
 		// 返回处理
@@ -195,10 +194,12 @@
 
 			// 从参数初始化方法
 			initFromOptions(options) {
+				console.log('options',options);
 				this.chanpinId = options.chanpinId;
 				this.danyuanId = options.danyuanId;
 				this.banbenId = options.banbenId;
 				this.dengjiId = options.dengjiId;
+				this.loadDataFromApi();
 			},
 			// 从缓存更新数据方法
 			updateFromCache() {