源文件
This commit is contained in:
60
jeepay-ui-uapp-agent/pageWork/setUp/latestPost.vue
Normal file
60
jeepay-ui-uapp-agent/pageWork/setUp/latestPost.vue
Normal file
@@ -0,0 +1,60 @@
|
||||
<template>
|
||||
<view class="post-list" v-for="item in useDataResult.dataList" @tap="toDetail(item.articleId)">
|
||||
<text>{{ item.title }}</text>
|
||||
<text>{{ item.createdAt ? item.createdAt.slice(0, 10) : '' }}</text>
|
||||
</view>
|
||||
<jeepayListNull :list="useDataResult.dataList"></jeepayListNull>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, watch } from 'vue'
|
||||
import { onBackPress } from '@dcloudio/uni-app'
|
||||
import useGetList from '@/hooks/useGetList.js'
|
||||
import { $getNoticeList } from '@/http/apiManager.js'
|
||||
import jeepayListNull from '@/components/jeepayListNull/jeepayListNull.vue'
|
||||
|
||||
const switchStatePopup = ref()
|
||||
const { useDataResult, getList } = useGetList($getNoticeList, undefined, { articleType: 1 })
|
||||
|
||||
let vdata = reactive({})
|
||||
|
||||
// 跳转
|
||||
const toDetail = (articleId) => {
|
||||
uni.navigateTo({
|
||||
url: './postDetail?id=' + articleId
|
||||
})
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
page {
|
||||
background: #f5f6fc;
|
||||
}
|
||||
</style>
|
||||
<style scoped lang="scss">
|
||||
.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