Commit b9b8c0c0 by 李嘉林

改bug

parent c3ebe44f
...@@ -61,4 +61,8 @@ export default { ...@@ -61,4 +61,8 @@ export default {
getLiveQRCode(options) { getLiveQRCode(options) {
return requestGET(`${process.env.OLSHOP_URL}/liveBroadcastInfo/getLiveQRCode?id=${options}`); return requestGET(`${process.env.OLSHOP_URL}/liveBroadcastInfo/getLiveQRCode?id=${options}`);
}, },
// 获取直播配置
getConfigValueByConfigCode(options) {
return requestGET(`${process.env.OLSHOP_URL}/liveBroadcastInfo/getConfigValueByConfigCode`,options);
},
}; };
\ No newline at end of file
...@@ -156,14 +156,16 @@ export default { ...@@ -156,14 +156,16 @@ export default {
this.liveId = params.liveId; this.liveId = params.liveId;
let _this=this; let _this=this;
wx.getStorage({ wx.getStorage({
key: "sessionid", key: "sessionid",
success(res) { success(res) {
_this.loadingShare=true; _this.loadingShare=true;
}, },
fail(res) { fail(res) {
_this.loadingShare=false; _this.loadingShare=false;
} }
}); });
// 获取直播配置
this.getLivedConfig();
}, },
mounted() {}, mounted() {},
methods: { methods: {
...@@ -294,6 +296,14 @@ export default { ...@@ -294,6 +296,14 @@ export default {
this.$emit("toSendMsg", query); this.$emit("toSendMsg", query);
} }
} }
},
getLivedConfig(){
let configCode="LIVE_LIKE_ICON";
live.getConfigValueByConfigCode(configCode).then(res=>{
if(res.data.code==200&&res.data.data){
this.iconList=JSON.parse(res.data.data);
}
})
} }
} }
}; };
......
...@@ -2,7 +2,12 @@ ...@@ -2,7 +2,12 @@
<!-- 讲解商品 --> <!-- 讲解商品 -->
<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.productImgUrl" alt /> <img :src="item.productImgUrl" alt />
<p class="num">{{item.number}}</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>
...@@ -12,8 +17,11 @@ ...@@ -12,8 +17,11 @@
<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.productImgUrl" alt /> <img :src="item.productImgUrl" alt />
<p class="num">{{item.number}}</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>
<p class="price" v-if="item.minPrice">
<span></span> <span>{{item.minPrice}}</span>
</p>
</div> </div>
</div> </div>
</div> </div>
...@@ -30,38 +38,39 @@ export default { ...@@ -30,38 +38,39 @@ export default {
list: [], list: [],
// 讲解中浮动商品 // 讲解中浮动商品
fixedGoodsList: [], fixedGoodsList: [],
firstCom:true,//首次进入 firstCom: true //首次进入
}; };
}, },
watch: { watch: {
updateGoods() { updateGoods() {
if(this.firstCom==true){ console.log(this.goodsList,'---------------------------------46goodsList')
this.list=[]; if (this.firstCom == true) {
this.firstCom=false; this.list = [];
let arr1=[]; this.firstCom = false;
let arr2=[]; let arr1 = [];
this.goodsList.forEach((item,index)=>{ let arr2 = [];
if(item.upperScreenState==1){ this.goodsList.forEach((item, index) => {
if (item.upperScreenState == 1) {
arr1.push(item); arr1.push(item);
}else if(item.upperScreenState==0){ } else if (item.upperScreenState == 0) {
arr2.push(item); arr2.push(item);
} }
}); });
this.list=[...arr1,...arr2]; this.list = [...arr1, ...arr2];
setTimeout(() => { setTimeout(() => {
this.fixedGoodsList = arr1 ? arr1 : []; this.fixedGoodsList = arr1 ? arr1 : [];
this.showFixedGoods = true; this.showFixedGoods = true;
}, 5000); }, 5000);
}else{ } else {
if(!this.equalsObj(this.list, this.goodsList)){ if (!this.equalsObj(this.list, this.goodsList)) {
let newArr=[]; let newArr = [];
newArr=this.goodsList.filter((item,index)=>{ newArr = this.goodsList.filter((item, index) => {
if (item.upperScreenState==1) { if (item.upperScreenState == 1) {
return item; return item;
} }
}); });
if(newArr){ if (newArr) {
this.fixedGoodsList=newArr; this.fixedGoodsList = newArr;
} }
} }
} }
...@@ -212,16 +221,14 @@ img { ...@@ -212,16 +221,14 @@ img {
left: 12px; left: 12px;
.goodsList { .goodsList {
width: 22vw; width: 22vw;
height: 22vw;
border: 1px solid #ff3334; border: 1px solid #ff3334;
margin-right: 10px; margin-right: 10px;
overflow: hidden; overflow: hidden;
margin-bottom: 10px; margin-bottom: 10px;
position: relative; position: relative;
padding: 2px;
img { img {
width: 100%; width: 22vw;
height: 100%; height: 22vw;
object-fit: cover; object-fit: cover;
} }
.num { .num {
...@@ -237,12 +244,19 @@ img { ...@@ -237,12 +244,19 @@ img {
.explain { .explain {
position: absolute; position: absolute;
top: 0; top: 0;
right: 0; left: 0;
color: #fff; color: #fff;
font-size: 12px; font-size: 12px;
background: #ff3334; background: #ff3334;
padding: 2px 4px; padding: 2px 4px;
border-bottom-left-radius: 6px; border-bottom-right-radius: 6px;
}
.price{
width: 100%;
color: #FA7018;
background: #fff;
text-align: center;
font-size: 16px;
} }
} }
} }
......
...@@ -232,8 +232,8 @@ export default { ...@@ -232,8 +232,8 @@ export default {
color: #fff; color: #fff;
} }
.endTxt { .endTxt {
font-size: 30px; font-size: 34px;
font-weight: 400; font-weight: bold;
} }
.time { .time {
margin-top: 10px; margin-top: 10px;
...@@ -315,7 +315,7 @@ export default { ...@@ -315,7 +315,7 @@ export default {
} }
} }
.itemBorder{ .itemBorder{
border-bottom: 1px solid #b8b8b8; border-bottom: 0.5px solid #b8b8b8;
} }
} }
} }
......
...@@ -130,6 +130,9 @@ export default { ...@@ -130,6 +130,9 @@ export default {
}, },
computed: {}, computed: {},
onLoad(options) { onLoad(options) {
wx.setKeepScreenOn({
keepScreenOn: true
})
getNavbarInfo(res => { getNavbarInfo(res => {
console.log(res, "--------------------125"); console.log(res, "--------------------125");
this.navTop = res.navTop; this.navTop = res.navTop;
...@@ -560,8 +563,8 @@ img { ...@@ -560,8 +563,8 @@ img {
} }
} }
.toShop { .toShop {
background: #fb566d; background:linear-gradient(90deg,rgba(255,135,125,1),rgba(251,86,109,1));
padding: 0 4px; padding: 0 8px;
color: #fff; color: #fff;
font-size: 14px; font-size: 14px;
display: inline-block; display: inline-block;
......
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