Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mayi-mp-shop
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
程默
mayi-mp-shop
Commits
b3200e6d
Commit
b3200e6d
authored
Mar 21, 2020
by
李嘉林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
c8ab52ff
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
11 deletions
+30
-11
src/pages/index/index.vue
+3
-0
src/pages/lived/index.vue
+27
-11
No files found.
src/pages/index/index.vue
View file @
b3200e6d
...
...
@@ -91,6 +91,9 @@ export default {
}
else
if
(
options
.
from
&&
options
.
from
==
"livedToIndex"
)
{
//来自直播详情
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"
)
{
//从直播详情商品列表到商城商品详情
this
.
page
=
decodeURIComponent
(
options
.
backpath
);
...
...
src/pages/lived/index.vue
View file @
b3200e6d
...
...
@@ -9,7 +9,11 @@
<!-- 自定义返回按钮 -->
<div
class=
"customBack flex"
>
<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
class=
"shopName flex"
>
<div
class=
"img"
v-if=
"shopLogo"
>
...
...
@@ -129,6 +133,7 @@ export default {
this
.
$store
.
commit
(
"setOfflineShopCode"
,
params
.
offlineShopCode
);
this
.
liveId
=
params
.
liveId
;
this
.
shopName
=
params
.
shopName
;
this
.
backPath
=
params
.
fromPagePath
||
"/"
;
this
.
shopLogo
=
DFSImg
(
params
.
shopLogo
,
40
,
40
);
this
.
init
();
this
.
infoTiming
=
setInterval
(()
=>
{
...
...
@@ -139,11 +144,11 @@ export default {
onUnload
()
{
this
.
liveNoticeInfo
.
liveBroadcastState
=
-
1
;
this
.
liveNoticeInfo
=
{};
this
.
liveNoticeInfo
.
boStreamRTMP
=
""
;
let
videoContext
=
wx
.
createLivePlayerContext
(
'liveDemo'
);
this
.
liveNoticeInfo
.
boStreamRTMP
=
""
;
let
videoContext
=
wx
.
createLivePlayerContext
(
"liveDemo"
);
videoContext
.
stop
();
this
.
userEntry
(
"OUT"
);
this
.
firstComing
=
true
;
this
.
firstComing
=
true
;
if
(
this
.
infoTiming
)
{
clearInterval
(
this
.
infoTiming
);
}
...
...
@@ -184,9 +189,9 @@ export default {
});
},
back
()
{
//
改成reLaunch形式,需要h5给一个backurl进行返回跳转(解决页面返回还有声音问题)
wx
.
navigateBack
({
delta
:
1
//
返回商城
wx
.
reLaunch
({
url
:
`../index/main?from=livedBackShop&backpath=
${
this
.
backPath
}
`
});
},
toShop
()
{
...
...
@@ -234,7 +239,7 @@ export default {
this
.
liveNoticeInfo
.
liveBroadcastState
==
0
&&
resData
.
liveState
==
"IN_LIVE"
)
{
console
.
log
(
"未开始----直播中"
)
console
.
log
(
"未开始----直播中"
)
;
// 未开始且接口直播中/直播中且接口已结束
this
.
init
();
}
else
if
(
...
...
@@ -243,7 +248,13 @@ export default {
(
this
.
liveNoticeInfo
.
liveBroadcastState
==
1
&&
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
)
{
this
.
firstComing
=
false
;
...
...
@@ -321,6 +332,9 @@ export default {
</
script
>
<
style
lang=
"scss"
scoped
>
img
{
display
:
block
;
}
.flex
{
display
:
flex
;
}
...
...
@@ -390,8 +404,10 @@ export default {
z-index
:
2
;
align-items
:
center
;
.backIcon
{
color
:
#fff
;
font-size
:
20px
;
img
{
width
:
18px
;
height
:
18px
;
}
}
.shopName
{
margin-left
:
20px
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment