|
@@ -126,24 +126,38 @@ async function queryNoticeAndLearnCount() {
|
|
|
}
|
|
|
queryNoticeAndLearnCount();
|
|
|
/**
|
|
|
- * 获取通知公告角标
|
|
|
+ * 获取每日速递最新数据
|
|
|
*/
|
|
|
+const dailyNotifyList = ref([])
|
|
|
async function queryNotifyByNewThree() {
|
|
|
const urlApi = `/admin-api/adm/noticeAndLearn/query/page`;
|
|
|
const sendData = {
|
|
|
"pageNo": 1,
|
|
|
- "pageSize": 10,
|
|
|
- "type": 1,
|
|
|
+ "pageSize": 3,
|
|
|
+ "type": 3,
|
|
|
"nickname": "",
|
|
|
- "createTime": null,
|
|
|
"title": "",
|
|
|
"readType": 2
|
|
|
}
|
|
|
const result = await request.post(urlApi, sendData);
|
|
|
- console.log("result----------------------")
|
|
|
- console.log(result)
|
|
|
+ if (result.data) {
|
|
|
+ dailyNotifyList.value = result.data.list;
|
|
|
+ }
|
|
|
}
|
|
|
queryNotifyByNewThree()
|
|
|
+const clickHandler = (item: any) => {
|
|
|
+ router.push({
|
|
|
+ path: '/dailyNotifyDetail',
|
|
|
+ query: {
|
|
|
+ id: item['id']
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
+const onNotifyMoreHandle = () => {
|
|
|
+ router.push({
|
|
|
+ path: '/dailyNotify'
|
|
|
+ });
|
|
|
+}
|
|
|
const toPageHandle = (path: string) => {
|
|
|
router.push({
|
|
|
path,
|
|
@@ -197,16 +211,16 @@ const getAssetURL = (image: string) => {
|
|
|
<div class="box">
|
|
|
<div class="top">
|
|
|
<span class="title_img"><img src="../../assets/images/notify_title.png" /></span>
|
|
|
- <span class="more">更多<span class="arrow">></span></span>
|
|
|
+ <span class="more" @click="onNotifyMoreHandle">更多<span class="arrow">></span></span>
|
|
|
</div>
|
|
|
<div class="content">
|
|
|
<van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
|
|
|
- <van-swipe-item>
|
|
|
- <div class="swipe_content">
|
|
|
- <p class="title">杭州自然资源规划局将在5月20日开展信息化</p>
|
|
|
- <p class="info">
|
|
|
- <span>空间信息研究院—陈旭明</span>
|
|
|
- <span>5月13日 10:15</span>
|
|
|
+ <van-swipe-item v-for="(item, index) in dailyNotifyList" :key="index">
|
|
|
+ <div class="swipe_content" @click="clickHandler(item,)">
|
|
|
+ <p class="title">{{item['content']}}</p>
|
|
|
+ <p class="tip">
|
|
|
+ <span>{{ item['nickname'] }}</span>
|
|
|
+ <span>{{item['createTime']}}</span>
|
|
|
</p>
|
|
|
</div>
|
|
|
</van-swipe-item>
|