升级小程序直播组件版本1.1.9
首页直播间列表点击全部进入一个直播bug 活动商品拼sku显示价格与库存为共享库存的bug 更改直播间id ->roomId 直播中开放轮询直播状态接口 直播回放不生效的问题,因为直播组件版本太低
This commit is contained in:
@ -19,7 +19,7 @@
|
||||
</view>
|
||||
<slot name="liveGoods">
|
||||
<view class="live-goods" v-if="detail.product.length">
|
||||
<view class="live-goods__item" v-for="(goods, index) in detail.product" :key="goods.id" v-if="index < 3">
|
||||
<view class="live-goods__item" v-for="(goods, index) in detail.product" :key="goods.goodsId" v-if="index < 3">
|
||||
<image class="live-goods__img" :src="goods.coverImgeUrl" mode=""></image>
|
||||
<view class="live-goods__price" v-if="index < 2">¥{{ goods.price }}</view>
|
||||
<view class="live-goods__mark" v-else>
|
||||
@ -95,10 +95,10 @@
|
||||
this.getLiveStatus();
|
||||
},
|
||||
mounted() {
|
||||
// let that = this;
|
||||
// timer = setInterval(() => {
|
||||
// that.getLiveStatus();
|
||||
// }, 60000);
|
||||
let that = this;
|
||||
timer = setInterval(() => {
|
||||
that.getLiveStatus();
|
||||
}, 60000);
|
||||
},
|
||||
beforeDestroy() {
|
||||
timer = null;
|
||||
@ -112,26 +112,26 @@
|
||||
},
|
||||
// 轮询liveStatus
|
||||
getLiveStatus() {
|
||||
// if (HAS_LIVE) {
|
||||
// let that = this;
|
||||
// let date = '';
|
||||
// if (that.detail.liveStatus == 102) {
|
||||
// date = that.$tools.dateFormat('mm-dd HH:MM', new Date(that.detail.starttime * 1000)).replace('-',
|
||||
// '/');
|
||||
// that.liveStatus['102'].title = '预告 ' + date;
|
||||
// }
|
||||
// livePlayer
|
||||
// .getLiveStatus({
|
||||
// room_id: that.detail.room_id
|
||||
// })
|
||||
// .then(res => {
|
||||
// // 101: 直播中, 102: 未开始, 103: 已结束, 104: 禁播, 105: 暂停中, 106: 异常,107:已过期
|
||||
// that.detail.liveStatus = res.liveStatus;
|
||||
// })
|
||||
// .catch(err => {
|
||||
// console.log('get live status', err);
|
||||
// });
|
||||
// }
|
||||
if (HAS_LIVE) {
|
||||
let that = this;
|
||||
let date = '';
|
||||
if (that.detail.liveStatus == 102) {
|
||||
// date = that.$tools.dateFormat('mm-dd HH:MM', new Date(that.detail.starttime * 1000)).replace('-',
|
||||
// '/');
|
||||
that.liveStatus['102'].title = '预告 ' ;
|
||||
}
|
||||
livePlayer
|
||||
.getLiveStatus({
|
||||
room_id: that.detail.roomId
|
||||
})
|
||||
.then(res => {
|
||||
// 101: 直播中, 102: 未开始, 103: 已结束, 104: 禁播, 105: 暂停中, 106: 异常,107:已过期
|
||||
that.detail.liveStatus = res.liveStatus;
|
||||
})
|
||||
.catch(err => {
|
||||
console.log('get live status', err);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -302,4 +302,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
Reference in New Issue
Block a user