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