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
a234435d
Commit
a234435d
authored
Apr 08, 2020
by
程智春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
直播
parent
36fbe921
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
68 additions
and
19 deletions
+68
-19
src/components/livedModel/livedControls.vue
+1
-1
src/components/livedModel/livedExplainingCommodities.vue
+10
-13
src/components/livedModel/livedGoodsDia.vue
+3
-3
src/components/livedModel/livedShareDia.vue
+2
-1
src/components/livedModel/livedposterDia.vue
+51
-0
src/pages/live/index.vue
+1
-1
static/images/bofang.png
+0
-0
No files found.
src/components/livedModel/livedControls.vue
View file @
a234435d
...
...
@@ -9,7 +9,7 @@
</div>
<!-- 评论层 -->
<livedIsMsg
v-if=
"
info.liveBroadcastState
<2
&&
guestBookList
"
v-if=
"
(info.liveBroadcastState!=2 || info.liveBroadcastState!=4)
&&guestBookList"
:guestBookList=
"guestBookList"
:updateVal=
"updateVal"
:isSend=
"isSend"
...
...
src/components/livedModel/livedExplainingCommodities.vue
View file @
a234435d
...
...
@@ -18,13 +18,11 @@
<!-- 左上角展示讲解中商品 -->
<div
class=
"fixedGoods"
v-else-if=
"showFixedGoods&&fixedGoodsList&&fixedGoodsList.length>0"
>
<div
class=
"goodsList"
v-for=
"(item,index) in fixedGoodsList"
:key=
"index"
@
click=
"toGoodsInfo(item)"
>
<!--
<img
:src=
"item.productImgUrl"
alt
/>
-->
<image
:src=
"item.productImgUrl"
mode=
"aspectFill"
alt=
""
></image>
<!--
<p
class=
"num"
>
{{
item
.
number
}}
</p>
-->
<div
class=
"explain"
v-if=
"item.upperScreenState==1"
>
讲解中
</div>
<p
class=
"price"
v-if=
"item.minPrice"
>
<image
:src=
"item.productImgUrl"
mode=
"aspectFill"
alt=
""
></image>
<div
class=
"price"
v-if=
"item.minPrice"
>
<span>
¥
</span>
<span>
{{
item
.
minPrice
}}
</span>
</
p
>
</
div
>
</div>
</div>
</div>
...
...
@@ -217,7 +215,6 @@ img {
image
{
width
:
30vw
;
height
:
30vw
;
object-fit
:
cover
;
}
.num
{
position
:
absolute
;
...
...
@@ -249,17 +246,15 @@ img {
top
:
14vh
;
left
:
12px
;
.goodsList
{
width
:
22vw
;
//
border
:
1px
solid
#ff3334
;
margin-right
:
10
px
;
width
:
78px
;
margin-bottom
:
15px
;
border-radius
:
2
px
;
overflow
:
hidden
;
margin-bottom
:
10px
;
position
:
relative
;
border-radius
:
2px
;
background-color
:
white
;
image
{
width
:
22vw
;
height
:
28vw
;
object-fit
:
cover
;
height
:
78px
;
}
.num
{
position
:
absolute
;
...
...
@@ -286,7 +281,9 @@ img {
color
:
#FA7018
;
background
:
#fff
;
text-align
:
center
;
height
:
21px
;
font-size
:
16px
;
line-height
:
17px
;
}
}
}
...
...
src/components/livedModel/livedGoodsDia.vue
View file @
a234435d
...
...
@@ -22,13 +22,13 @@
<image
v-if=
"item.productImgUrl"
:src=
"item.productImgUrl"
mode=
"aspectFill"
alt=
""
></image>
</div>
<div
class=
"info"
>
<
p
class=
"name line-clamp2"
>
{{
item
.
productName
}}
</p
>
<
div
class=
"name line-clamp2"
>
{{
item
.
productName
}}
</div
>
<div
class=
"bottom"
>
<div
class=
"price"
>
<
p
>
<
div
>
<span>
¥
</span>
<span>
{{
item
.
minPrice
}}
</span>
</
p
>
</
div
>
<!--
<p
class=
"del"
>
<span>
¥
</span>
<span>
{{
999
}}
</span>
...
...
src/components/livedModel/livedShareDia.vue
View file @
a234435d
...
...
@@ -92,7 +92,7 @@ export default {
}
let
newTime
=
new
Date
(
this
.
info
.
startTime
.
replace
(
/-/g
,
"/"
));
query
.
livedTime
=
`
${
newTime
.
getMonth
()
+
1
}
月
${
newTime
.
getDate
()
-
1
}
日
${
newTime
.
getHours
()}
:
${
newTime
.
getMinutes
()}
`
;
1
}
日
${
Number
(
newTime
.
getHours
())
<
10
?
'0'
+
Number
(
newTime
.
getHours
())
:
newTime
.
getHours
()}
:
${
Number
(
newTime
.
getMinutes
())
<
10
?
'0'
+
Number
(
newTime
.
getMinutes
())
:
newTime
.
getMinutes
()}
`
;
let
qrCode
=
DFSImg
(
res
.
data
.
data
);
if
(
qrCode
.
indexOf
(
"https"
)
==
-
1
)
{
query
.
qrCode
=
qrCode
.
replace
(
"http"
,
"https"
);
...
...
@@ -124,6 +124,7 @@ export default {
wx
.
getStorage
({
key
:
"sessionid"
,
success
(
res
)
{
console
.
log
(
'1111111111'
)
_this
.
toCreatePoster
();
},
fail
(
res
)
{
...
...
src/components/livedModel/livedposterDia.vue
View file @
a234435d
...
...
@@ -20,6 +20,7 @@
<
script
type=
"text/ecmascript-6"
>
import
live
from
"@/api/live"
;
import
{
DFSImg
}
from
'../../utils/common.js'
export
default
{
props
:
[
"showPosterDia"
,
"posterInfo"
,
"userInfo"
],
name
:
""
,
...
...
@@ -99,6 +100,56 @@ export default {
ctx
.
setFontSize
(
15
);
ctx
.
fillText
(
info
.
nickName
,
70
*
bili
,
410
*
bili
);
//
ctx
.
setFillStyle
(
"#FDC330"
);
ctx
.
fillRect
(
0
,
330
*
bili
,
310
*
bili
,
40
*
bili
);
this
.
saveThe
(
'https://mayi-newshop.oss-cn-shanghai.aliyuncs.com/public/png/1eaa8c87-e20a-4b5b-8c21-596dac8fa093.png'
,
path
=>
{
ctx
.
drawImage
(
path
,
20
*
bili
,
340
*
bili
,
26
*
bili
,
20
*
bili
);
ctx
.
save
()
ctx
.
setTextAlign
(
"left"
);
ctx
.
setFillStyle
(
"#3F2F00"
);
ctx
.
setFontSize
(
14
);
ctx
.
fillText
(
this
.
info
.
livedStatus
==
1
?
'直播中'
:
'直播预告'
,
52
*
bili
,
355
*
bili
);
if
(
this
.
info
.
livedStatus
==
0
){
this
.
saveThe
(
'https://mayi-newshop.oss-cn-shanghai.aliyuncs.com/public/png/1a33da04-8224-4980-9299-a4a8e32be678.png'
,
path
=>
{
ctx
.
drawImage
(
path
,
160
*
bili
,
340
*
bili
,
20
*
bili
,
20
*
bili
);
ctx
.
save
()
ctx
.
setTextAlign
(
"left"
);
ctx
.
setFillStyle
(
"#3F2F00"
);
ctx
.
setFontSize
(
14
);
ctx
.
fillText
(
this
.
info
.
livedTime
,
188
*
bili
,
355
*
bili
);
})
}
})
// ctx.drawImage(require('../../../static/images/bofang.png'), 20 * bili , 340 * bili, 26 * bili, 20 * bili);
// ctx.save()
// ctx.setTextAlign("left");
// ctx.setFillStyle("#3F2F00");
// ctx.setFontSize(14);
// ctx.fillText(this.info.livedStatus == 1 ? '直播中' : '直播预告', 52 * bili , 355 * bili);
// if(this.info.livedStatus == 0){
// ctx.drawImage(require('../../../static/images/lishi.png'), 160 * bili , 340 * bili, 20 * bili, 20 * bili);
// ctx.save()
// ctx.setTextAlign("left");
// ctx.setFillStyle("#3F2F00");
// ctx.setFontSize(14);
// ctx.fillText(this.info.livedTime, 188 * bili , 355 * bili);
// }
// ctx.fill()
ctx
.
setTextAlign
(
"left"
);
ctx
.
setFillStyle
(
"#3F2F00"
);
ctx
.
setFontSize
(
14
);
...
...
src/pages/live/index.vue
View file @
a234435d
...
...
@@ -218,7 +218,7 @@ export default {
isDetailControlLock
:
true
,
mirror
:
fals
e
,
mirror
:
tru
e
,
}
},
watch
:{
...
...
static/images/bofang.png
0 → 100644
View file @
a234435d
4.08 KB
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