对接公区收益

This commit is contained in:
zhouyanli
2026-07-22 17:38:59 +08:00
parent e68579a5d3
commit 6cb10fee08
7 changed files with 146 additions and 99 deletions

View File

@@ -1,6 +1,6 @@
<template>
<view class="page">
<view class="status_bar"></view>
<view class="status_bar" :style="{ height: statusBarHeight + 'px' }"></view>
<!-- 固定导航栏 -->
<uni-nav-bar
left-icon="left"
@@ -30,11 +30,11 @@
:key="revenue.noticeId"
class="item">
<view class="title-box">
<view class="title">{{ revenue.title }}</view>
<view class="title">{{ revenue.noticeTitle }}</view>
<view class="dot" v-if="revenue.readStatus === '0'"></view>
</view>
<view class="info">{{ revenue.author }} · {{ revenue.publishTime }}</view>
<view class="content" v-html="revenue.content"></view>
<view class="info">{{ revenue.publishTime }}</view>
<view class="content" v-html="revenue.noticeContent"></view>
<view class="detail" @click="goToDetail(revenue)">
<text style="color:#2F77FD;font-size: 24rpx;">详情</text>
<uni-icons type="right" size="13" color="#007AFF"/>
@@ -56,12 +56,9 @@
<script setup>
import { ref } from 'vue'
import { onLoad ,onShow,onUnload} from '@dcloudio/uni-app'
// import { getRevenueList } from '../api/api.js'
import { getRevenueList } from '../api/apiSub.js'
const revenueList = ref([
{title:'公区收益告知书',author:'张三',publishTime:'2026-7-15',content:'费用明细'},
{title:'公区收益告知书',author:'张三',publishTime:'2026-7-15'},
])
const revenueList = ref([])
const refreshing = ref(false)
const loadingMore = ref(false)
const noMoreData = ref(false)
@@ -69,10 +66,11 @@ const loading = ref(false)
const pageNum = ref(1)
const pageSize = 10
const isFirstShow = ref(true) // 详情返回列表刷新状态
const statusBarHeight = ref(uni.getSystemInfoSync().statusBarHeight || 0)
const goToDetail = (notice) => {
uni.navigateTo({
url: `/pageSubPack/inspection-revenue/public-revenue-details`
url: `/pageSubPack/inspection-revenue/public-revenue-details?id=${notice.noticeId}`
})
}
@@ -98,13 +96,13 @@ const loadRevenue = async (isRefresh = false) => {
}
}
// 更新单条已读状态
const updateReadStatus = ({ revenueId, readStatus }) => {
const item = revenueList.value.find(n => String(n.revenueId) === revenueId)
const updateReadStatus = ({ noticeId, readStatus }) => {
const item = revenueList.value.find(n => String(n.noticeId) === String(noticeId))
if (item) {
item.readStatus = readStatus
}
}
onShow(() =>{
if(isFirstShow.value) return
// loadRevenue(true)
@@ -150,8 +148,8 @@ page {
flex-direction: column;
}
.status_bar {
height: 46px;
width: 100%;
flex-shrink: 0;
}
.scroll-box {
flex: 1;
@@ -231,7 +229,7 @@ page {
padding: 100rpx 0;
color: #ccc;
}
.empty-text {
font-size: 28rpx;
color: #999;