285 lines
5.1 KiB
Vue
285 lines
5.1 KiB
Vue
<!-- 惠民政策列表 -->
|
|
|
|
<template>
|
|
<view class="content">
|
|
<view class="c-top">
|
|
<view class="" @click="getback()">
|
|
<uni-icons type="left" size="18"></uni-icons>
|
|
</view>
|
|
<view class="c-title">我的收藏</view>
|
|
<view style="width: 10%; height: 10px;"></view>
|
|
</view>
|
|
<view class="cont">
|
|
|
|
<view class="bjimg" v-if="arrlist == ''">
|
|
<image src="http://www.nuoyunr.com/lananRsc/detection/qs.png" mode=""></image>
|
|
</view>
|
|
<view class="c-box" v-for="(item,index) in arrlist" :key="index" @click="getdetails(item.id)">
|
|
<!-- 上 -->
|
|
<view class="c-b-top">
|
|
<view class="t-left">
|
|
<image :src="this.$baseUrl+item.newsCover" mode=""></image>
|
|
</view>
|
|
<view class="t-right">
|
|
<view class="t-tilte">{{item.newsTitle}}</view>
|
|
<!-- <view class="t-zi">{{item.newsContent}}</view> -->
|
|
<view class="t-zi" v-html="item.newsContent"></view>
|
|
</view>
|
|
</view>
|
|
<!-- 下 -->
|
|
<view class="c-b-bom">
|
|
<view class="b-left">{{item.createTime ? item.createTime.substring(0,item.createTime.length - 3) : ''}}</view>
|
|
<view class="b-right">
|
|
<view class="z-lv">
|
|
<u-icon name="eye-fill" color="#0D2E8D" size="28"></u-icon>
|
|
<text>{{item.readNum}}</text>
|
|
</view>
|
|
<view class="y-hong">
|
|
<u-icon name="thumb-up-fill" color="#fa3534" size="28"></u-icon>
|
|
<text>{{item.likeNum}}</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import config from '@/config'
|
|
import request from '../../utils/request';
|
|
|
|
export default{
|
|
data(){
|
|
return{
|
|
isOpen: false,
|
|
fab:false,
|
|
imgs:'',
|
|
arrlist:[],
|
|
animationData: {},
|
|
isRote: false,
|
|
animation: null,
|
|
newsName:'',
|
|
}
|
|
},
|
|
onShow() {
|
|
this.getlistindex()
|
|
this.imgs = this.$baseUrl
|
|
},
|
|
|
|
methods:{
|
|
// getfab(){
|
|
// this.fab =! this.fab
|
|
// },
|
|
getfab() {
|
|
this.fab = !this.fab
|
|
let rota = 0;
|
|
if (this.isRote) {
|
|
rota = 90;
|
|
this.isRote = false;
|
|
} else {
|
|
this.isRote = true;
|
|
}
|
|
this.animation = uni.createAnimation();
|
|
this.animation.rotate(rota).step()
|
|
this.animationData = this.animation.export()
|
|
},
|
|
getback(){
|
|
uni.navigateBack({
|
|
delta:1,
|
|
})
|
|
},
|
|
async getlistindex(){
|
|
//惠民政策
|
|
let res = await request({
|
|
url: '/appInspection/news/collectionNews?newsName='+ this.newsName,
|
|
method: 'get',
|
|
})
|
|
this.arrlist = res.rows
|
|
},
|
|
getnewadd(){
|
|
//发布文章
|
|
uni.navigateTo({
|
|
url:'/pages/detection/newsadd?type=hmzc'
|
|
})
|
|
},
|
|
getdetails(id){
|
|
uni.navigateTo({
|
|
url:'/pages/detection/detedetails?id='+id
|
|
})
|
|
},
|
|
getguanli(){
|
|
uni.navigateTo({
|
|
url:'/pages/detection/managelist?type=hmzc'
|
|
})
|
|
}
|
|
|
|
|
|
}
|
|
|
|
}
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
.content{
|
|
width: 100%;
|
|
height: calc(100vh);
|
|
background-color: #F6F6F6;
|
|
box-sizing: border-box;
|
|
|
|
}
|
|
.q-fab{
|
|
position: fixed;
|
|
bottom: 50px;
|
|
right: 15px;
|
|
width: 55px;
|
|
height: 55px;
|
|
border-radius: 50%;
|
|
overflow: hidden;
|
|
image{
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
}
|
|
.fab-z1{
|
|
position: fixed;
|
|
bottom: 115px;
|
|
right: 15px;
|
|
width: 50px;
|
|
height: 50px;
|
|
border-radius: 50%;
|
|
overflow: hidden;
|
|
image{
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
}
|
|
.fab-z2{
|
|
position: fixed;
|
|
bottom: 50px;
|
|
right: 80px;
|
|
width: 50px;
|
|
height: 50px;
|
|
border-radius: 50%;
|
|
overflow: hidden;
|
|
image{
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
}
|
|
.top-icon{
|
|
margin-bottom: 45px;
|
|
}
|
|
.c-top{
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
padding: 15px;
|
|
padding-top: 15%;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
background-color: white;
|
|
}
|
|
.c-title{
|
|
font-size: 18px;
|
|
font-weight: bold
|
|
}
|
|
.cont{
|
|
width: 100%;
|
|
padding: 15px;
|
|
box-sizing: border-box;
|
|
}
|
|
.c-box{
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
padding: 7px;
|
|
background-color: white;
|
|
margin-bottom: 10px;
|
|
border-radius: 10px;
|
|
}
|
|
.c-b-top{
|
|
width: 100%;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
}
|
|
.t-left{
|
|
width: 130px;
|
|
height: 75px;
|
|
border-radius: 7px;
|
|
// background: #DDDDDD;
|
|
overflow: hidden;
|
|
image{
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
|
|
}
|
|
.t-right{
|
|
width: 60%;
|
|
}
|
|
.t-tilte{
|
|
font-size: 16px;
|
|
font-weight: bold;
|
|
color: #333333;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
|
|
}
|
|
.t-zi{
|
|
font-size: 14px;
|
|
font-weight: 400;
|
|
color: #666666;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
display: -webkit-box;
|
|
-webkit-line-clamp: 3;
|
|
-webkit-box-orient: vertical;
|
|
|
|
}
|
|
.c-b-bom{
|
|
width: 100%;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-top: 10px;
|
|
}
|
|
.b-left{
|
|
color: #0D2E8D;
|
|
font-size: 14px;
|
|
}
|
|
.b-right{
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
}
|
|
.z-lv{
|
|
display: flex;
|
|
align-items: center;
|
|
color: #43A045;
|
|
font-size: 15px;
|
|
margin-right: 10px;
|
|
}
|
|
.y-hong{
|
|
display: flex;
|
|
align-items: center;
|
|
color: #FF7272;
|
|
font-size: 15px;
|
|
margin-right: 15px;
|
|
}
|
|
.z-img{
|
|
width: 20px;
|
|
height: 15px;
|
|
image{
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
margin-right: 2px;
|
|
}
|
|
|
|
|
|
</style> |