|
@@ -10,26 +10,17 @@
|
|
|
<img src="@/assets/subtitle_1.png" />
|
|
|
</span>
|
|
|
</template>
|
|
|
- <n-tab-pane
|
|
|
- name="exhibitions"
|
|
|
- tab="展览"
|
|
|
- v-infinite-scroll="onLoadMore"
|
|
|
- >
|
|
|
+ <n-tab-pane name="exhibitions" tab="展览" v-infinite-scroll="onLoadMore">
|
|
|
<n-grid :x-gap="XGap" :y-gap="YGap" :cols="3" class="tab-grid">
|
|
|
<template v-for="item in exhibitions">
|
|
|
<n-gi>
|
|
|
- <info-box
|
|
|
- :id="item.id"
|
|
|
- :title="item.name"
|
|
|
- :cover="domain + item.thumb"
|
|
|
- :time="item.publishDate"
|
|
|
- />
|
|
|
+ <info-box :id="item.id" :title="item.name" :cover="domain + item.thumb" :time="item.publishDate" />
|
|
|
</n-gi>
|
|
|
</template>
|
|
|
</n-grid>
|
|
|
<empty :show="exhibitions.length === 0" :height="500" />
|
|
|
</n-tab-pane>
|
|
|
- <n-tab-pane name="activates" tab="活动">
|
|
|
+ <!-- <n-tab-pane name="activates" tab="活动">
|
|
|
<n-grid :x-gap="XGap" :y-gap="YGap" :cols="3" class="tab-grid">
|
|
|
<template v-for="item in activates">
|
|
|
<n-gi>
|
|
@@ -43,32 +34,23 @@
|
|
|
</template>
|
|
|
</n-grid>
|
|
|
<empty :show="activates.length === 0" :height="500" />
|
|
|
- </n-tab-pane>
|
|
|
+ </n-tab-pane> -->
|
|
|
<n-tab-pane name="news" tab="新闻">
|
|
|
- <n-grid :x-gap="XGap" :y-gap="YGap" :cols="3" class="tab-grid">
|
|
|
+ <div>123</div>
|
|
|
+ <!-- <n-grid :x-gap="XGap" :y-gap="YGap" :cols="3" class="tab-grid">
|
|
|
<template v-for="item in news">
|
|
|
<n-gi>
|
|
|
- <info-box
|
|
|
- :id="item.id"
|
|
|
- :title="item.name"
|
|
|
- :cover="domain + item.thumb"
|
|
|
- :time="item.publishDate"
|
|
|
- />
|
|
|
+ <info-box :id="item.id" :title="item.name" :cover="domain + item.thumb" :time="item.publishDate" />
|
|
|
</n-gi>
|
|
|
</template>
|
|
|
- </n-grid>
|
|
|
+ </n-grid> -->
|
|
|
<empty :show="news.length === 0" :height="500" />
|
|
|
</n-tab-pane>
|
|
|
<n-tab-pane name="notices" tab="通知">
|
|
|
<n-grid :y-gap="YGap" :cols="1" class="tab-grid">
|
|
|
<template v-for="item in notices">
|
|
|
<n-gi>
|
|
|
- <notice-box
|
|
|
- :id="item.id"
|
|
|
- :title="item.name"
|
|
|
- :content="item.richText"
|
|
|
- :time="item.publishDate"
|
|
|
- />
|
|
|
+ <notice-box :id="item.id" :title="item.name" :content="item.richText" :time="item.publishDate" />
|
|
|
</n-gi>
|
|
|
</template>
|
|
|
</n-grid>
|
|
@@ -82,48 +64,56 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import { onMounted, watch, computed } from "vue";
|
|
|
-import { vInfiniteScroll } from "@vueuse/components";
|
|
|
-import infoBox from "../components/infoBox";
|
|
|
-import subHeader from "../components/subHeader";
|
|
|
-import sideMenu from "../components/sideMenu";
|
|
|
-import noticeBox from "../components/noticeBox";
|
|
|
-import empty from "../components/empty.vue";
|
|
|
-import { useInfoStore } from "../store/info";
|
|
|
-import { useLoadingBar } from "naive-ui";
|
|
|
+import { onMounted, watch, computed } from "vue"
|
|
|
+import { vInfiniteScroll } from "@vueuse/components"
|
|
|
+import infoBox from "../components/infoBox"
|
|
|
+import subHeader from "../components/subHeader"
|
|
|
+import sideMenu from "../components/sideMenu"
|
|
|
+import noticeBox from "../components/noticeBox"
|
|
|
+import empty from "../components/empty.vue"
|
|
|
+import { useInfoStore } from "../store/info"
|
|
|
+import { useLoadingBar } from "naive-ui"
|
|
|
|
|
|
-const infoStore = useInfoStore();
|
|
|
-const loadingBar = useLoadingBar();
|
|
|
-const domain = ref(import.meta.env.VITE_DOMAIN_URL);
|
|
|
-const currentTab = ref("exhibitions");
|
|
|
-const news = computed(() => infoStore.news);
|
|
|
-const notices = computed(() => infoStore.notices);
|
|
|
-const activates = computed(() => infoStore.activates);
|
|
|
-const exhibitions = computed(() => infoStore.exhibitions);
|
|
|
+const infoStore = useInfoStore()
|
|
|
+const loadingBar = useLoadingBar()
|
|
|
+const domain = ref(import.meta.env.VITE_DOMAIN_URL)
|
|
|
+const currentTab = ref("exhibitions")
|
|
|
+const news = computed(() => infoStore.news)
|
|
|
+const notices = computed(() => infoStore.notices)
|
|
|
+const activates = computed(() => infoStore.activates)
|
|
|
+const exhibitions = computed(() => infoStore.exhibitions)
|
|
|
const handleTabFetch = async (type) => {
|
|
|
- loadingBar.start();
|
|
|
- await infoStore.switchTab(type);
|
|
|
- loadingBar.finish();
|
|
|
-};
|
|
|
+ loadingBar.start()
|
|
|
+ await infoStore.switchTab(type)
|
|
|
+ loadingBar.finish()
|
|
|
+}
|
|
|
|
|
|
watch(
|
|
|
currentTab,
|
|
|
(val) => {
|
|
|
- console.log("currentTab", val);
|
|
|
- handleTabFetch(val);
|
|
|
+ if (val === "news") {
|
|
|
+ window.open("http://www.qsqyhsjng.com/szjq/jqxw/")
|
|
|
+ currentTab.value = "exhibitions"
|
|
|
+ }
|
|
|
+ if (val === "notices") {
|
|
|
+ window.open("http://www.qsqyhsjng.com/jqgk/tzgg/")
|
|
|
+ currentTab.value = "exhibitions"
|
|
|
+ }
|
|
|
+ console.log("currentTab", val)
|
|
|
+ handleTabFetch(val)
|
|
|
},
|
|
|
{
|
|
|
immediate: true,
|
|
|
}
|
|
|
-);
|
|
|
-const XGap = ref(50);
|
|
|
-const YGap = ref(50);
|
|
|
+)
|
|
|
+const XGap = ref(50)
|
|
|
+const YGap = ref(50)
|
|
|
|
|
|
const onLoadMore = () => {
|
|
|
if (infoStore.isLoad) {
|
|
|
- infoStore.loadMore(currentTab.value);
|
|
|
+ infoStore.loadMore(currentTab.value)
|
|
|
}
|
|
|
-};
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped></style>
|