first
This commit is contained in:
64
pages/noticePage/noticeList.vue
Normal file
64
pages/noticePage/noticeList.vue
Normal file
@@ -0,0 +1,64 @@
|
||||
<template>
|
||||
<JeepayTableList :reqTableDataFunc="reqTableDataFunc" :searchData="vdata.searchData" :pageSize="10">
|
||||
<template #tableBody="{ record }">
|
||||
<view class="post-list" @tap="toDetail(record.articleId)">
|
||||
<text>{{ record.title }}</text>
|
||||
<text>{{ record.createdAt ? record.createdAt.slice(0, 10) : '' }}</text>
|
||||
</view>
|
||||
</template>
|
||||
</JeepayTableList>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, watch } from 'vue'
|
||||
import { reqLoad, API_URL_SYS_ARTICLES } from "@/http/apiManager.js"
|
||||
import go from '@/commons/utils/go.js'
|
||||
import { onReachBottom } from '@dcloudio/uni-app'
|
||||
onReachBottom(() => {} )
|
||||
|
||||
const vdata = reactive({
|
||||
searchData: { articleType : 1 } // 搜索条件
|
||||
})
|
||||
|
||||
// 请求
|
||||
function reqTableDataFunc (params) {
|
||||
return reqLoad.list(API_URL_SYS_ARTICLES, params)
|
||||
}
|
||||
|
||||
// 跳转
|
||||
function toDetail (articleId) {
|
||||
go.to("PAGES_NOTICE_DETAIL", {id: articleId})
|
||||
}
|
||||
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
page {
|
||||
background: #f5f6fc;
|
||||
}
|
||||
.post-list {
|
||||
box-sizing: border-box;
|
||||
width: 750rpx;
|
||||
height: 150rpx;
|
||||
background: #fff;
|
||||
margin-top: 2rpx;
|
||||
padding: 30rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
text {
|
||||
&:nth-child(1) {
|
||||
font-weight: bold;
|
||||
font-size: 30rpx;
|
||||
color: #000;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis; //溢出用省略号显示
|
||||
white-space: nowrap;
|
||||
}
|
||||
&:nth-child(2) {
|
||||
font-weight: 500;
|
||||
font-size: 23rpx;
|
||||
color: #a6a6a6;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user