|
@@ -23,7 +23,11 @@
|
|
|
<Width :width="30" />
|
|
<Width :width="30" />
|
|
|
</FlexRow>
|
|
</FlexRow>
|
|
|
|
|
|
|
|
|
|
+ <FlexCol v-if="showLoading" :height="500" center>
|
|
|
|
|
+ <ActivityIndicator />
|
|
|
|
|
+ </FlexCol>
|
|
|
<DynamicX
|
|
<DynamicX
|
|
|
|
|
+ v-else-if="show"
|
|
|
:page="pageThemeLoader.content.value"
|
|
:page="pageThemeLoader.content.value"
|
|
|
:injectScriptGlobal="pageScriptGlobal"
|
|
:injectScriptGlobal="pageScriptGlobal"
|
|
|
>
|
|
>
|
|
@@ -279,6 +283,7 @@
|
|
|
</DynamicXNodeChild>
|
|
</DynamicXNodeChild>
|
|
|
</template>
|
|
</template>
|
|
|
</DynamicX>
|
|
</DynamicX>
|
|
|
|
|
+
|
|
|
</ProvideVar>
|
|
</ProvideVar>
|
|
|
</SimplePageContentLoader>
|
|
</SimplePageContentLoader>
|
|
|
|
|
|
|
@@ -394,6 +399,8 @@ import ContentBlocks from './card/content/ContentBlocks.vue';
|
|
|
import ContentTitle from './card/content/ContentTitle.vue';
|
|
import ContentTitle from './card/content/ContentTitle.vue';
|
|
|
import ContentMap from './card/content/ContentMap.vue';
|
|
import ContentMap from './card/content/ContentMap.vue';
|
|
|
import type { ContentTitleBlockDefine } from './card/content/ContentBlocks';
|
|
import type { ContentTitleBlockDefine } from './card/content/ContentBlocks';
|
|
|
|
|
+import { onHide, onShow } from '@dcloudio/uni-app';
|
|
|
|
|
+import ActivityIndicator from '@/components/basic/ActivityIndicator.vue';
|
|
|
|
|
|
|
|
const emit = defineEmits<{
|
|
const emit = defineEmits<{
|
|
|
(e: 'goTree'): void;
|
|
(e: 'goTree'): void;
|
|
@@ -588,7 +595,7 @@ const pageScriptGlobal = reactive({
|
|
|
handleGoCollect,
|
|
handleGoCollect,
|
|
|
getVillageId: () => villageStore.currentVillage?.id ?? 0,
|
|
getVillageId: () => villageStore.currentVillage?.id ?? 0,
|
|
|
getDefaultTags: () => defaultTags,
|
|
getDefaultTags: () => defaultTags,
|
|
|
- navTo,
|
|
|
|
|
|
|
+ navTo: navTo,
|
|
|
emit,
|
|
emit,
|
|
|
todo: () => alert({ content: '暂未实现,敬请期待' }),
|
|
todo: () => alert({ content: '暂未实现,敬请期待' }),
|
|
|
});
|
|
});
|
|
@@ -622,20 +629,37 @@ watch(() => villageStore.currentVillage, async () => {
|
|
|
await noticeListLoader.reload();
|
|
await noticeListLoader.reload();
|
|
|
}, { immediate: true });
|
|
}, { immediate: true });
|
|
|
|
|
|
|
|
|
|
+const show = ref(true);
|
|
|
|
|
+const showLoading = ref(false);
|
|
|
|
|
+
|
|
|
|
|
+onHide(() => {
|
|
|
|
|
+ show.value = false;
|
|
|
|
|
+})
|
|
|
|
|
+onShow(() => {
|
|
|
|
|
+ showLoading.value = true;
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ showLoading.value = false;
|
|
|
|
|
+ show.value = true;
|
|
|
|
|
+ }, 1100);
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
defineExpose({
|
|
defineExpose({
|
|
|
onPageBack: (name: string, data: Record<string, unknown>) => {
|
|
onPageBack: (name: string, data: Record<string, unknown>) => {
|
|
|
- if (name === 'refreshVillageGrallery') {
|
|
|
|
|
- villageGalleryRef.value?.refresh();
|
|
|
|
|
- } else if (name === 'refreshOfficialAccount') {
|
|
|
|
|
- officialAccountPublishRef.value?.refresh();
|
|
|
|
|
- } else if (name === 'showVillageUpgrade') {
|
|
|
|
|
- upgradeRef.value?.show();
|
|
|
|
|
- } else if (name === 'backShowVillageJoin') {
|
|
|
|
|
- handleGoJoin();
|
|
|
|
|
- } else if (name === 'backRefreshSkin') {
|
|
|
|
|
- pageThemeLoader.load();
|
|
|
|
|
- tagsLoader.load();
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ setTimeout(async () => {
|
|
|
|
|
+ if (name === 'refreshVillageGrallery') {
|
|
|
|
|
+ villageGalleryRef.value?.refresh();
|
|
|
|
|
+ } else if (name === 'refreshOfficialAccount') {
|
|
|
|
|
+ officialAccountPublishRef.value?.refresh();
|
|
|
|
|
+ } else if (name === 'showVillageUpgrade') {
|
|
|
|
|
+ upgradeRef.value?.show();
|
|
|
|
|
+ } else if (name === 'backShowVillageJoin') {
|
|
|
|
|
+ handleGoJoin();
|
|
|
|
|
+ } else if (name === 'backRefreshSkin') {
|
|
|
|
|
+ await villageStore.reloadVillageInfo();
|
|
|
|
|
+ await pageThemeLoader.load();
|
|
|
|
|
+ await tagsLoader.load();
|
|
|
|
|
+ }
|
|
|
|
|
+ }, 1500);
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|
|
|
</script>
|
|
</script>
|