Commit b3200e6d by 李嘉林

修改

parent c8ab52ff
...@@ -91,6 +91,9 @@ export default { ...@@ -91,6 +91,9 @@ export default {
} else if (options.from && options.from == "livedToIndex") { } else if (options.from && options.from == "livedToIndex") {
//来自直播详情 //来自直播详情
this.page = decodeURIComponent(options.backpath); this.page = decodeURIComponent(options.backpath);
} else if (options.from && options.from == "livedBackShop") {
//直播页back到商城
this.page = decodeURIComponent(options.backpath);
} else if (options.from && options.from == "livedToGoodsInfo") { } else if (options.from && options.from == "livedToGoodsInfo") {
//从直播详情商品列表到商城商品详情 //从直播详情商品列表到商城商品详情
this.page = decodeURIComponent(options.backpath); this.page = decodeURIComponent(options.backpath);
......
...@@ -9,7 +9,11 @@ ...@@ -9,7 +9,11 @@
<!-- 自定义返回按钮 --> <!-- 自定义返回按钮 -->
<div class="customBack flex"> <div class="customBack flex">
<div class="backIcon"> <div class="backIcon">
<van-icon name="arrow-left" @click="back" /> <img
@click="back"
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAACWklEQVR4Xu3by2rVUBSH8fVXRCmiiCIWUbwi3tpSFRFFFBEviOKF4hv4BM51rO8htoPOfQZBHDgUBX0Gp58EVsGB5hx3drLXTk+mhxPy/bKSQC6yTb5ok/fbDGA2AYEFgDdm9sw38YOkF7k3N+QhAGwxs/d/xG90v5b0KidCOABgq8c//UfoUUnfcyGEAgC2efzjlsBlSZ9GBwBs9/hHLXFfzWxB0q9RAQA7PP7hhLAnktZzxTfrKX4IAHMe/2BC2IqktZzxxQGAnR5/v0R8UQBgl8ffLRVfDADY7fF3SsYXAQD2ePzt0vGDAwB7Pf5WhPhBAYB9ZrZqZjejxA8GAOz3PX8jUvwgAMABj78eLb53AGDex/5axPheAYCDvuevRo3vDQA45PFXIsf3AgAc9rG/HD0+OwBwxOMv1RCfFQA45mN/sZb4bADACY9frik+CwBw0sd+qbb4zgDAKd/zizXGdwIATnv8+VrjkwGAMz72Z2uO7wLwzsye1x6fBODX+m9jiE8FWDCzzy0Aa5JWJgCF+Tnptjjw0cwujAEhFeCemTVPbttOglVMQhJAs+envBKER0gGGAtCJ4AxIHQGqB0hC0DNCNkAakXIClAjQnaA2hB6AagJoTeAWhB6BagBoXeA6AiDAERGGAwgKsKgABERBgeIhlAEIBJCMYAoCEUBIiAUByiNEALgPxDeSnqZ8556GIApEX5Kal6/ybaEApgC4Yukc9nqI3wv8LeYllvu4/9oagMEOO4PX5r3in+YWRM/rg8mco5y6rrCnQNSQ1L/NwNIlRvL/34D8BMaUGntkTQAAAAASUVORK5CYII="
alt
/>
</div> </div>
<div class="shopName flex"> <div class="shopName flex">
<div class="img" v-if="shopLogo"> <div class="img" v-if="shopLogo">
...@@ -129,6 +133,7 @@ export default { ...@@ -129,6 +133,7 @@ export default {
this.$store.commit("setOfflineShopCode", params.offlineShopCode); this.$store.commit("setOfflineShopCode", params.offlineShopCode);
this.liveId = params.liveId; this.liveId = params.liveId;
this.shopName = params.shopName; this.shopName = params.shopName;
this.backPath = params.fromPagePath || "/";
this.shopLogo = DFSImg(params.shopLogo, 40, 40); this.shopLogo = DFSImg(params.shopLogo, 40, 40);
this.init(); this.init();
this.infoTiming = setInterval(() => { this.infoTiming = setInterval(() => {
...@@ -139,11 +144,11 @@ export default { ...@@ -139,11 +144,11 @@ export default {
onUnload() { onUnload() {
this.liveNoticeInfo.liveBroadcastState = -1; this.liveNoticeInfo.liveBroadcastState = -1;
this.liveNoticeInfo = {}; this.liveNoticeInfo = {};
this.liveNoticeInfo.boStreamRTMP=""; this.liveNoticeInfo.boStreamRTMP = "";
let videoContext= wx.createLivePlayerContext('liveDemo'); let videoContext = wx.createLivePlayerContext("liveDemo");
videoContext.stop(); videoContext.stop();
this.userEntry("OUT"); this.userEntry("OUT");
this.firstComing=true; this.firstComing = true;
if (this.infoTiming) { if (this.infoTiming) {
clearInterval(this.infoTiming); clearInterval(this.infoTiming);
} }
...@@ -184,9 +189,9 @@ export default { ...@@ -184,9 +189,9 @@ export default {
}); });
}, },
back() { back() {
// 改成reLaunch形式,需要h5给一个backurl进行返回跳转(解决页面返回还有声音问题) // 返回商城
wx.navigateBack({ wx.reLaunch({
delta: 1 url: `../index/main?from=livedBackShop&backpath=${this.backPath}`
}); });
}, },
toShop() { toShop() {
...@@ -234,7 +239,7 @@ export default { ...@@ -234,7 +239,7 @@ export default {
this.liveNoticeInfo.liveBroadcastState == 0 && this.liveNoticeInfo.liveBroadcastState == 0 &&
resData.liveState == "IN_LIVE" resData.liveState == "IN_LIVE"
) { ) {
console.log("未开始----直播中") console.log("未开始----直播中");
// 未开始且接口直播中/直播中且接口已结束 // 未开始且接口直播中/直播中且接口已结束
this.init(); this.init();
} else if ( } else if (
...@@ -243,7 +248,13 @@ export default { ...@@ -243,7 +248,13 @@ export default {
(this.liveNoticeInfo.liveBroadcastState == 1 && (this.liveNoticeInfo.liveBroadcastState == 1 &&
resData.liveState == "END_LIVE") resData.liveState == "END_LIVE")
) { ) {
console.log(this.liveNoticeInfo.liveBroadcastState,resData.liveState,this.firstComing,"直播中----结束","结束----结束") console.log(
this.liveNoticeInfo.liveBroadcastState,
resData.liveState,
this.firstComing,
"直播中----结束",
"结束----结束"
);
//直播结束且接口已结束 //直播结束且接口已结束
if (this.firstComing) { if (this.firstComing) {
this.firstComing = false; this.firstComing = false;
...@@ -321,6 +332,9 @@ export default { ...@@ -321,6 +332,9 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
img {
display: block;
}
.flex { .flex {
display: flex; display: flex;
} }
...@@ -390,8 +404,10 @@ export default { ...@@ -390,8 +404,10 @@ export default {
z-index: 2; z-index: 2;
align-items: center; align-items: center;
.backIcon { .backIcon {
color: #fff; img {
font-size: 20px; width: 18px;
height: 18px;
}
} }
.shopName { .shopName {
margin-left: 20px; margin-left: 20px;
......
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