|
|
|
@ -6,50 +6,28 @@
|
|
|
|
|
<view class="search acea-row row-center-wrapper">搜一下</view> |
|
|
|
|
</view> |
|
|
|
|
<swiper class="vote-box"> |
|
|
|
|
<swiper-item v-for="(item,index) in articleList" :key="index"> |
|
|
|
|
<swiper-item v-for="(item,index) in hotList" :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-h line1">{{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="rotaion-box" @click="toCategoryList(item.id)" v-for="(item,index) in categoryList" :key="index"> |
|
|
|
|
<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> |
|
|
|
|
<image :src="item.img" mode="aspectFill"></image> |
|
|
|
|
<view class="rotaion-h">{{item.name}}</view> |
|
|
|
|
<view class="rotaion-s">{{item.description}}</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</scroll-view> |
|
|
|
|
<!-- 最新资讯 --> |
|
|
|
|
<view class="newInfo-box"> |
|
|
|
|
<view class="newInfo-box" v-if="newList.length > 0"> |
|
|
|
|
<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" |
|
|
|
|
<view class="modular acea-row row-between" v-for="(item,index) in newList" :key="index" |
|
|
|
|
@click="toDetail(item.id)"> |
|
|
|
|
<view class="acea-row title"> |
|
|
|
|
<view class="modular-h line2">{{item.title}}</view> |
|
|
|
@ -69,11 +47,11 @@
|
|
|
|
|
<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"> |
|
|
|
|
<view class="slide-box" v-for="(item,index) in hotList" :key="index"> |
|
|
|
|
<image :src="item.imageInput" mode="aspectFill"></image> |
|
|
|
|
<view class="hotspot-con"> |
|
|
|
|
<view class="hotspot-icon">热点</view> |
|
|
|
|
<view class="hotspot-title-h">{{item.title}}</view> |
|
|
|
|
<view class="hotspot-title-h line2">{{item.title}}</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</scroll-view> |
|
|
|
@ -81,14 +59,15 @@
|
|
|
|
|
<!-- 值得关注 --> |
|
|
|
|
<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-con" v-for="(item,index) in concernList" :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 |
|
|
|
|
<view>{{item.createTime}}</view> |
|
|
|
|
<view class="acea-row row-middle"> |
|
|
|
|
<text>{{item.visit}}</text> |
|
|
|
|
<image src="../../static/images/eye.png" mode="aspectFill"></image> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
@ -101,7 +80,7 @@
|
|
|
|
|
<view class="title-s">{{item.author}}</view> |
|
|
|
|
<view class="title-con line1">{{item.title}}</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="follow-btn">关注+</view> |
|
|
|
|
<!-- <view class="follow-btn">关注+</view> --> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
@ -109,25 +88,40 @@
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import { |
|
|
|
|
getArticle |
|
|
|
|
} from "@/api/home"; |
|
|
|
|
import { getArticle } from "@/api/home"; |
|
|
|
|
import { articleIndex } from "@/api/article" |
|
|
|
|
export default { |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
categoryList: [], |
|
|
|
|
newList: [], |
|
|
|
|
hotList: [], |
|
|
|
|
concernList: [], |
|
|
|
|
articleList: [], |
|
|
|
|
page: 0, |
|
|
|
|
size: 10, |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
mounted() { |
|
|
|
|
this.getArticleList() |
|
|
|
|
// this.getArticleList() |
|
|
|
|
this.getArticleIndex() |
|
|
|
|
}, |
|
|
|
|
onReachBottom() { |
|
|
|
|
this.page = this.page + 1 |
|
|
|
|
this.getArticleList() |
|
|
|
|
}, |
|
|
|
|
computed:{ |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
getArticleIndex(){ |
|
|
|
|
articleIndex().then((res)=>{ |
|
|
|
|
this.categoryList = res.data.categoryList |
|
|
|
|
this.concernList = res.data.concernList |
|
|
|
|
this.hotList = res.data.hotList |
|
|
|
|
this.newList = res.data.newList |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
getArticleList() { |
|
|
|
|
getArticle({ |
|
|
|
|
page: this.page, |
|
|
|
@ -145,31 +139,12 @@
|
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
// 今日大事 |
|
|
|
|
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() { |
|
|
|
|
toCategoryList(id){ |
|
|
|
|
console.log('id',id) |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: '/pages/life/articleList/index?active=4' |
|
|
|
|
url: '/pages/life/articleList/index?active=' + id |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</script> |
|
|
|
@ -212,7 +187,6 @@
|
|
|
|
|
.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; |
|
|
|
@ -227,26 +201,24 @@
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.news { |
|
|
|
|
width: 100%; |
|
|
|
|
height: 358rpx; |
|
|
|
|
border-radius: 16rpx 16rpx 0 0; |
|
|
|
|
color: #FFF; |
|
|
|
|
width: 590rpx; |
|
|
|
|
height: 94rpx; |
|
|
|
|
background: rgba(0, 0, 0, 0.2); |
|
|
|
|
border-radius: 14rpx; |
|
|
|
|
position: absolute; |
|
|
|
|
padding: 0 40rpx; |
|
|
|
|
bottom: 6rpx; |
|
|
|
|
left: 50%; |
|
|
|
|
margin-left: -295rpx; |
|
|
|
|
color: #fff; |
|
|
|
|
padding: 14rpx; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.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 { |
|
|
|
@ -393,11 +365,14 @@
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.hotspot-con { |
|
|
|
|
width: 588rpx; |
|
|
|
|
height: 130rpx; |
|
|
|
|
bottom: 34rpx; |
|
|
|
|
left: 24rpx; |
|
|
|
|
width: 670rpx; |
|
|
|
|
height: 94rpx; |
|
|
|
|
background: rgba(0, 0, 0, 0.2); |
|
|
|
|
border-radius: 0px 0px 8rpx 8rpx; |
|
|
|
|
padding: 8rpx 32rpx; |
|
|
|
|
color: #fff; |
|
|
|
|
position: absolute; |
|
|
|
|
bottom: 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.hotspot-icon { |
|
|
|
@ -406,6 +381,7 @@
|
|
|
|
|
background: #FE3737; |
|
|
|
|
border-radius: 12rpx 2rpx 12rpx 0; |
|
|
|
|
position: absolute; |
|
|
|
|
top:-46rpx; |
|
|
|
|
font-size: 22rpx; |
|
|
|
|
color: #fff; |
|
|
|
|
text-align: center; |
|
|
|
@ -414,12 +390,8 @@
|
|
|
|
|
|
|
|
|
|
.hotspot-title-h { |
|
|
|
|
width: 588rpx; |
|
|
|
|
height: 80rpx; |
|
|
|
|
font-size: 28rpx; |
|
|
|
|
color: #FFFFFF; |
|
|
|
|
position: absolute; |
|
|
|
|
bottom: 0; |
|
|
|
|
white-space: pre-wrap; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* 值得关注 */ |
|
|
|
|