Files
YGChatCS/src/pages/DuohuaDiscovery/catalog.vue
T

39 lines
1.0 KiB
Vue

<template>
<view class="h-screen min-w-0 overflow-hidden bg-[#f5f7fa] text-[#172033]">
<DuohuaCatalog
v-if="sectionData"
:section="sectionData"
@back="goBack"
@open-detail="openDetail"
/>
<view v-else class="flex h-full flex-col">
<TopNavBar title="" @back="goBack" />
<view class="flex min-h-0 flex-1 items-center justify-center">
<text class="text-[14px] text-[#808997]">暂无对应内容</text>
</view>
</view>
</view>
</template>
<script setup>
import { ref } from "vue";
import { onLoad } from "@dcloudio/uni-app";
import TopNavBar from "@/components/TopNavBar/index.vue";
import DuohuaCatalog from "./components/DuohuaCatalog.vue";
import { getSection } from "./data";
const sectionData = ref(null);
onLoad((options) => {
sectionData.value = getSection(options?.section || "");
});
const goBack = () => uni.navigateBack();
const openDetail = ({ collection, itemId }) => {
uni.navigateTo({
url: `/pages/DuohuaDiscovery/detail?collection=${collection}&id=${itemId}`,
});
};
</script>