Commit b3a04444 by 李嘉林

讲解中商品

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