修改讲解中商品显示
parent
616a23b08d
commit
7415591ae0
|
|
@ -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
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue