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 @@
...
@@ -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"
:
l
ist=
"list"
></livedExplainingCommodities>
<livedExplainingCommodities
v-if=
"info.liveBroadcastState==1&&list"
:updateGoods=
"updateGoods"
:
goodsL
ist=
"list"
></livedExplainingCommodities>
<!-- 商品列表弹层 -->
<!-- 商品列表弹层 -->
<livedGoodsDia
<livedGoodsDia
:showDia=
"showDia"
:showDia=
"showDia"
:updateVal=
"updateVal"
:updateVal=
"updateVal"
:
l
ist=
"list"
:
goodsL
ist=
"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
=
""
;
},
1
00
);
},
3
00
);
},
},
// 点击发送留言
// 点击发送留言
toSend
()
{
toSend
()
{
...
...
src/components/livedModel/livedExplainingCommodities.vue
View file @
b3a04444
...
@@ -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
:
{},
...
...
src/components/livedModel/livedGoodsDia.vue
View file @
b3a04444
...
@@ -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
:
{
...
...
src/components/livedModel/livedIsEnded.vue
View file @
b3a04444
...
@@ -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>
(
{{
goodsL
ist
.
length
}}
)
</span>
<span>
(
{{
l
ist
.
length
}}
)
</span>
</div>
</div>
<div
class=
"list"
>
<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"
>
<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
{
goodsL
ist
:
[
l
ist
:
[
{
{
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
()
{},
...
...
src/pages/lived/index.vue
View file @
b3a04444
...
@@ -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
),
...
...
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