|
|
|
<template>
|
|
|
|
<view class="information-box">
|
|
|
|
<view class="search-box acea-row row-middle">
|
|
|
|
<image src="../../static/images/search-icon.png" mode=""></image>
|
|
|
|
<input type="text" value="" placeholder="请输入相关关键词" />
|
|
|
|
<view class="search acea-row row-center-wrapper">搜一下</view>
|
|
|
|
</view>
|
|
|
|
<swiper class="vote-box">
|
|
|
|
<swiper-item v-for="(item,index) in articleList" :key="index">
|
|
|
|
<image :src="item.imageInput" mode="aspectFill" class="vote-img"></image>
|
|
|
|
<view class="news">
|
|
|
|
<view class="news-title-h line2">{{item.title}}</view>
|
|
|
|
<view class="news-title-s line1">{{item.title}}</view>
|
|
|
|
</view>
|
|
|
|
</swiper-item>
|
|
|
|
|
|
|
|
</swiper>
|
|
|
|
<scroll-view class="scroll-view_N" scroll-x="true">
|
|
|
|
<view class="rotaion-box" @click="toTodayEvent">
|
|
|
|
<view class="acea-row rotaion row-center">
|
|
|
|
<image src="../../static/images/details1.png" mode="aspectFill"></image>
|
|
|
|
<view class="rotaion-h">今日大事</view>
|
|
|
|
<view class="rotaion-s">每日热点资讯</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="rotaion-box" @click="toBusinessInfo">
|
|
|
|
<view class="acea-row rotaion row-center">
|
|
|
|
<image src="../../static/images/details2.png" mode="aspectFill"></image>
|
|
|
|
<view class="rotaion-h">商业资讯</view>
|
|
|
|
<view class="rotaion-s">商业资讯抢先知</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="rotaion-box" @click="toGovernmentPolicy">
|
|
|
|
<view class="acea-row rotaion row-center">
|
|
|
|
<image src="../../static/images/details3.png" mode="aspectFill"></image>
|
|
|
|
<view class="rotaion-h">政府政策</view>
|
|
|
|
<view class="rotaion-s">了解政府政策</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="rotaion-box" @click="toLifeInfo">
|
|
|
|
<view class="acea-row rotaion row-center">
|
|
|
|
<image src="../../static/images/details4.png" mode="aspectFill"></image>
|
|
|
|
<view class="rotaion-h">生活资讯</view>
|
|
|
|
<view class="rotaion-s">有趣、好玩</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</scroll-view>
|
|
|
|
<!-- 最新资讯 -->
|
|
|
|
<view class="newInfo-box">
|
|
|
|
<image src="../../static/images/newInfo.png" mode="" class="newInfo-title-img"></image>
|
|
|
|
<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>
|
|
|
|
<view class="title-l acea-row row-between">
|
|
|
|
<view>{{item.author}}</view>
|
|
|
|
<view>{{item.createTime.split(' ')[0]}}</view>
|
|
|
|
<view class="acea-row row-middle">203
|
|
|
|
<image src="../../static/images/eye.png" mode="aspectFill"></image>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<image :src="item.imageInput" mode="aspectFill"></image>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<!-- 热点精选 -->
|
|
|
|
<view class="hotspot-box">
|
|
|
|
<image src="../../static/images/user/hotspot.png" mode="" class="title-h-img"></image>
|
|
|
|
<scroll-view class="scroll-view_H acea-row" scroll-x="true">
|
|
|
|
<view class="slide-box" v-for="(item,index) in articleList" :key="index">
|
|
|
|
<image :src="item.imageInput" mode="aspectFill"></image>
|
|
|
|
<view class="hotspot-con">
|
|
|
|
<view class="hotspot-icon">热点</view>
|
|
|
|
<view class="hotspot-title-h line2">{{item.title}}</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</scroll-view>
|
|
|
|
</view>
|
|
|
|
<!-- 值得关注 -->
|
|
|
|
<view class="follow-box">
|
|
|
|
<image src="../../static/images/follow-title.png" mode="" class="title-h-img"></image>
|
|
|
|
<view class="follow-con" v-for="(item,index) in articleList" :key="index">
|
|
|
|
<view class="follow-top acea-row row-between">
|
|
|
|
<view class="acea-row follow-title">
|
|
|
|
<view class="follow-h line2">{{item.title}}</view>
|
|
|
|
<view class="follow-title-l acea-row row-between">
|
|
|
|
<view>{{item.author}}</view>
|
|
|
|
<view>{{item.createTime.split(' ')[0]}}</view>
|
|
|
|
<view class="acea-row row-middle">203
|
|
|
|
<image src="../../static/images/eye.png" mode="aspectFill"></image>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<image :src="item.imageInput" mode="aspectFill"></image>
|
|
|
|
</view>
|
|
|
|
<view class="follow-bottom acea-row row-middle">
|
|
|
|
<image :src="item.imageInput" mode=""></image>
|
|
|
|
<view class="follow-title-b acea-row row-column-between">
|
|
|
|
<view class="title-s line1">{{item.author}}</view>
|
|
|
|
<view class="title-con line1">{{item.title}}</view>
|
|
|
|
</view>
|
|
|
|
<view class="follow-btn">关注+</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
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
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
// 今日大事
|
|
|
|
toTodayEvent() {
|
|
|
|
uni.navigateTo({
|
|
|
|
url: '/pages/life/articleList/index?active=1'
|
|
|
|
});
|
|
|
|
},
|
|
|
|
// 商业资讯
|
|
|
|
toBusinessInfo() {
|
|
|
|
uni.navigateTo({
|
|
|
|
url: '/pages/life/articleList/index?active=2'
|
|
|
|
});
|
|
|
|
},
|
|
|
|
// 政府政策
|
|
|
|
toGovernmentPolicy() {
|
|
|
|
uni.navigateTo({
|
|
|
|
url: '/pages/life/articleList/index?active=3'
|
|
|
|
});
|
|
|
|
},
|
|
|
|
// 生活资讯
|
|
|
|
toLifeInfo() {
|
|
|
|
uni.navigateTo({
|
|
|
|
url: '/pages/life/articleList/index?active=4'
|
|
|
|
});
|
|
|
|
},
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="less">
|
|
|
|
.information-box {
|
|
|
|
width: 100%;
|
|
|
|
height: auto;
|
|
|
|
margin-bottom: 50rpx;
|
|
|
|
position: relative;
|
|
|
|
}
|
|
|
|
|
|
|
|
.search-box {
|
|
|
|
width: 670rpx;
|
|
|
|
height: 68rpx;
|
|
|
|
border: 2rpx solid #FF5100;
|
|
|
|
border-radius: 8rpx;
|
|
|
|
margin: 52rpx auto;
|
|
|
|
font-size: 28rpx;
|
|
|
|
position: relative;
|
|
|
|
}
|
|
|
|
|
|
|
|
.search-box image {
|
|
|
|
width: 35rpx;
|
|
|
|
height: 35rpx;
|
|
|
|
margin: 0 29rpx 0 52rpx;
|
|
|
|
}
|
|
|
|
|
|
|
|
.search {
|
|
|
|
position: absolute;
|
|
|
|
right: -2rpx;
|
|
|
|
width: 132rpx;
|
|
|
|
height: 68rpx;
|
|
|
|
background: linear-gradient(39deg, #FF5100 0%, #FFA074 100%);
|
|
|
|
border-radius: 8rpx;
|
|
|
|
color: #fff;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.vote-box {
|
|
|
|
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;
|
|
|
|
overflow: hidden;
|
|
|
|
}
|
|
|
|
|
|
|
|
.vote-img {
|
|
|
|
position: absolute;
|
|
|
|
width: 670rpx;
|
|
|
|
height: 358rpx;
|
|
|
|
}
|
|
|
|
|
|
|
|
.news {
|
|
|
|
width: 100%;
|
|
|
|
height: 358rpx;
|
|
|
|
border-radius: 16rpx 16rpx 0 0;
|
|
|
|
color: #FFF;
|
|
|
|
position: absolute;
|
|
|
|
padding: 0 40rpx;
|
|
|
|
}
|
|
|
|
|
|
|
|
.news-title-h {
|
|
|
|
width: 590rpx;
|
|
|
|
font-size: 28rpx;
|
|
|
|
position: absolute;
|
|
|
|
bottom: 65rpx;
|
|
|
|
}
|
|
|
|
|
|
|
|
.news-title-s {
|
|
|
|
width: 590rpx;
|
|
|
|
font-size: 20rpx;
|
|
|
|
position: absolute;
|
|
|
|
bottom: 25rpx;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* .vote {
|
|
|
|
width: 100%;
|
|
|
|
height: 110rpx;
|
|
|
|
position: absolute;
|
|
|
|
bottom: 0;
|
|
|
|
border: 1rpx solid #000000;
|
|
|
|
} */
|
|
|
|
|
|
|
|
.scroll-view_N {
|
|
|
|
width: 100%;
|
|
|
|
height: 238rpx;
|
|
|
|
margin: 30rpx 0rpx 34rpx 0rpx;
|
|
|
|
white-space: nowrap;
|
|
|
|
}
|
|
|
|
|
|
|
|
.rotaion-box {
|
|
|
|
width: 168rpx;
|
|
|
|
height: 208rpx;
|
|
|
|
background: #FFFFFF;
|
|
|
|
box-shadow: 0rpx 6rpx 12rpx rgba(0, 0, 0, 0.16);
|
|
|
|
border-radius: 16rpx;
|
|
|
|
margin: 10rpx 32rpx 10rpx 0rpx;
|
|
|
|
display: inline-block;
|
|
|
|
}
|
|
|
|
|
|
|
|
.rotaion-box:nth-child(1) {
|
|
|
|
margin-left: 40rpx;
|
|
|
|
}
|
|
|
|
|
|
|
|
.rotaion {
|
|
|
|
width: 100%;
|
|
|
|
height: 208rpx;
|
|
|
|
padding: 36rpx 0 16rpx 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.rotaion image {
|
|
|
|
width: 80rpx;
|
|
|
|
height: 80rpx;
|
|
|
|
border-radius: 50%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.rotaion-h {
|
|
|
|
height: 34rpx;
|
|
|
|
font-size: 24rpx;
|
|
|
|
color: #333333;
|
|
|
|
font-weight: 600;
|
|
|
|
}
|
|
|
|
|
|
|
|
.rotaion-s {
|
|
|
|
height: 26rpx;
|
|
|
|
font-size: 18rpx;
|
|
|
|
color: #9D9D9D;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* 最新资讯 */
|
|
|
|
.newInfo-box {
|
|
|
|
overflow: hidden;
|
|
|
|
}
|
|
|
|
|
|
|
|
.newInfo-title-img {
|
|
|
|
width: 160rpx;
|
|
|
|
height: 52rpx;
|
|
|
|
margin: 0 0 18rpx 38rpx;
|
|
|
|
}
|
|
|
|
|
|
|
|
.newInfo {
|
|
|
|
width: 100%;
|
|
|
|
height: 528rpx;
|
|
|
|
border-top: 2rpx solid #EFEFEF;
|
|
|
|
}
|
|
|
|
|
|
|
|
.modular {
|
|
|
|
width: 100%;
|
|
|
|
height: 176rpx;
|
|
|
|
border-bottom: 2rpx solid #EFEFEF;
|
|
|
|
padding: 20rpx 40rpx 22rpx 40rpx;
|
|
|
|
}
|
|
|
|
|
|
|
|
.modular-h {
|
|
|
|
width: 400rpx;
|
|
|
|
height: 80rpx;
|
|
|
|
font-size: 28rpx;
|
|
|
|
color: #4A4A4A;
|
|
|
|
font-weight: 600;
|
|
|
|
}
|
|
|
|
|
|
|
|
.modular image {
|
|
|
|
width: 204rpx;
|
|
|
|
height: 134rpx;
|
|
|
|
border-radius: 8px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.title {
|
|
|
|
width: 400rpx;
|
|
|
|
height: 134rpx;
|
|
|
|
}
|
|
|
|
|
|
|
|
.title-l {
|
|
|
|
width: 400rpx;
|
|
|
|
height: 34rpx;
|
|
|
|
font-size: 24rpx;
|
|
|
|
color: #707070;
|
|
|
|
}
|
|
|
|
|
|
|
|
.title-l image {
|
|
|
|
width: 24rpx;
|
|
|
|
height: 24rpx;
|
|
|
|
margin-left: 5rpx;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* 热点精选 */
|
|
|
|
.hotspot-box {
|
|
|
|
width: 100%;
|
|
|
|
height: 456rpx;
|
|
|
|
}
|
|
|
|
|
|
|
|
.title-h-img {
|
|
|
|
width: 162rpx;
|
|
|
|
height: 62rpx;
|
|
|
|
margin: 32rpx 0 5rpx 40rpx;
|
|
|
|
}
|
|
|
|
|
|
|
|
.scroll-view_H {
|
|
|
|
width: 100%;
|
|
|
|
height: 344rpx;
|
|
|
|
white-space: nowrap;
|
|
|
|
}
|
|
|
|
|
|
|
|
.scroll-view_H image {
|
|
|
|
width: 670rpx;
|
|
|
|
height: 344rpx;
|
|
|
|
border-radius: 10rpx;
|
|
|
|
position: absolute;
|
|
|
|
}
|
|
|
|
|
|
|
|
.slide-box {
|
|
|
|
position: relative;
|
|
|
|
width: 670rpx;
|
|
|
|
height: 100%;
|
|
|
|
display: inline-block;
|
|
|
|
margin-right: 16rpx;
|
|
|
|
}
|
|
|
|
|
|
|
|
.hotspot-con {
|
|
|
|
width: 588rpx;
|
|
|
|
height: 130rpx;
|
|
|
|
bottom: 30rpx;
|
|
|
|
left: 24rpx;
|
|
|
|
position: absolute;
|
|
|
|
}
|
|
|
|
|
|
|
|
.hotspot-icon {
|
|
|
|
width: 72rpx;
|
|
|
|
height: 32rpx;
|
|
|
|
background: #FE3737;
|
|
|
|
border-radius: 12rpx 2rpx 12rpx 0;
|
|
|
|
font-size: 22rpx;
|
|
|
|
color: #fff;
|
|
|
|
text-align: center;
|
|
|
|
margin-bottom: 16rpx;
|
|
|
|
}
|
|
|
|
|
|
|
|
.hotspot-title-h {
|
|
|
|
max-width: 588rpx;
|
|
|
|
max-height: 80rpx;
|
|
|
|
font-size: 28rpx;
|
|
|
|
color: #FFFFFF;
|
|
|
|
white-space: pre-wrap;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* 值得关注 */
|
|
|
|
.follow-box {
|
|
|
|
width: 100%;
|
|
|
|
height: 940rpx;
|
|
|
|
position: relative;
|
|
|
|
overflow: hidden;
|
|
|
|
}
|
|
|
|
|
|
|
|
.follow-con {
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
.follow-top {
|
|
|
|
width: 100%;
|
|
|
|
height: 170rpx;
|
|
|
|
padding: 20rpx 20rpx 26rpx 20rpx;
|
|
|
|
border-bottom: 1rpx solid #DCDCDC;
|
|
|
|
}
|
|
|
|
|
|
|
|
.follow-top image {
|
|
|
|
width: 232rpx;
|
|
|
|
height: 130rpx;
|
|
|
|
border-radius: 16rpx;
|
|
|
|
}
|
|
|
|
|
|
|
|
.follow-title {
|
|
|
|
width: 370rpx;
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.follow-h {
|
|
|
|
width: 100%;
|
|
|
|
height: 80rpx;
|
|
|
|
font-size: 28rpx;
|
|
|
|
color: #000000;
|
|
|
|
font-weight: 600;
|
|
|
|
}
|
|
|
|
|
|
|
|
.follow-title-l {
|
|
|
|
width: 290rpx;
|
|
|
|
height: 28rpx;
|
|
|
|
font-size: 20rpx;
|
|
|
|
color: #707070;
|
|
|
|
}
|
|
|
|
|
|
|
|
.follow-title-l image {
|
|
|
|
width: 24rpx;
|
|
|
|
height: 24rpx;
|
|
|
|
margin-left: 5rpx;
|
|
|
|
}
|
|
|
|
|
|
|
|
.follow-bottom {
|
|
|
|
width: 100%;
|
|
|
|
height: 80rpx;
|
|
|
|
padding: 14rpx 20rpx 14rpx 20rpx;
|
|
|
|
}
|
|
|
|
|
|
|
|
.follow-bottom image {
|
|
|
|
width: 52rpx;
|
|
|
|
height: 52rpx;
|
|
|
|
border-radius: 50%;
|
|
|
|
margin-right: 8rpx;
|
|
|
|
}
|
|
|
|
|
|
|
|
.follow-title-b {
|
|
|
|
width: 230rpx;
|
|
|
|
height: 52rpx;
|
|
|
|
.title-s {
|
|
|
|
height: 25rpx;
|
|
|
|
line-height: 25rpx;
|
|
|
|
font-size: 20rpx;
|
|
|
|
font-weight: 600;
|
|
|
|
}
|
|
|
|
.title-con {
|
|
|
|
height: 20rpx;
|
|
|
|
font-size: 16rpx;
|
|
|
|
color: #707070;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.follow-btn {
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
</style>
|