11 changed files with 150 additions and 267 deletions
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 3.1 KiB |
@ -1,126 +0,0 @@ |
|||||
<template> |
|
||||
<div> |
|
||||
<div class="container"> |
|
||||
<div class="card"> |
|
||||
<div class="flex flex-y"> |
|
||||
<div class="font-size18 font-bold m-top12">{{ discussionList.title }}</div> |
|
||||
<div class="flex flex-x flex-end font-size13 AAA m-top5"> |
|
||||
<div class="font-size13 AAA">{{ discussionList.address }}</div> |
|
||||
<div class="font-size13 AAA">{{ discussionList.dataTime }}</div> |
|
||||
</div> |
|
||||
<img src="../../assets/images/comMessages/1718095003122.png" alt="" class="img_100 m-top12"> |
|
||||
<div class="m-top12">{{ discussionList.content }}</div> |
|
||||
</div> |
|
||||
<div class="bot_btn flex flex-x flex-mean m-bot50 back_color"> |
|
||||
<van-button v-if="like" :disabled="disableAllButtons" round class="support" |
|
||||
:icon="require('@/assets/images/comMessages/like.png')" type="info" @click=""> |
|
||||
已点赞 {{ likeNum }} |
|
||||
</van-button> |
|
||||
|
|
||||
<van-button v-else="!like" :disabled="disableAllButtons" round class="support" |
|
||||
:icon="require('@/assets/images/comMessages/nolike.png')" type="info" @click="OnLike"> |
|
||||
点赞 |
|
||||
</van-button> |
|
||||
<van-button :disabled="disableAllButtons" round class="support" |
|
||||
:icon="require('@/assets/images/icons/share.png')" type="info" @click="Onoppose"> |
|
||||
转发 |
|
||||
</van-button> |
|
||||
</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
|
|
||||
|
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
|
|
||||
export default { |
|
||||
data() { |
|
||||
return { |
|
||||
|
|
||||
labelList: ["最新", "通知公告", "社区新闻", "政策发布", "生活"], |
|
||||
discussionList: |
|
||||
{ title: '嘉定山社区育龄妇女免费体检通知', address: "嘉定山社区", content: ' 为了使生殖健康优质服务惠及更多已婚育龄 妇女,按照区卫健局统一部署,街道卫生和计 划生育综合管理办公室联系庙后街卫生服务', imge: "@/assets/images/comMessages/1.png", likeCount: 1111, dataTime: '2022-05-06 12:00:00' }, |
|
||||
pageSize: 5, |
|
||||
pageNo: 1, |
|
||||
agencyId: null, |
|
||||
finished: false, |
|
||||
loading: true, |
|
||||
showRegister: false, |
|
||||
searchValue: "", |
|
||||
like: false, |
|
||||
likeNum: 3000 |
|
||||
}; |
|
||||
}, |
|
||||
created() { |
|
||||
this.agencyId = this.$store.state.app.agencyId; |
|
||||
|
|
||||
}, |
|
||||
methods: { |
|
||||
OnLike() { |
|
||||
console.log("123"); |
|
||||
this.likeNum++; |
|
||||
this.like = !this.like; |
|
||||
}, |
|
||||
|
|
||||
Onoppose() { |
|
||||
wx.checkJsApi({ |
|
||||
jsApiList: ['chooseImage'], // 需要检测的JS接口列表,所有JS接口列表见附录2, |
|
||||
success: function (res) { |
|
||||
// 以键值对的形式返回,可用的api值true,不可用为false |
|
||||
// 如:{"checkResult":{"chooseImage":true},"errMsg":"checkJsApi:ok"} |
|
||||
console.log("123"); |
|
||||
wx.ready(function () { |
|
||||
console.log("453");//需在用户可能点击分享按钮前就先调用 |
|
||||
wx.updateAppMessageShareData({ |
|
||||
title: '', // 分享标题 |
|
||||
desc: '', // 分享描述 |
|
||||
link: '', // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致 |
|
||||
imgUrl: '', // 分享图标 |
|
||||
success: function () { |
|
||||
console.log("123"); |
|
||||
// 设置成功 |
|
||||
} |
|
||||
}) |
|
||||
}); |
|
||||
} |
|
||||
}); |
|
||||
console.log("123"); |
|
||||
|
|
||||
} |
|
||||
|
|
||||
|
|
||||
}, |
|
||||
components: {}, |
|
||||
computed: {}, |
|
||||
watch: {}, |
|
||||
} |
|
||||
</script> |
|
||||
|
|
||||
<style lang='less' scoped> |
|
||||
.custom-button { |
|
||||
width: 60px; |
|
||||
height: 33px; |
|
||||
} |
|
||||
|
|
||||
.activity_content { |
|
||||
padding-bottom: 10px; |
|
||||
box-sizing: border-box; |
|
||||
width: 100%; |
|
||||
border-bottom: 1px solid #EAEAEA; |
|
||||
margin-top: 14px; |
|
||||
min-height: 50px; |
|
||||
} |
|
||||
|
|
||||
.support { |
|
||||
background-color: #ffffff; |
|
||||
color: black; |
|
||||
} |
|
||||
|
|
||||
.imge_100 { |
|
||||
width: 250px; |
|
||||
height: 128px; |
|
||||
|
|
||||
} |
|
||||
</style> |
|
@ -1,109 +0,0 @@ |
|||||
<template> |
|
||||
<div> |
|
||||
<div class="flex flex-y" style="background-color: #FFFFFF;"> |
|
||||
<div class="flex flex-mean"> |
|
||||
<van-search class=".flex flex-1" v-model="searchValue" left-icon="" shape="round" |
|
||||
placeholder="请输入搜索关键词" /> |
|
||||
<van-button round type="info" class="custom-button font-size13 m-top10 m-right12 ">查询</van-button> |
|
||||
</div> |
|
||||
</div> |
|
||||
<van-tabs v-model="active" scrollspy sticky> |
|
||||
<van-tab v-for="item in labelList" :title="item"> |
|
||||
</van-tab> |
|
||||
</van-tabs> |
|
||||
<div class="container"> |
|
||||
<van-list class="card" :finished="finished" finished-text="没有更多了" @load="onLoad"> |
|
||||
<div v-for="item in discussionList" :key="item" :title="item" class="activity_content" @click="$router.push({ path: `/detail` })"> |
|
||||
<div v-if="!item.imge" class="flex flex-y"> |
|
||||
<div class=" m-bottom10">{{ item.title }}</div> |
|
||||
<div class="font-size15 gray">{{ item.content }}</div> |
|
||||
<div class="flex flex-x flex-end m-top10"> |
|
||||
<div class="flex flex-x"> |
|
||||
<img src="@/assets/images/icons/support.png" class="img_16"> |
|
||||
<div class="gray font-size13">{{ item.likeCount }}</div> |
|
||||
</div> |
|
||||
<div class="gray font-size13">{{ item.dataTime }}</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div v-if="item.imge" class="flex flex-y"> |
|
||||
<div class="flex flex-x"> |
|
||||
<div class="flex flex-y" style="width: 212px; height: 80px;"> |
|
||||
<div class="m-bottom10">{{ item.title }}</div> |
|
||||
<div class="font-size15 gray van-ellipsis">{{ item.content }}</div> |
|
||||
</div> |
|
||||
<img src="@/assets/images/comMessages/1.png" class="imge_100"> |
|
||||
</div> |
|
||||
|
|
||||
<div class="flex flex-x flex-end m-top10"> |
|
||||
<div class="flex flex-x"> |
|
||||
<img src="@/assets/images/icons/support.png" class="img_16"> |
|
||||
<div class="gray font-size13">{{ item.likeCount }}</div> |
|
||||
</div> |
|
||||
<div class="gray font-size13">{{ item.dataTime }}</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
</van-list> |
|
||||
</div> |
|
||||
|
|
||||
</div> |
|
||||
|
|
||||
|
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
import registerDialog from '@/components/registerDialog'; |
|
||||
|
|
||||
export default { |
|
||||
data() { |
|
||||
return { |
|
||||
|
|
||||
labelList: ["最新", "通知公告", "社区新闻", "政策发布", "生活"], |
|
||||
discussionList: [ |
|
||||
{ title: '重庆南路暖气管道施工通知', content: '从5月7日到6月1日,重庆南路需要进行暖气管道 施工改造,请大家提前做好出行准备。', imge: "@/assets/images/comMessages/1.png", likeCount: 1111, dataTime: '2022-05-06 12:00:00' }, |
|
||||
{ title: '嘉定山社区育龄妇女免费体检通知', content: '从5月7日到6月1日,重庆南路需要进行暖气管道 施工改造,请大家提前做好出行准备。', imge: "@/assets/images/comMessages/1.png", likeCount: 1111, dataTime: '2022-05-06 12:00:00' }, |
|
||||
{ title: '社区组织志愿者为社区高龄老人提供上门理发服务', content: '从5月7日到6月1日,重庆南路需要进行暖气管道 施工改造,请大家提前做好出行准备。', imge: "", likeCount: 1111, dataTime: '2022-05-06 12:00:00' }, |
|
||||
], |
|
||||
pageSize: 5, |
|
||||
pageNo: 1, |
|
||||
agencyId: null, |
|
||||
finished: false, |
|
||||
loading: true, |
|
||||
showRegister: false, |
|
||||
searchValue: "" |
|
||||
}; |
|
||||
}, |
|
||||
created() { |
|
||||
this.agencyId = this.$store.state.app.agencyId; |
|
||||
|
|
||||
}, |
|
||||
methods: { |
|
||||
|
|
||||
}, |
|
||||
components: { registerDialog }, |
|
||||
computed: {}, |
|
||||
watch: {}, |
|
||||
} |
|
||||
</script> |
|
||||
|
|
||||
<style lang='less' scoped> |
|
||||
.custom-button { |
|
||||
width: 60px; |
|
||||
height: 33px; |
|
||||
} |
|
||||
|
|
||||
.activity_content { |
|
||||
padding-bottom: 10px; |
|
||||
box-sizing: border-box; |
|
||||
width: 100%; |
|
||||
border-bottom: 1px solid #EAEAEA; |
|
||||
margin-top: 14px; |
|
||||
min-height: 50px; |
|
||||
} |
|
||||
.imge_100{ |
|
||||
width: 100px; |
|
||||
height:60px ; |
|
||||
|
|
||||
} |
|
||||
|
|
||||
</style> |
|
@ -0,0 +1,101 @@ |
|||||
|
<template> |
||||
|
<div class='container m-bot50'> |
||||
|
<div class="card"> |
||||
|
<div class="m-top15 p0"> |
||||
|
<h2 style="margin: 0; font-size: 21px;">{{ info.title }}</h2> |
||||
|
<div class="flex flex-end"> |
||||
|
<van-cell :border="false" :value="info.agencyName" class="font-size13 y66666"></van-cell> |
||||
|
<van-cell :border="false" :value="info.releaseTime" class="font-size13 y66666"></van-cell> |
||||
|
</div> |
||||
|
<van-divider /> |
||||
|
<div v-html="info.content"> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="bot_btn flex flex-center2" style="height: 50px;"> |
||||
|
<div class="flex1 flex flex-center1 flex-center2"> |
||||
|
<van-button size="small" class="m-right7" round> |
||||
|
<template #icon> |
||||
|
<img src="@/assets/images/icons/link.png" alt="" class="img_20"> |
||||
|
</template> 点赞{{ info.likes }}1200 </van-button> |
||||
|
</div> |
||||
|
<div class="flex1 flex flex-center1 flex-center2"> |
||||
|
<van-button size="small" class="m-right7" round @click="share"> |
||||
|
<template #icon> |
||||
|
<img src="@/assets/images/icons/share.png" alt="" class="img_20"> |
||||
|
</template> 转发 {{ info.likes }}420 </van-button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
|
||||
|
export default { |
||||
|
data() { |
||||
|
return { |
||||
|
info: {}, |
||||
|
}; |
||||
|
}, |
||||
|
created() { |
||||
|
if (this.$route.query) { |
||||
|
this.info = JSON.parse(this.$route.query.item); |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
share() { |
||||
|
if (wx.updateAppMessageShareData) { |
||||
|
wx.updateAppMessageShareData({ |
||||
|
title: 'e智社区', |
||||
|
desc: this.info.title, |
||||
|
link: `http://epmet-cloud.elinkservice.cn/#/communityPublicityDetail?item=${JSON.stringify(this.info)}`, |
||||
|
imgUrl: '', |
||||
|
success: function () { |
||||
|
} |
||||
|
}) |
||||
|
} else { |
||||
|
wx.onMenuShareAppMessage({ |
||||
|
title: 'e智社区', |
||||
|
desc: this.info.title, |
||||
|
link: `http://epmet-cloud.elinkservice.cn/#/communityPublicityDetail?id=${JSON.stringify(this.info)}`, |
||||
|
imgUrl: '', |
||||
|
success: function () { |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
components: {}, |
||||
|
computed: {}, |
||||
|
watch: {}, |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang='less' scoped> |
||||
|
:deep(.p0>.van-cell) { |
||||
|
padding: 0; |
||||
|
} |
||||
|
|
||||
|
:deep(.van-cell) { |
||||
|
padding: 16px 8px; |
||||
|
} |
||||
|
|
||||
|
:deep(.van-cell__title) { |
||||
|
color: #666666; |
||||
|
display: flex; |
||||
|
|
||||
|
&>span { |
||||
|
flex: 1; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
:deep(.van-cell__value) { |
||||
|
text-align: left; |
||||
|
} |
||||
|
|
||||
|
:deep(.van-cell--required) { |
||||
|
&::before { |
||||
|
left: -5px; |
||||
|
} |
||||
|
} |
||||
|
</style> |
Loading…
Reference in new issue