|
|
@@ -6,7 +6,11 @@
|
|
|
<Banner :data-list="topBanners" />
|
|
|
<PullRefresh class="home-main__container" v-model="refreshing" @refresh="onRefresh">
|
|
|
<app-block>
|
|
|
- <Cell title="通知公告" value="更多" :to="{ name: 'notice-list' }" icon="volume" is-link />
|
|
|
+ <Cell value="更多" :to="{ name: 'notice-list' }" icon="volume" is-link>
|
|
|
+ <template #title>
|
|
|
+ <Badge :offset="[10, 8]" :dot="noticeStore.unreadList.length > 0">通知公告</Badge>
|
|
|
+ </template>
|
|
|
+ </Cell>
|
|
|
</app-block>
|
|
|
<app-block class="home-main__iconbar" v-if="iconbar.length">
|
|
|
<template v-for="(list, i) in iconbar" :key="i">
|
|
|
@@ -35,16 +39,17 @@
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
import { shallowRef, computed } from 'vue'
|
|
|
-import { Cell, CellGroup, PullRefresh } from 'vant'
|
|
|
+import { Cell, CellGroup, PullRefresh, Badge } from 'vant'
|
|
|
import { formatDate } from "@/filters"
|
|
|
import { queryImageConfigs } from "@/services/api/common"
|
|
|
import { queryNewTitles } from "@/services/api/news"
|
|
|
import { useMarketSection } from '@/business/market'
|
|
|
-import { useGlobalStore } from '@/stores'
|
|
|
+import { useGlobalStore, useNoticeStore } from '@/stores'
|
|
|
import Banner from '@mobile/components/base/banner/index.vue'
|
|
|
import Iconfont from '@/components/base/iconfont/index.vue'
|
|
|
|
|
|
const globalStore = useGlobalStore()
|
|
|
+const noticeStore = useNoticeStore()
|
|
|
const refreshing = shallowRef(false) // 是否处于加载中状态
|
|
|
const topBanners = shallowRef<string[]>([]); // 轮播图列表
|
|
|
const newsList = shallowRef<Model.NewTitlesRsp[]>([]) // 资讯列表
|