修改讲解中商品显示

master
于肖磊 2025-12-16 16:50:35 +08:00
parent 616a23b08d
commit 7415591ae0
2 changed files with 6 additions and 22 deletions

View File

@ -264,6 +264,11 @@ export default {
const new_data = res.data;
if (new_data.code == 0) {
this.good_list = new_data.data;
// id
const explain_data = new_data.data.filter(item => item.live_room_goods_is_explain == 1);
if (explain_data.length > 0) {
this.explanation_id = explain_data[0].id;
}
}
},
fail: () => {
@ -292,23 +297,6 @@ export default {
},
//#endregion
//#region
/**
* 控制商品讲解状态
* 点击商品时切换其讲解状态已讲解则取消讲解未讲解则设为讲解中
* @param {Object} e 事件对象
*/
explanation(e) {
//
const id = e.currentTarget.dataset.id;
if (id != null && id != this.explanation_id) {
this.explanation_id = id;
} else {
this.explanation_id = '';
}
},
//#endregion
//#region
// #ifdef APP-NVUE
/**

View File

@ -21,7 +21,7 @@
</view>
</view>
<view class="ml-5 people-number flex-row align-c jc-c">
<text class="cr-f size-10">{{ online_count }}</text>
<text class="cr-f size-10">{{ live_data.online_count || 0 }}</text>
</view>
<view class="viewer-back ml-5 flex-row align-c jc-c " @tap="live_back">
<component-icon propName="close-fillup" class="viewer-back-icon" propSize="50rpx" propColor="#fff"></component-icon>
@ -229,8 +229,6 @@
//
casual_like_count: 0,
like_timer: null,
//
online_count: 0,
//
live_data: {},
userAvatar: '/static/images/common/user.png',
@ -667,8 +665,6 @@
this.live_data = new_value;
//
this.like_count = new_value.like_count;
//
this.online_count = new_value.online_count;
//
this.$emit('liveStatus', new_value.status);
},