From e9d1d13a62e1f585a8a24bf3176d12be956a63c8 Mon Sep 17 00:00:00 2001 From: 346149741 <346149741@qq.com> Date: 星期六, 22 六月 2024 15:40:37 +0800 Subject: [PATCH] 信息公示接口对接 --- pages/message/list.vue | 120 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 116 insertions(+), 4 deletions(-) diff --git a/pages/message/list.vue b/pages/message/list.vue index 8183fd0..21ed463 100644 --- a/pages/message/list.vue +++ b/pages/message/list.vue @@ -1,22 +1,134 @@ <template> <view> - + <u-sticky bgColor="white"> + <view class="set-search"> + <u-search placeholder="璇疯緭鍏ヨ鏌ヨ鐨勪紒涓�" @search="search" @blur="search" shape="square" :showAction="false"></u-search> + </view> + <view class="border"></view> + </u-sticky> + <view class="item" v-for="(item,index) in list1"> + <img src="/static/i05.png" class="img" alt="" /> + <view class="right"> + <view class="name"> + {{item.companyName}} + </view> + <view class="box"> + <view class="l"> + <p>鎵ф硶鍗曚綅锛歿{item.executeDeptName}}</p> + <p>鎵ф硶鏃堕棿锛歿{item.executeTime}}</p> + </view> + <view class="r" @click="chakan(item.orderId)"> + 鍘绘煡鐪� + </view> + </view> + </view> + </view> </view> </template> <script> + import { showList } from '@/api/index.js' + export default { data() { return { - + list1:[], + queryParams: { + pageNum: 1, + pageSize: 10 + }, + total: 1, } }, + onShow() { + this.getList() + }, + onReachBottom() { + if(this.list1.length == this.total) { + return + } + this.queryParams.pageNum++ + this.getList() + }, methods: { - + search(e){ + this.list1 = [] + this.queryParams.pageNum =1 + this.queryParams.companyName = e + this.getList() + }, + chakan(id){ + uni.navigateTo({ + url: `/pages/message/details?id=${id}` + }) + }, + getList() { + showList({...this.queryParams}).then(val => { + // console.log(val.data) + this.total = val.data.total + this.list1 = [...this.list1,...val.data.rows] + }) + }, } } </script> <style> - + page{ + background-color: #F4F4F4; + } + </style> +<style lang="scss" scoped> + .set-search{ + margin: 0 32rpx 0; + padding-top: 26rpx; + + } + .border{ + border-bottom: 2rpx solid #F6F6F6; + margin: 20rpx 0 0; + } + .item{ + background: #fff; + border-radius: 5px; + padding: 24rpx; + box-sizing: border-box; + margin: 20rpx 32rpx; + display: flex; + .img{ + width: 56rpx; + height: 56rpx; + } + .right{ + width: 90%; + .name{ + color: #202d44; + font-size: 32rpx; + line-height: 44rpx; + margin-bottom: 24rpx; + } + .box{ + display: flex; + justify-content: space-between; + .l{ + font-size: 26rpx; + color: #7e8593; + max-width: 80%; + + } + .r{ + width: 132rpx; + height: 64rpx; + line-height: 64rpx; + border-radius: 5px; + border: 1px solid #ABD2FF; + background: #F0F8FF; + color: #1171e0; + text-align: center; + font-size: 30rpx; + } + } + } + } +</style> \ No newline at end of file -- Gitblit v1.9.1