dengjie commit: 行业报告及其详情页初步完成
This commit is contained in:
118
pages/news/news.vue
Normal file
118
pages/news/news.vue
Normal file
@@ -0,0 +1,118 @@
|
||||
<template>
|
||||
<view style="margin-top: 20rpx; height: 1176rpx;background: #FFFFFF;">
|
||||
<view class="xw_content" v-for="(item,index) in newsList" :key="index" @click="clickNews(index)">
|
||||
<u--image :src="item.src" width="192rpx" height="122rpx" :lazy-load="true">
|
||||
</u--image>
|
||||
<view class="xw_right">
|
||||
<view class="xw_title">
|
||||
{{item.title}}
|
||||
</view>
|
||||
<view style="display: flex;">
|
||||
<text class="xw_time">
|
||||
{{item.time}}
|
||||
</text>
|
||||
<text class="xw_time xw_place">
|
||||
{{item.place}}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="newsShow" class="no-data">已经到底啦!</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
newsShow: true,
|
||||
newsList: [{
|
||||
src: '/static/report/zhanwei_xf.png',
|
||||
title: '2022近50款食品饮料新品,创新的方向都在这里',
|
||||
time: '2022-12-03 09:59',
|
||||
place: '第一食品资讯官方账号'
|
||||
},
|
||||
{
|
||||
src: '/static/report/zhanwei_zh.png',
|
||||
title: '食品企业如何开发新产品?创新思维又发挥着怎样的效应呢?',
|
||||
time: '2022-10-18 14:43',
|
||||
place: '腾讯新闻 '
|
||||
},
|
||||
{
|
||||
src: '/static/report/zhanwei_zh.png',
|
||||
title: '食品企业如何开发新产品?创新思维又发挥着怎样的效应呢?',
|
||||
time: '2022-10-18 14:43',
|
||||
place: '腾讯新闻'
|
||||
},
|
||||
],
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
// 跳转到新闻详情页
|
||||
clickNews(index) {
|
||||
if (index == 0) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/detail/xwDetail/xwDetail'
|
||||
})
|
||||
}
|
||||
},
|
||||
// this.newsShow = this.list.length === 0 ? true : false
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.no-data {
|
||||
text-align: center;
|
||||
margin-top: 29rpx;
|
||||
font-size: 20rpx;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #BBBBBB;
|
||||
line-height: 28rpx;
|
||||
}
|
||||
|
||||
.xw_content {
|
||||
background: #FFFFFF;
|
||||
border: 1rpx solid #EEEEEE;
|
||||
display: flex;
|
||||
padding: 29rpx 19rpx;
|
||||
|
||||
.xw_right {
|
||||
padding-left: 19rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.xw_title {
|
||||
font-size: 30rpx;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #3E3E3E;
|
||||
line-height: 42rpx;
|
||||
-webkit-line-clamp: 2;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.xw_time {
|
||||
font-size: 24rpx;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #969696;
|
||||
line-height: 33rpx;
|
||||
padding-top: 3rpx;
|
||||
}
|
||||
|
||||
.xw_place {
|
||||
padding-left: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user