|
|
@@ -38,7 +38,7 @@ import YingYuList from "./yingyu/yyList.vue"
|
|
|
import YuWenList from "./yuwen/ywList.vue"
|
|
|
import {useSelectDateForUpdate} from "@/utils/common";
|
|
|
let currentTabIndex = ref(2);
|
|
|
-const {isNowDate} = useSelectDateForUpdate('ziliaoDate')
|
|
|
+const {isNowDate,resetDate} = useSelectDateForUpdate('ziliaoDate')
|
|
|
const data = reactive({
|
|
|
list:[
|
|
|
{ key: 'shuxue', label: '数学' },
|
|
|
@@ -62,7 +62,15 @@ function getZiliaoList() {
|
|
|
const result = getFormatData(res.data);
|
|
|
data.shuxueList = result.shuxue;
|
|
|
data.yingyuList = result.yingyu;
|
|
|
- data.yuwenList = result.yuwen;
|
|
|
+ data.yingyuList = result.yuwen;
|
|
|
+
|
|
|
+ if (!data.shuxueList.length && !data.yingyuList.length && !data.yingyuList.length) {
|
|
|
+ // 并无数据时,清理时间缓存
|
|
|
+ resetDate()
|
|
|
+ }
|
|
|
+ }).catch(err => {
|
|
|
+ // 请求异常时,清理时间缓存
|
|
|
+ resetDate()
|
|
|
})
|
|
|
}
|
|
|
|