惠企通
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

156 lines
3.4 KiB

<template>
<!-- <u-navbar title="办年报" placeholder="true" bg-color="#F1F3F9" :auto-back="true"></u-navbar> -->
<view class="container">
<u-search @search="search" @clickIcon="clickIcon" @clear="clear" shape="square" placeholder="请输入搜索内容"
placeholder-color="#A9D4FF" v-model="keyword" search-icon="/static/img/search.png" search-icon-size="14"
:show-action="false" height="40" margin="40rpx 24rpx 24rpx 24rpx" bg-color="#FFFFFF"></u-search>
<view class="main">
<scroll-view scroll-y="auto" class="hyonne" @scrolltolower="onloadmore">
<view class="ztone" v-for="(item, index) in ztList" :key="index" @click="godetail(item.id)">
<image style="width: 120rpx; height: 120rpx;" src="@/static/img/nianb.png" mode="scaleToFill"></image>
<view class="rightpart">
<view class="splace">
{{ item.title }}
</view>
<text class="title">{{ item.create_time }}</text>
</view>
</view>
</scroll-view>
</view>
</view>
</template>
<script setup>
import {
ref
} from 'vue'
import {
ReportDetail,
annualReport
} from '@/api/shop'
const baseurl = ref(import.meta.env.VITE_APP_BASE_URL + '/')
// 响应式数据
const keyword = ref('')
const page = ref(1)
const pagesize = ref(6)
const search = async (val) => {
page.value = 1
pagesize.value = 6
await getfinanceList(keyword.value, page.value, pagesize.value)
}
const clickIcon = async () => {
page.value = 1
pagesize.value = 6
await getfinanceList(keyword.value, page.value, pagesize.value)
}
const clear = async () => {
page.value = 1
pagesize.value = 6
await getfinanceList(keyword.value, page.value, pagesize.value)
}
const ztList = ref([])
const godetail = (id) => {
uni.navigateTo({
url: '/pages/index/bnbdetail?id=' + id
})
}
const getfinanceList = async (name, page, limit) => {
let params = {
title: name,
page: page,
limit: limit
}
await annualReport(params).then((res) => {
ztList.value = res.data.data
})
}
const onloadmore = async () => {
page.value++
let params = {
title: keyword.value,
page: page.value,
limit: pagesize.value
}
await financeList(params).then((res) => {
ztList.value = [...ztList.value, ...res.data.data]
})
}
onShow(async () => {
await getfinanceList('', 1, 6)
})
</script>
<style scoped lang="scss">
.container {
background: linear-gradient(0deg, #f1f3f9 72%, rgba(129, 179, 222, 0.5) 88%);
height: 100vh;
width: 100%;
overflow-y: hidden;
.hyonne {
max-height: calc(100vh - 350rpx);
overflow-y: auto;
}
.main {
margin-top: 10rpx;
width: 100%;
height: 100%;
padding: 0 24rpx;
box-sizing: border-box;
overflow-y: hidden;
.ztone {
display: flex;
align-items: center;
width: 100%;
margin-top: 20rpx;
padding: 20rpx;
border-radius: 8rpx;
background: #ffffff;
box-sizing: border-box;
.rightpart {
width: 100%;
margin-left: 40rpx;
flex: 3;
display: grid;
align-content: space-between;
.splace {
font-family: Source Han Sans;
font-size: 28rpx;
font-weight: 500;
color: #0C092A;
}
.title {
margin-top: 20rpx;
font-family: Source Han Sans;
font-size: 20rpx;
font-weight: 300;
color: #666666;
}
}
}
}
}
.hdzq {
width: 212rpx;
height: 86rpx;
position: fixed;
right: 0;
top: 70%;
margin-right: -14rpx;
}
</style>