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
b3a04444
Commit
b3a04444
authored
Mar 19, 2020
by
李嘉林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
讲解中商品
parent
3079d345
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
41 additions
and
19 deletions
+41
-19
src/components/livedModel/livedControls.vue
+4
-4
src/components/livedModel/livedExplainingCommodities.vue
+6
-4
src/components/livedModel/livedGoodsDia.vue
+8
-4
src/components/livedModel/livedIsEnded.vue
+10
-4
src/pages/lived/index.vue
+13
-3
No files found.
src/components/livedModel/livedControls.vue
View file @
b3a04444
...
...
@@ -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"
:
l
ist=
"list"
></livedExplainingCommodities>
<livedExplainingCommodities
v-if=
"info.liveBroadcastState==1&&list"
:updateGoods=
"updateGoods"
:
goodsL
ist=
"list"
></livedExplainingCommodities>
<!-- 商品列表弹层 -->
<livedGoodsDia
:showDia=
"showDia"
:updateVal=
"updateVal"
:
l
ist=
"list"
:
goodsL
ist=
"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
=
""
;
},
1
00
);
},
3
00
);
},
// 点击发送留言
toSend
()
{
...
...
src/components/livedModel/livedExplainingCommodities.vue
View file @
b3a04444
...
...
@@ -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
:
{},
...
...
src/components/livedModel/livedGoodsDia.vue
View file @
b3a04444
...
...
@@ -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
:
{
...
...
src/components/livedModel/livedIsEnded.vue
View file @
b3a04444
...
...
@@ -22,13 +22,13 @@
</div>
</div>
<!-- 商品列表 -->
<div
class=
"goodsList"
>
<div
class=
"goodsList"
v-if=
"list.length>0"
>
<div
class=
"tit"
>
<span>
商品列表
</span>
<span>
(
{{
goodsL
ist
.
length
}}
)
</span>
<span>
(
{{
l
ist
.
length
}}
)
</span>
</div>
<div
class=
"list"
>
<div
class=
"item"
v-for=
"(item,index) in
goodsL
ist"
:key=
"index"
>
<div
class=
"item"
v-for=
"(item,index) in
l
ist"
: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
{
goodsL
ist
:
[
l
ist
:
[
{
name
:
"产品名称产品名称产品名称产品名称产品名称"
,
img
:
...
...
@@ -84,6 +85,11 @@ export default {
]
};
},
watch
:{
updateGoods
(){
this
.
list
=
this
.
goodsList
;
}
},
components
:
{},
computed
:
{},
created
()
{},
...
...
src/pages/lived/index.vue
View file @
b3a04444
...
...
@@ -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
),
...
...
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