bug
This commit is contained in:
@@ -24,7 +24,12 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="AppCircle-list">
|
||||
<div class="item" v-for="(item, index) in list" :key="index" @click="$linkTo('./Detail?id=' + item.id + '&name=' + item.topicName + '&themeId=' + item.themeId)">
|
||||
<div class="item"
|
||||
v-for="(item, index) in list"
|
||||
:key="index"
|
||||
hover-class="text-hover"
|
||||
hover-stop-propagation
|
||||
@click="$linkTo('./Detail?id=' + item.id + '&name=' + item.topicName + '&themeId=' + item.themeId)">
|
||||
<div class="item-top">
|
||||
<image :src="item.createUserAvatar || 'https://cdn.cunwuyun.cn/wxmp/fengdu/avatar.png'" />
|
||||
<div class="right">
|
||||
@@ -33,7 +38,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-content">
|
||||
<span v-if="item.themeId" @click.stop="$linkTo('./TopicDetail?themeId=' + item.themeId + '&name=' + item.topicName)">#【{{ item.topicName }}】</span>
|
||||
<span hover-stop-propagation v-if="item.themeId" @click.stop="$linkTo('./TopicDetail?themeId=' + item.themeId + '&name=' + item.topicName)">#【{{ item.topicName }}】</span>
|
||||
<text>{{ item.content }}</text>
|
||||
</div>
|
||||
<div class="item-imgs" v-if="item.files.length">
|
||||
@@ -41,11 +46,11 @@
|
||||
</div>
|
||||
<p>{{ item.createTime }}</p>
|
||||
<div class="item-bottom">
|
||||
<button @click.stop="onBtnClick" open-type="share" :data-themeid="item.themeId" :data-id="item.id" :data-name="item.topicName">
|
||||
<button hover-stop-propagation @click.stop="onBtnClick" open-type="share" :data-content="item.content" :data-themeid="item.themeId" :data-id="item.id" :data-name="item.topicName">
|
||||
<image src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-zhuanfa.png" />
|
||||
<i>{{ item.sharedCount }}</i>
|
||||
</button>
|
||||
<div>
|
||||
<div hover-stop-propagation @click.stop="reciate(item.id, item.appreciateStatus)">
|
||||
<image :src="item.appreciateStatus ? 'https://cdn.cunwuyun.cn/wxmp/fengdu/zan-active.png' : 'https://cdn.cunwuyun.cn/wxmp/fengdu/zan.png'" />
|
||||
<i>{{ item.appreciateCount }}</i>
|
||||
</div>
|
||||
@@ -118,6 +123,16 @@
|
||||
onBtnClick (e) {
|
||||
},
|
||||
|
||||
reciate (id, appreciateStatus) {
|
||||
this.$instance.post(`/app/appneighborhoodassistance/appreciate?id=${id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast(appreciateStatus ? '取消点赞' : '点赞成功')
|
||||
|
||||
this.changeTab(this.currIndex)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getMyPublishCount () {
|
||||
this.$instance.post(`/app/appneighborhoodassistance/list`, null, {
|
||||
params: {
|
||||
@@ -215,9 +230,15 @@
|
||||
},
|
||||
|
||||
onShareAppMessage (e) {
|
||||
this.$instance.post(`/app/appneighborhoodassistance/share?id=${e.target.dataset.id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.changeTab(this.currIndex)
|
||||
}
|
||||
})
|
||||
|
||||
return {
|
||||
title: this.title,
|
||||
path: `/pages/AppCircle/Detail?id=${this.id}&themeId=${e.themeid}&name=${e.name}`
|
||||
title: e.target.dataset.content.substr(0, 20),
|
||||
path: `/pages/AppCircle/Detail?id=${e.target.dataset.id}&themeId=${e.target.dataset.themeid}&name=${e.target.dataset.name}`
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user