From 3c5f26adee53b2b44d158400398a8f9a3bbff0a0 Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Fri, 10 Nov 2023 17:22:15 +0800
Subject: [PATCH] 通知公告

---
 pages/home/index.vue |   57 +++++++++++++++++++++++++++++++++++++++------------------
 1 files changed, 39 insertions(+), 18 deletions(-)

diff --git a/pages/home/index.vue b/pages/home/index.vue
index 2e7b009..107ebc3 100644
--- a/pages/home/index.vue
+++ b/pages/home/index.vue
@@ -136,24 +136,28 @@
 					</view>
 					<u-icon name="arrow-right"></u-icon>
 				</view>
-				<view class="notic-list" @click="navigatorPage('/subPackage/notice/detail')">
-					<view class="f-28 mb-30">
-						新业态新就业群体现状调查问卷
-					</view>
-					<view class="flex a-i-c j-c-s-b">
-						<view class="f-28 flex a-i-c">
-							<view class="flex a-i-c mr-30">
-								<u-icon name="thumb-up-fill" size="24" color="#CECECE"></u-icon>
-								<text class="f-24 c-99 ml-10">121</text>
-							</view>
-							<view class="flex a-i-c">
-								<u-icon name="eye-fill" size="24" color="#CECECE"></u-icon>
-								<text class="f-24 c-99 ml-10">121</text>
-							</view>
+				
+				<view v-for="(item,index) in notice" :key="index">
+					<view class="notic-list" @click="navigatorPage('/subPackage/notice/detail')">
+						<view class="f-28 mb-30">
+							{{item.title}}
 						</view>
-						<text class="f-24 c-99">2023-08-21</text>
+						<view class="flex a-i-c j-c-s-b">
+							<view class="f-28 flex a-i-c">
+								<view class="flex a-i-c mr-30">
+									<u-icon name="thumb-up-fill" size="24" color="#CECECE"></u-icon>
+									<text class="f-24 c-99 ml-10">{{item.countNumber}}</text>
+								</view>
+								<view class="flex a-i-c">
+									<u-icon name="eye-fill" size="24" color="#CECECE"></u-icon>
+									<text class="f-24 c-99 ml-10">{{item.viewNumber}}</text>
+								</view>
+							</view>
+							<text class="f-24 c-99">{{item.createTime}}</text>
+						</view>
 					</view>
 				</view>
+				
 			</view>
 			<u-picker :title="roleTypeName" :closeOnClickOverlay="true" @close="selectBoxShow = false"
 				:show="selectBoxShow" keyName="name" ref="uPicker" :columns="siteColumns" @confirm="confirmSite"
@@ -168,6 +172,10 @@
 		getFuncList,
 		getHouseList
 	} from "@/api/doorplateAddress/doorplateAddress";
+
+	import {
+		getPage
+	} from "@/api/notice/notice";
 	export default {
 		data() {
 			return {
@@ -309,7 +317,8 @@
 					useSlot: true
 				}],
 				menuList: [],
-				curHouseCode: ''
+				curHouseCode: '',
+				notice: [],
 
 			}
 		},
@@ -358,7 +367,19 @@
 				console.log(uni.getStorageSync("activeRole"))
 				this.getMenuList()
 				this.getSiteList()
+				this.getNoticeList()
 				// uni.hideTabBar()
+			},
+
+			async getNoticeList() {
+				const param = {
+					size: 10,
+					current: 1
+				}
+				const res = await getPage(param)
+				this.notice = res.data.records
+				console.table(JSON.stringify(res.data.records))
+
 			},
 
 			//获取场所列表
@@ -433,7 +454,7 @@
 					// picker为选择器this实例,变化第二列对应的选项
 					picker.setColumnValues(1, this.columnData[index])
 					// this.siteColumns[1] = this.columnData[index].children
-					this.$set(this.siteColumns,1,this.columnData[index].children)
+					this.$set(this.siteColumns, 1, this.columnData[index].children)
 				};
 			},
 			// 回调参数为包含columnIndex、value、values
@@ -733,4 +754,4 @@
 			border-radius: 16rpx 16rpx 16rpx 16rpx;
 		}
 	}
-</style>
\ No newline at end of file
+</style>

--
Gitblit v1.9.3