|
@@ -195,6 +195,7 @@ import ShowValueOrNull from '@/components/dynamicf/Display/ShowValueOrNull.vue';
|
|
|
import EmptyToRecord from '@/components/parts/EmptyToRecord.vue';
|
|
|
import { SettingsUtils } from '@imengyu/imengyu-utils';
|
|
|
import { useSimpleDataLoader } from '@/composeable/SimpleDataLoader';
|
|
|
+import { RequestApiError } from '@imengyu/imengyu-utils/dist/request';
|
|
|
|
|
|
const router = useRouter();
|
|
|
const route = useRoute();
|
|
@@ -211,8 +212,28 @@ const ichData = useSimpleDataLoader(async () => {
|
|
|
planData.value = await InheritorContent.getPlanList(data.id);
|
|
|
return data;
|
|
|
});
|
|
|
-const inheritorData = useSimpleDataLoader(async () => await InheritorContent.getInheritorInfo(undefined));
|
|
|
-const seminarData = useSimpleDataLoader(async () => await InheritorContent.getSeminarInfo(undefined));
|
|
|
+const inheritorData = useSimpleDataLoader<InheritorInfo|null>(async () => {
|
|
|
+ try {
|
|
|
+ return await InheritorContent.getInheritorInfo(undefined)
|
|
|
+ } catch (e) {
|
|
|
+ if (e instanceof RequestApiError) {
|
|
|
+ if (e.errorMessage === '暂无信息,等待采集')
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ throw e;
|
|
|
+ }
|
|
|
+});
|
|
|
+const seminarData = useSimpleDataLoader<SeminarInfo|null>(async () => {
|
|
|
+ try {
|
|
|
+ return await InheritorContent.getSeminarInfo(undefined);
|
|
|
+ } catch (e) {
|
|
|
+ if (e instanceof RequestApiError) {
|
|
|
+ if (e.errorMessage === '暂无信息,等待采集')
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ throw e;
|
|
|
+ }
|
|
|
+});
|
|
|
|
|
|
|
|
|
function openInMessage() {
|