Commit b3a04444 by 李嘉林

讲解中商品

parent 3079d345
......@@ -10,14 +10,14 @@
<!-- 评论层 -->
<livedIsMsg v-if="info.liveBroadcastState==1&&guestBookList" :guestBookList="guestBookList" :updateVal="updateVal"></livedIsMsg>
<!-- 带货商品层 -->
<livedExplainingCommodities v-if="info.liveBroadcastState==1&&list" :updateGoods="updateGoods" :list="list"></livedExplainingCommodities>
<livedExplainingCommodities v-if="info.liveBroadcastState==1&&list" :updateGoods="updateGoods" :goodsList="list"></livedExplainingCommodities>
<!-- 商品列表弹层 -->
<livedGoodsDia
:showDia="showDia"
:updateVal="updateVal"
:list="list"
:goodsList="list"
:updateGoods="updateGoods"
v-if="list&&showDia"
v-if="list"
@changeStatus="changeStatus"
></livedGoodsDia>
<!-- 底部控制层 -->
......@@ -225,7 +225,7 @@ export default {
setTimeout(() => {
this.isSend = false;
this.sendVal = "";
}, 100);
}, 300);
},
// 点击发送留言
toSend() {
......
......@@ -3,16 +3,16 @@
<div class="livedExplainingCommodities">
<div class="goods clearfix" v-if="!showFixedGoods">
<div class="goodsList" :class="{isEC:item.upperScreenState==1}" v-for="(item,index) in list" :key="index">
<img :src="item.img" alt />
<p class="num">{{item.id}}</p>
<img :src="item.productImgUrl" alt />
<p class="num">{{item.number}}</p>
<div class="explain" v-if="item.upperScreenState==1">讲解中</div>
</div>
</div>
<!-- 左上角展示讲解中商品 -->
<div class="fixedGoods" v-else-if="showFixedGoods&&fixedGoodsList&&fixedGoodsList.length>0">
<div class="goodsList" v-for="(item,index) in fixedGoodsList" :key="index">
<img :src="item.img" alt />
<p class="num">{{item.id}}</p>
<img :src="item.productImgUrl" alt />
<p class="num">{{item.number}}</p>
<div class="explain" v-if="item.upperScreenState==1">讲解中</div>
</div>
</div>
......@@ -60,10 +60,12 @@ export default {
return item;
}
});
if(newArr){
this.fixedGoodsList=newArr;
}
}
}
}
},
components: {},
computed: {},
......
......@@ -68,15 +68,19 @@ export default {
components: {
livedSelectionSpe
},
watch:{
updateGoods(){
this.list=this.goodsList;
this.list.forEach((item, index) => {
item.minPrice = Number(item.minPrice);
});
},
},
computed: {},
created() {},
onLoad(options) {
let params = JSON.parse(options.params);
this.liveId = params.liveId;
this.list = this.goodsList;
this.list.forEach((item, index) => {
item.minPrice = Number(item.minPrice);
});
},
mounted() {},
methods: {
......
......@@ -22,13 +22,13 @@
</div>
</div>
<!-- 商品列表 -->
<div class="goodsList">
<div class="goodsList" v-if="list.length>0">
<div class="tit">
<span>商品列表</span>
<span>({{goodsList.length}})</span>
<span>({{list.length}})</span>
</div>
<div class="list">
<div class="item" v-for="(item,index) in goodsList" :key="index">
<div class="item" v-for="(item,index) in list" :key="index">
<div class="img">
<img :src="item.img" alt />
</div>
......@@ -53,10 +53,11 @@
<script type="text/ecmascript-6">
export default {
props:["updateGoods","goodsList"],
name: "",
data() {
return {
goodsList: [
list: [
{
name: "产品名称产品名称产品名称产品名称产品名称",
img:
......@@ -84,6 +85,11 @@ export default {
]
};
},
watch:{
updateGoods(){
this.list=this.goodsList;
}
},
components: {},
computed: {},
created() {},
......
......@@ -46,7 +46,7 @@
<live-player
v-if="liveNoticeInfo.liveBroadcastState==1&&liveNoticeInfo.boStreamRTMP"
class="livePlayer"
:src="liveNoticeInfo.boStreamRTMP"
:src="'rtmp://live.mayi888.com/xgy/127?auth_key=1584633600000-0-0-ac39474385b37a7adac070d15b0bb5de'"
mode="RTC"
autoplay
@error="error"
......@@ -150,6 +150,10 @@ export default {
this.timingGetInfo();
}
this.getGoodsList();
if(this.liveNoticeInfo.liveBroadcastState >=2){
// 调直播结束
this.endLived();
}
}
});
},
......@@ -228,18 +232,24 @@ export default {
live.getListByLiveBroadcastId(id).then(res=>{
if(res.data.code==200){
this.goodsList=[];
this.updateGoods = Math.random();
let arr=[];
if(res.data.data.length>0){
this.goodsList=res.data.data.forEach((item,index)=>{
if(item.productImgUrl){
item.productImgUrl=DFSImg(item.productImgUrl);
}
arr.push(item);
})
console.log(this.goodsList,'--------------238')
this.goodsList=arr;
this.updateGoods = Math.random();
}
}
})
},
// 直播结束数据
endLived(){
},
userEntry(type) {
let query = {
liveBroadcastId: Number(this.liveId),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment