wangxy 19 часов назад
Родитель
Сommit
ae3df0963c
1 измененных файлов с 7 добавлено и 1 удалено
  1. 7 1
      pages/chanpinXuanze/index.vue

+ 7 - 1
pages/chanpinXuanze/index.vue

@@ -103,8 +103,14 @@
 			data.shuxueList = result.shuxue;
 			data.yingyuList = result.yingyu;
 			data.yuwenList = result.yuwen;
+			
+			if (!data.shuxueList.length && !data.yingyuList.length && !data.yuwenList.length) {
+				// 并无学习数据时,清理时间缓存
+				resetDate()
+			}
+			
 		}).catch(err => {
-			// 清理时间缓存
+			// 请求异常时,清理时间缓存
 			resetDate()
 		})
 	}