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.
179 lines
3.5 KiB
179 lines
3.5 KiB
<template> |
|
<view class="province"> |
|
<view class="policy" v-for="(item,index) in list" :key="index" |
|
@click.stop="Link(item.id,item.classify)" |
|
> |
|
<view class="policyHeader"> |
|
<image :src="a" mode="" |
|
style="width: 120rpx;height: 44rpx;" class="imgOne"> |
|
</image> |
|
<text class="policyProvince">市政策</text> |
|
</view> |
|
|
|
<view class="Link" > |
|
<image src="https://zsy-m.mianyang.cn/upload/2021/12/11/95f6fed0-1b46-401a-a82a-d92c40aa031d.png" |
|
mode=""></image> |
|
<!-- <text class="Source">来源:绵阳市加强文化建设促进文化旅游</text> --> |
|
<navigator class="Source" style="display: inline-block;" >{{item.source}} |
|
</navigator> |
|
</view> |
|
|
|
|
|
<view class="Maintext" > |
|
<!-- <image src="https://zsy-m.mianyang.cn/upload/2021/12/11/95f6fed0-1b46-401a-a82a-d92c40aa031d.png" |
|
mode=""></image> --> |
|
<text>{{item.smallContent}}</text> |
|
</view> |
|
|
|
|
|
</view> |
|
</view> |
|
</template> |
|
|
|
<script> |
|
import urlimg from "../http/urlimg.js" |
|
export default { |
|
props: ['classify'], |
|
data() { |
|
return { |
|
list: [], |
|
a:"", |
|
b:"", |
|
} |
|
}, |
|
async mounted() { |
|
this.a=urlimg.zhengceyuanjiao |
|
this.b=urlimg.zhengcelianjie |
|
if (this.classify) { |
|
let { |
|
data |
|
} = await this.$api.policysupport.postpolicysupport({ |
|
policyType: 3, |
|
classify: this.classify |
|
}) |
|
this.list = data |
|
console.log(data); |
|
} else { |
|
let { |
|
data |
|
} = await this.$api.policysupport.postpolicysupport({ |
|
policyType: 3 |
|
}) |
|
this.list = data |
|
console.log(data); |
|
} |
|
|
|
}, |
|
watch: { |
|
async classify() { |
|
let { |
|
data |
|
} = await this.$api.policysupport.postpolicysupport({ |
|
policyType: 3, |
|
classify: this.classify |
|
}) |
|
this.list = data |
|
} |
|
}, |
|
methods: { |
|
Link(id,classify) { |
|
uni.navigateTo({ |
|
url: `../Policyfordetails/Policyfordetails?id=${id}&classify=${classify}&type=1` |
|
}) |
|
}, |
|
} |
|
|
|
} |
|
</script> |
|
|
|
<style lang="scss"> |
|
.province { |
|
margin-top: 40rpx; |
|
|
|
.policy { |
|
width: 670rpx; |
|
height: 370rpx; |
|
background-color: #FFFFFF; |
|
margin: 0rpx auto; |
|
border-radius: 20rpx; |
|
position: relative; |
|
margin-bottom: 40rpx; |
|
|
|
.policyHeader { |
|
width: 100%; |
|
height: 44rpx; |
|
position: relative; |
|
margin-bottom: 20rpx; |
|
|
|
.imgOne { |
|
position: absolute; |
|
right: 0rpx; |
|
top: 15rpx; |
|
} |
|
|
|
.policyProvince { |
|
position: absolute; |
|
color: #576AF3; |
|
right: 10rpx; |
|
top: 15rpx; |
|
|
|
} |
|
} |
|
|
|
.Maintext { |
|
width: 620rpx; |
|
padding-left: 27rpx; |
|
color: #484747; |
|
// height: 159rpx; |
|
max-height: 159rpx; |
|
display: -webkit-box; |
|
-webkit-box-orient: vertical; |
|
-webkit-line-clamp: 4; |
|
overflow: hidden; |
|
image { |
|
width: 40rpx; |
|
height: 40rpx; |
|
vertical-align: middle; |
|
display: inline-block; |
|
} |
|
} |
|
|
|
.Link { |
|
// position: absolute; |
|
// height: 110rpx; |
|
margin-bottom: 10rpx; |
|
// bottom: 20rpx; |
|
// margin-left: 30rpx; |
|
position: relative; |
|
|
|
image { |
|
position: absolute; |
|
width: 94rpx; |
|
height: 94rpx; |
|
vertical-align: middle; |
|
// margin-top: 15rpx; |
|
top: -16rpx; |
|
} |
|
|
|
.Source { |
|
color: #576AF3; |
|
text-indent: 60rpx; |
|
width: 620rpx; |
|
// height: 100rpx; |
|
max-height: 145rpx; |
|
margin-left: 30rpx; |
|
line-height: 50rpx; |
|
// vertical-align: middle; |
|
// overflow: hidden; |
|
// text-overflow: ellipsis; |
|
// white-space: nowrap; |
|
display: -webkit-box; |
|
-webkit-box-orient: vertical; |
|
-webkit-line-clamp: 3; |
|
overflow: hidden; |
|
} |
|
|
|
} |
|
} |
|
} |
|
</style>
|
|
|