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.

459 lines
8.9 KiB

3 years ago
<template>
<view class="information-box">
3 years ago
<view class="search-box acea-row row-middle">
3 years ago
<image src="../../../static/images/search-icon.png" mode=""></image>
3 years ago
<input type="text" value="" placeholder="请输入相关关键词" />
3 years ago
<view class="search acea-row row-center-wrapper">搜一下</view>
</view>
<view class="vote-box">
<view class="news">
<view class="news-title-h">武汉12月底双层公交车将全面下线</view>
<view class="news-title-s">趁着有时间和你爱的人再去回味一下,那你认为有下线的必要吗</view>
</view>
<view class="vote">
3 years ago
3 years ago
</view>
</view>
3 years ago
<scroll-view class="scroll-view_N" scroll-x="true">
<view class="rotaion" v-for="(item,index) in 7" :key="index">
3 years ago
<view class="acea-row row-center">
<image src="../../../static/images/collect.png" mode=""></image>
<view class="rotaion-h">今日大事</view>
<view class="rotaion-s">每日热点资讯</view>
</view>
3 years ago
3 years ago
</view>
</scroll-view>
<!-- 最新资讯 -->
<view class="newInfo-box">
3 years ago
<image src="../../../static/images/newInfo.png" mode="" class="newInfo-title-img"></image>
3 years ago
<view class="newInfo">
<view class="modular acea-row row-between" v-for="(item,index) in articleList" :key="index"
@click="toDetail(item.id)">
<view class="acea-row title">
<view class="modular-h line2">{{item.title}}</view>
3 years ago
<view class="title-l acea-row row-between">
3 years ago
<view>{{item.author}}</view>
<view>{{item.createTime.split(' ')[0]}}</view>
3 years ago
<view class="acea-row row-middle">203
3 years ago
<image src="../../../static/images/eye.png" mode=""></image>
3 years ago
</view>
</view>
3 years ago
</view>
3 years ago
<image :src="item.imageInput" mode="aspectFill"></image>
3 years ago
</view>
</view>
</view>
<!-- 热点精选 -->
<view class="hotspot-box">
<image src="../../../static/images/user/hotspot.png" mode="" class="title-h-img"></image>
3 years ago
<scroll-view class="scroll-view_H acea-row" scroll-x="true">
<view class="slide-box" v-for="(item,index) in 3" :key="index">
3 years ago
<image src="../../../static/images/home/top-bg.png" mode=""></image>
<view class="hotspot-con">
<view class="hotspot-icon">热点</view>
<view class="hotspot-title-h">湖北省艺术设计协会加入云生态共建万亿私域资源圈获取海量资源与福利</view>
3 years ago
</view>
</view>
</scroll-view>
</view>
<!-- 值得关注 -->
<view class="follow-box">
<image src="../../../static/images/follow-title.png" mode="" class="title-h-img"></image>
3 years ago
<view class="follow-con" v-for="(item,index) in 3" :key="index">
3 years ago
<view class="follow-top acea-row row-between">
3 years ago
<view class="acea-row follow-title">
3 years ago
<view class="follow-h">2021中国酒店与商用厨具行业品牌盛会</view>
<view class="follow-title-l acea-row row-between">
<view>云资讯</view>
<view>1小时前</view>
<view class="acea-row row-middle">203
3 years ago
<image src="../../../static/images/eye.png" mode=""></image>
3 years ago
</view>
</view>
</view>
3 years ago
<image src="../../../static/images/home/top-bg.png" mode=""></image>
3 years ago
</view>
<view class="follow-bottom acea-row row-middle">
<image src="../../../static/images/collect.png" mode=""></image>
<view class="follow-title-b">
<view class="title-s">云咨詢</view>
<view class="title-con">每天发布商业/生活等相关内容...</view>
</view>
<view class="follow-btn">关注+</view>
3 years ago
</view>
</view>
</view>
</view>
</template>
<script>
3 years ago
import {
getArticle
} from "@/api/home";
export default {
data() {
return {
articleList: [],
page: 0,
size: 10,
}
},
mounted() {
this.getArticleList()
},
onReachBottom() {
this.page = this.page + 1
this.getArticleList()
},
methods: {
getArticleList() {
getArticle({
page: this.page,
size: this.size,
isHot: 0
}).then((res) => {
this.articleList = this.articleList.concat(res.data.content)
})
},
toDetail(id) {
this.$yrouter.push({
path: '/pages/life/articleDetail/index',
query: {
id: id
}
})
}
}
}
3 years ago
</script>
<style>
3 years ago
.information-box {
3 years ago
width: 100%;
height: 100vh;
position: relative;
}
3 years ago
.search-box {
3 years ago
width: 670rpx;
height: 68rpx;
border: 2rpx solid #FF5100;
border-radius: 8rpx;
margin: 52rpx auto;
font-size: 28rpx;
position: relative;
}
3 years ago
.search-box image {
3 years ago
width: 35rpx;
height: 35rpx;
margin: 0 29rpx 0 52rpx;
}
3 years ago
.search {
3 years ago
position: absolute;
right: 0;
width: 132rpx;
height: 68rpx;
background: linear-gradient(39deg, #FF5100 0%, #FFA074 100%);
border-radius: 8rpx;
color: #fff;
3 years ago
3 years ago
}
3 years ago
.vote-box {
3 years ago
width: 670rpx;
height: 358rpx;
background: #FFFFFF;
box-shadow: 0px 6rpx 12rpx rgba(0, 0, 0, 0.16);
border-radius: 16rpx;
margin: 0 auto;
position: relative;
}
3 years ago
.news {
3 years ago
width: 100%;
height: 248rpx;
background: #D2D2D2;
border-radius: 16rpx 16rpx 0 0;
color: #FFF;
position: absolute;
padding-left: 42rpx;
}
3 years ago
.news-title-h {
3 years ago
font-size: 28rpx;
position: absolute;
bottom: 54rpx;
}
3 years ago
.news-title-s {
3 years ago
font-size: 20rpx;
position: absolute;
bottom: 18rpx;
}
3 years ago
.vote {
3 years ago
width: 100%;
height: 110rpx;
position: absolute;
bottom: 0;
border: 1rpx solid #000000;
}
3 years ago
.scroll-view_N {
3 years ago
width: 100%;
3 years ago
height: 228rpx;
margin: 30rpx 0 0 30rpx;
3 years ago
white-space: nowrap;
3 years ago
}
3 years ago
.rotaion {
3 years ago
width: 168rpx;
3 years ago
padding: 32rpx 0 16rpx 0;
3 years ago
background: #FFFFFF;
3 years ago
box-shadow: 0rpx 6rpx 12rpx rgba(0, 0, 0, 0.16);
3 years ago
border-radius: 16rpx;
3 years ago
margin: 10rpx 22rpx 20rpx 10rpx;
3 years ago
display: inline-block;
3 years ago
}
3 years ago
.rotaion image {
3 years ago
width: 80rpx;
height: 80rpx;
background: #FF6D2A;
border-radius: 50%;
}
3 years ago
.rotaion-h {
3 years ago
height: 34rpx;
font-size: 24rpx;
color: #333333;
3 years ago
margin: 12rpx 0 4rpx 0;
font-weight: 600;
3 years ago
}
3 years ago
.rotaion-s {
3 years ago
height: 26rpx;
font-size: 18rpx;
color: #9D9D9D;
}
3 years ago
3 years ago
/* 最新资讯 */
3 years ago
.newInfo-box {
3 years ago
margin: 44rpx 0 0rpx 0;
3 years ago
overflow: hidden;
3 years ago
}
3 years ago
.newInfo-title-img {
3 years ago
width: 160rpx;
height: 52rpx;
margin: 0 0 18rpx 38rpx;
}
3 years ago
.newInfo {
3 years ago
width: 100%;
height: 528rpx;
border-top: 2rpx solid #EFEFEF;
}
3 years ago
.modular {
3 years ago
width: 100%;
height: 176rpx;
border-bottom: 2rpx solid #EFEFEF;
padding: 20rpx 40rpx 22rpx 40rpx;
}
3 years ago
.modular-h {
width: 400rpx;
3 years ago
height: 80rpx;
font-size: 28rpx;
color: #4A4A4A;
3 years ago
font-weight: 600;
3 years ago
}
3 years ago
.modular image {
3 years ago
width: 204rpx;
height: 134rpx;
3 years ago
border-radius: 8px;
3 years ago
}
3 years ago
.title {
width: 400rpx;
3 years ago
height: 134rpx;
}
3 years ago
.title-l {
width: 400rpx;
3 years ago
height: 34rpx;
font-size: 24rpx;
3 years ago
color: #707070;
}
3 years ago
.title-l image {
3 years ago
width: 24rpx;
height: 24rpx;
margin-left: 5rpx;
}
3 years ago
3 years ago
/* 热点精选 */
3 years ago
.hotspot-box {
3 years ago
width: 100%;
height: 456rpx;
}
3 years ago
.title-h-img {
3 years ago
width: 162rpx;
height: 62rpx;
margin: 32rpx 0 5rpx 40rpx;
}
3 years ago
.scroll-view_H {
3 years ago
width: 100%;
height: 344rpx;
white-space: nowrap;
}
3 years ago
.scroll-view_H image {
3 years ago
width: 670rpx;
height: 344rpx;
border-radius: 10rpx;
position: absolute;
}
3 years ago
.slide-box {
3 years ago
position: relative;
width: 670rpx;
height: 100%;
display: inline-block;
margin-right: 16rpx;
}
3 years ago
.hotspot-con {
3 years ago
width: 588rpx;
height: 130rpx;
bottom: 34rpx;
left: 24rpx;
position: absolute;
}
3 years ago
.hotspot-icon {
3 years ago
width: 72rpx;
height: 32rpx;
background: #FE3737;
border-radius: 12rpx 2rpx 12rpx 0;
position: absolute;
font-size: 22rpx;
color: #fff;
text-align: center;
}
3 years ago
.hotspot-title-h {
3 years ago
width: 588rpx;
height: 80rpx;
font-size: 28rpx;
color: #FFFFFF;
position: absolute;
bottom: 0;
3 years ago
white-space: pre-wrap;
3 years ago
}
3 years ago
3 years ago
/* 值得关注 */
3 years ago
.follow-box {
3 years ago
width: 100%;
height: 950rpx;
margin-bottom: 50rpx;
}
3 years ago
.follow-con {
3 years ago
width: 670rpx;
height: 250rpx;
margin: 0 auto;
background: #FFFFFF;
box-shadow: 0rpx 4rpx 10rpx rgba(0, 0, 0, 0.16);
border-radius: 16rpx;
margin-bottom: 32rpx;
}
3 years ago
.follow-top {
3 years ago
width: 100%;
height: 170rpx;
padding: 20rpx 20rpx 26rpx 20rpx;
border-bottom: 1rpx solid #DCDCDC;
}
3 years ago
.follow-top image {
3 years ago
width: 232rpx;
height: 130rpx;
border-radius: 16rpx;
}
3 years ago
.follow-title {
3 years ago
width: 370rpx;
height: 100%;
}
3 years ago
.follow-h {
3 years ago
width: 370rpx;
height: 80rpx;
font-size: 28rpx;
color: #000000;
font-weight: 600;
}
3 years ago
.follow-title-l {
3 years ago
width: 250rpx;
height: 28rpx;
font-size: 20rpx;
color: #707070;
}
3 years ago
.follow-title-l image {
3 years ago
width: 24rpx;
height: 24rpx;
margin-left: 5rpx;
}
3 years ago
.follow-bottom {
3 years ago
width: 100%;
height: 80rpx;
padding: 12rpx 20rpx 16rpx 20rpx;
}
3 years ago
.follow-bottom image {
3 years ago
width: 52rpx;
height: 52rpx;
border-radius: 50%;
margin-right: 8rpx;
}
3 years ago
.follow-title-b {}
.title-s {
3 years ago
height: 28rpx;
font-size: 20rpx;
margin-bottom: 6rpx;
font-weight: 600;
}
3 years ago
.title-con {
3 years ago
height: 22rpx;
font-size: 16rpx;
color: #707070;
}
3 years ago
.follow-btn {
3 years ago
width: 136rpx;
height: 40rpx;
background: linear-gradient(39deg, #FF5A0D 0%, #FFAC85 100%);
border-radius: 26rpx;
font-size: 28rpx;
color: #fff;
text-align: center;
position: absolute;
right: 60rpx;
3 years ago
}
3 years ago
</style>