|
|
@@ -3,13 +3,7 @@
|
|
|
<template #header>
|
|
|
<app-navbar title="多元世纪" :show-back-button="false" />
|
|
|
</template>
|
|
|
- <div class="home-main__banner">
|
|
|
- <Swipe :autoplay="5000" indicator-color="white" lazy-render>
|
|
|
- <SwipeItem v-for="(item, index) in topBanners" :key="index">
|
|
|
- <img :src="getFileUrl(item.imagepath)" />
|
|
|
- </SwipeItem>
|
|
|
- </Swipe>
|
|
|
- </div>
|
|
|
+ <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 />
|
|
|
@@ -64,18 +58,19 @@
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
import { shallowRef } from "vue";
|
|
|
-import { Cell, CellGroup, Swipe, SwipeItem, PullRefresh } from "vant";
|
|
|
-import { getFileUrl, formatDate } from "@/filters";
|
|
|
+import { Cell, CellGroup, PullRefresh } from "vant";
|
|
|
+import { formatDate } from "@/filters";
|
|
|
import { useNavigation } from "@/hooks/navigation";
|
|
|
import { queryImageConfigs } from "@/services/api/common";
|
|
|
import { queryNewTitles } from "@/services/api/news";
|
|
|
import { useLoginStore } from '@/stores'
|
|
|
+import Banner from '@mobile/components/base/banner/index.vue'
|
|
|
import Iconfont from '@mobile/components/base/iconfont/index.vue'
|
|
|
|
|
|
const loginStore = useLoginStore();
|
|
|
const { routerTo, setGlobalUrlParams } = useNavigation();
|
|
|
const refreshing = shallowRef(false); // 是否处于加载中状态
|
|
|
-const topBanners = shallowRef<Model.ImageConfigsRsp[]>([]); // 轮播图列表
|
|
|
+const topBanners = shallowRef<string[]>([]); // 轮播图列表
|
|
|
const newsList = shallowRef<Model.NewTitlesRsp[]>([]); // 资讯列表
|
|
|
|
|
|
// 跳转导航页面
|
|
|
@@ -106,7 +101,7 @@ const onRefresh = () => {
|
|
|
imageType: 1,
|
|
|
}
|
|
|
}).then((res) => {
|
|
|
- topBanners.value = res.data
|
|
|
+ topBanners.value = res.data.map((e) => e.imagepath)
|
|
|
})
|
|
|
}
|
|
|
// 市场资讯
|