Fix(店铺):[#1968]店铺资讯的点赞调整
This commit is contained in:
+19
-14
@@ -260,21 +260,21 @@
|
||||
<view class="flex">
|
||||
<image
|
||||
v-if="!item.zanVo"
|
||||
:src="webUrl + '/page/hotel/zan-off.png'"
|
||||
:src="webUrl + '/page/hotel/zan-off-2.png'"
|
||||
class="zan-off-icon"
|
||||
@click="likeInfoItemHandle(item, index, 1)"
|
||||
@click="likeInfoItemHandle(item, index, item.zan + 1, 1)"
|
||||
/>
|
||||
<image
|
||||
v-else
|
||||
:src="webUrl + '/page/hotel/zan-on.png'"
|
||||
:src="webUrl + '/page/hotel/zan-on-2.png'"
|
||||
class="zan-on-icon"
|
||||
@click="likeInfoItemHandle(item, index, 0)"
|
||||
@click="likeInfoItemHandle(item, index, item.zan -1, 0)"
|
||||
/>
|
||||
<!-- <image
|
||||
:src="webUrl + '/20230803151302213857.png'"
|
||||
class="icon"
|
||||
/>
|
||||
<text class="seeNum-txt">{{ item.zan }}</text> -->
|
||||
<text
|
||||
v-show="item.zan > 0"
|
||||
:class="item.zanVo ? 'on' : ''"
|
||||
class="seeNum-txt"
|
||||
>{{ item.zan }}</text>
|
||||
</view>
|
||||
<view v-if="isMyInn" class="flex more-btn" @click="toggleMoreHandle(index)">
|
||||
<image
|
||||
@@ -930,15 +930,15 @@ export default {
|
||||
}, 3000)
|
||||
})
|
||||
},
|
||||
likeInfoItemHandle(item, index, value) {
|
||||
likeInfoItemHandle(item, index, value, voValue) {
|
||||
getHotelNewsZan(item.id).then(res => {
|
||||
const { success } = res
|
||||
if (success) {
|
||||
this.$dialog.toast({
|
||||
mes: '操作成功!'
|
||||
})
|
||||
this.$set(this.infoArray[index], 'zanVo', value)
|
||||
// this.fetchInnInfoList()
|
||||
this.$set(this.infoArray[index], 'zan', value)
|
||||
this.$set(this.infoArray[index], 'zanVo', voValue)
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -1388,13 +1388,18 @@ export default {
|
||||
margin: 0 8rpx 0 0;
|
||||
}
|
||||
.zan-off-icon {
|
||||
width: 138rpx;
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
.zan-on-icon {
|
||||
width: 80rpx;
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
.seeNum-txt {
|
||||
&.on {
|
||||
color: #D81E06;
|
||||
}
|
||||
}
|
||||
.more-btn {
|
||||
position: relative;
|
||||
.more-wrapper {
|
||||
|
||||
Reference in New Issue
Block a user