Fix(店铺):[#1968]店铺资讯的点赞调整

This commit is contained in:
lifizer
2024-07-17 21:23:38 +08:00
parent 186b78d426
commit 712d210d81
+19 -14
View File
@@ -260,21 +260,21 @@
<view class="flex"> <view class="flex">
<image <image
v-if="!item.zanVo" v-if="!item.zanVo"
:src="webUrl + '/page/hotel/zan-off.png'" :src="webUrl + '/page/hotel/zan-off-2.png'"
class="zan-off-icon" class="zan-off-icon"
@click="likeInfoItemHandle(item, index, 1)" @click="likeInfoItemHandle(item, index, item.zan + 1, 1)"
/> />
<image <image
v-else v-else
:src="webUrl + '/page/hotel/zan-on.png'" :src="webUrl + '/page/hotel/zan-on-2.png'"
class="zan-on-icon" class="zan-on-icon"
@click="likeInfoItemHandle(item, index, 0)" @click="likeInfoItemHandle(item, index, item.zan -1, 0)"
/> />
<!-- <image <text
:src="webUrl + '/20230803151302213857.png'" v-show="item.zan > 0"
class="icon" :class="item.zanVo ? 'on' : ''"
/> class="seeNum-txt"
<text class="seeNum-txt">{{ item.zan }}</text> --> >{{ item.zan }}</text>
</view> </view>
<view v-if="isMyInn" class="flex more-btn" @click="toggleMoreHandle(index)"> <view v-if="isMyInn" class="flex more-btn" @click="toggleMoreHandle(index)">
<image <image
@@ -930,15 +930,15 @@ export default {
}, 3000) }, 3000)
}) })
}, },
likeInfoItemHandle(item, index, value) { likeInfoItemHandle(item, index, value, voValue) {
getHotelNewsZan(item.id).then(res => { getHotelNewsZan(item.id).then(res => {
const { success } = res const { success } = res
if (success) { if (success) {
this.$dialog.toast({ this.$dialog.toast({
mes: '操作成功!' mes: '操作成功!'
}) })
this.$set(this.infoArray[index], 'zanVo', value) this.$set(this.infoArray[index], 'zan', value)
// this.fetchInnInfoList() this.$set(this.infoArray[index], 'zanVo', voValue)
} }
}) })
} }
@@ -1388,13 +1388,18 @@ export default {
margin: 0 8rpx 0 0; margin: 0 8rpx 0 0;
} }
.zan-off-icon { .zan-off-icon {
width: 138rpx; width: 40rpx;
height: 40rpx; height: 40rpx;
} }
.zan-on-icon { .zan-on-icon {
width: 80rpx; width: 40rpx;
height: 40rpx; height: 40rpx;
} }
.seeNum-txt {
&.on {
color: #D81E06;
}
}
.more-btn { .more-btn {
position: relative; position: relative;
.more-wrapper { .more-wrapper {