点赞bug

This commit is contained in:
花有清香月有阴
2022-02-18 16:03:18 +08:00
parent f189e13195
commit 9221b97d91

View File

@@ -43,21 +43,37 @@
<div class="rightFlex">
<img src="https://cdn.cunwuyun.cn/dvcp/AppVillager/2.png" alt="" class="img2" @click="poupShow = true" />
<img src="https://cdn.cunwuyun.cn/dvcp/AppVillager/3.png" alt="" class="img3" @click="like" />
<img src="https://cdn.cunwuyun.cn/dvcp/AppVillager/3.png" alt="" class="img3" @click="like" v-if="detail.upFlag == 0" />
<img src="https://cdn.cunwuyun.cn/dvcp/AppVillager/33.png" alt="" class="img3" @click="like" v-if="detail.upFlag == 1" />
</div>
</div>
</div>
<div class="reply">
<div class="reply" v-if="tabCurrent1 == 0">
<div class="replyTop" @click="deleShowBtn(item)">
<img src="https://cdn.cunwuyun.cn/dvcp/AppVillager/3.png" alt="" />
<span class="people">
<span v-for="(items, index) in detail.comments || detail.villagerCircleInfo.comments" :key="index" v-if="index < 3">{{ items.replyUserName }}</span>
{{ detail.villagerCircleInfo ? detail.villagerCircleInfo.comments.length : detail.comments.length }}</span
<span v-for="(items, index) in detail.comments" :key="index" v-if="index < 3">{{ items.replyUserName }}</span>
{{ detail.comments.length }}</span
>
</div>
<div class="replyCont" @click="deleShowBtn(item)" v-for="(item, i) in detail.comments || detail.villagerCircleInfo.comments" :key="i">
<div class="replyCont" @click="deleShowBtn(item)" v-for="(item, i) in detail.comments" :key="i">
<span class="nameLeft">{{ item.replyUserName }} : </span>
<span class="contRight"> {{ item.content }}</span>
</div>
</div>
<div class="reply" v-if="tabCurrent1 == 1">
<div class="replyTop" @click="deleShowBtn(item)">
<img src="https://cdn.cunwuyun.cn/dvcp/AppVillager/3.png" alt="" />
<span class="people">
<span v-for="(items, index) in detail.villagerCircleInfo.comments" :key="index" v-if="index < 3">{{ items.replyUserName }}</span>
{{ detail.villagerCircleInfo.comments.length }}</span
>
</div>
<div class="replyCont" @click="deleShowBtn(item)" v-for="(item, i) in detail.villagerCircleInfo.comments" :key="i">
<span class="nameLeft">{{ item.replyUserName }} : </span>
<span class="contRight"> {{ item.content }}</span>
</div>
@@ -172,7 +188,7 @@ export default {
.then((res) => {
this.$hideLoading()
if (res.code === 0) {
this.$u.toast(detail.upFlag == 0 ? '点赞成功' : '取消点赞成功')
this.$u.toast(this.detail.upFlag == 0 ? '点赞成功' : '取消点赞成功')
this.getDetail()
setTimeout(() => {
this.flagLike = false
@@ -189,10 +205,10 @@ export default {
this.$instance
.post(`/app/appvillagercirclecomment/delete?ids=${this.deleId}`)
.then((res) => {
if (res?.data) {
if (res.code == 0) {
this.deleShow = false
this.modalShow = false
this.deleId = ''
this.modalShow = false
this.getDetail()
}
})
@@ -203,8 +219,7 @@ export default {
},
deleShowBtn(item) {
// this.deleId = item.id
this.deleId = '999'
this.deleId = item.id
this.deleShow = true
},