提交 a555aa30 作者: 方治民
......@@ -941,7 +941,7 @@
width: calc(100% - 100rpx);
display: flex;
flex-direction: column;
justify-content: space-between;
justify-content: space-around;
padding: 15rpx 0;
.channel-imgCenter {
......@@ -950,9 +950,9 @@
}
.channel-text {
font-size: 21rpx;
font-size: 26rpx;
font-family: '思源黑体';
line-height: 18.44rpx;
line-height: 26rpx;
}
}
......
<script setup lang="ts">
import { reactive, ref } from 'vue'
import * as NewsApi from '@/api/model/news'
import dayjs from 'dayjs'
interface News {
id: number
......@@ -8,7 +9,7 @@
editor: string
source: string
publishDate: string
image: string
posterUrl: string
viewCount: number
}
interface Policy {
......@@ -116,21 +117,23 @@
<view
v-for="news in newsList"
:key="news.id"
class="w-full flex flex-row justify-around p-2 bg-#fff border-rd-lg mb-2 h-150"
class="w-full h-auto flex flex-row justify-around p-2 bg-#fff border-rd-lg mb-2"
style="min-height: 120rpx"
@click="toNewsDetail(news)"
>
<view class="flex flex-col justify-between" :class="news.image ? 'w-70%' : 'w-full'">
<view class="flex flex-col justify-between" :style="news.posterUrl ? 'width: 68%' : 'width: 100%'">
<view class="ellipsis-multiline text-28 color-#333333">{{ news.title }}</view>
<view class="flex flex-row justify-between text-25 color-#686868">
<text>{{ news.publishDate }}</text>
<text>{{ dayjs(news.publishDate).format('YYYY年MM月DD日') }}</text>
<view class="mr-1 flex-center">
<image class="mt-0.5 mr-1 w-30 h-26" src="/static/images/news/views.png" />
<view class="flex-center text-24 lh-24rpx">{{ news.viewCount }}</view>
</view>
<view v-show="!news.posterUrl" class="w-4%"></view>
</view>
</view>
<view v-show="news.image" class="w-30% h-full">
<image class="w-full h-full border-rd" :src="news.image" />
<view v-show="news.posterUrl" class="w-30% h-120">
<image class="w-full h-full border-rd" :src="news.posterUrl" />
</view>
</view>
<!-- 加载状态 -->
......
......@@ -598,23 +598,22 @@
<view class="codefun-flex-col mt-17">
<view class="codefun-flex-col codefun-justify-start section_6">
<view class="codefun-flex-row equal-division_3">
<template v-for="(model, index) in pageData.agricultureModels" :key="model.id">
<template v-for="model in pageData.agricultureModels" :key="model.id">
<view class="codefun-flex-col equal-division-item_5 group_11">
<image class="codefun-self-center image_7" :src="model.icon_url" />
<text class="codefun-self-center font_5 text_18">{{ model.name }}</text>
<text class="codefun-self-center font_7 text_21">{{ model.describes }}</text>
<view class="flex flex-row">
<view class="w-30% flex-center"><image class="w-80 h-80" :src="model.icon_url" /></view>
<view class="w-70%">
<view class="w-full font_5 text_18">{{ model.name }}</view>
<view class="w-full font_7 text_21">{{ model.describes }}</view>
</view>
</view>
<view
class="codefun-flex-col codefun-justify-start codefun-items-center codefun-self-center text-wrapper_3"
class="codefun-flex-col codefun-justify-start codefun-items-center codefun-self-center text-wrapper_3 m-0!"
@click="onAgricultureModelClick(model)"
>
<text class="font_8 text_24">查看介绍</text>
</view>
</view>
<view
class="section_7 horiz-divider"
v-if="index < pageData.agricultureModels.length - 1"
/>
</template>
</view>
</view>
......@@ -1262,8 +1261,7 @@
.text_21 {
margin-left: 8rpx;
margin-top: 16rpx;
text-align: center;
width: 160rpx;
text-align: left;
height: 60rpx;
}
......@@ -1313,7 +1311,7 @@
}
.group_11 {
padding: 8rpx 12rpx 26rpx;
padding: 8rpx 12rpx 8rpx;
}
.section_7 {
......
......@@ -723,16 +723,17 @@
v-for="news in pageData.newsItems"
:key="news.id"
class="w-full h-auto flex flex-row justify-around p-2"
style="min-height: 150rpx;"
@click="toNewsDetail(news)"
>
<view class="w-70% flex flex-col justify-between" :class="news.image ? 'w-70%' : 'w-full'">
<view class="flex flex-col justify-between" :style="news.posterUrl ? 'width: 68%' : 'width: 100%'">
<view class="ellipsis-multiline text-25 color-#333333 mb-1">{{ news.title }}</view>
<view class="text-25 color-#686868">{{
dayjs(news.publishDate).format('YYYY年MM月DD日')
}}</view>
</view>
<view v-show="news.image" class="w-30% h-150">
<image class="w-full h-full border-rd" :src="news.image" />
<view v-show="news.posterUrl" class="w-30% h-150">
<image class="w-full h-full border-rd" :src="news.posterUrl" />
</view>
</view>
</view>
......
src/static/images/qudao/hema.png

5.9 KB | W: | H:

src/static/images/qudao/hema.png

51.5 KB | W: | H:

src/static/images/qudao/hema.png
src/static/images/qudao/hema.png
src/static/images/qudao/hema.png
src/static/images/qudao/hema.png
  • 2-up
  • Swipe
  • Onion skin
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论