From 7415591ae03c788bb26fad787a3601e01b9ba40e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E4=BA=8E=E8=82=96=E7=A3=8A?= <18851179580@163.com>
Date: Tue, 16 Dec 2025 16:50:35 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AE=B2=E8=A7=A3=E4=B8=AD?=
=?UTF-8?q?=E5=95=86=E5=93=81=E6=98=BE=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../live/pull/components/goods/goods.vue | 22 +++++--------------
.../components/live-content/live-content.vue | 6 +----
2 files changed, 6 insertions(+), 22 deletions(-)
diff --git a/pages/plugins/live/pull/components/goods/goods.vue b/pages/plugins/live/pull/components/goods/goods.vue
index 3049c6aa..c822e092 100644
--- a/pages/plugins/live/pull/components/goods/goods.vue
+++ b/pages/plugins/live/pull/components/goods/goods.vue
@@ -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
/**
diff --git a/pages/plugins/live/pull/components/live-content/live-content.vue b/pages/plugins/live/pull/components/live-content/live-content.vue
index 46aa32ac..699c36a9 100644
--- a/pages/plugins/live/pull/components/live-content/live-content.vue
+++ b/pages/plugins/live/pull/components/live-content/live-content.vue
@@ -21,7 +21,7 @@
- {{ online_count }}
+ {{ live_data.online_count || 0 }}
@@ -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);
},