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
b9b8c0c0
Commit
b9b8c0c0
authored
Mar 24, 2020
by
李嘉林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
改bug
parent
c3ebe44f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
70 additions
and
38 deletions
+70
-38
src/api/live.js
+5
-0
src/components/livedModel/livedControls.vue
+18
-8
src/components/livedModel/livedExplainingCommodities.vue
+39
-25
src/components/livedModel/livedIsEnded.vue
+3
-3
src/pages/lived/index.vue
+5
-2
No files found.
src/api/live.js
View file @
b9b8c0c0
...
@@ -61,4 +61,8 @@ export default {
...
@@ -61,4 +61,8 @@ export default {
getLiveQRCode
(
options
)
{
getLiveQRCode
(
options
)
{
return
requestGET
(
`
${
process
.
env
.
OLSHOP_URL
}
/liveBroadcastInfo/getLiveQRCode?id=
${
options
}
`
);
return
requestGET
(
`
${
process
.
env
.
OLSHOP_URL
}
/liveBroadcastInfo/getLiveQRCode?id=
${
options
}
`
);
},
},
// 获取直播配置
getConfigValueByConfigCode
(
options
)
{
return
requestGET
(
`
${
process
.
env
.
OLSHOP_URL
}
/liveBroadcastInfo/getConfigValueByConfigCode`
,
options
);
},
};
};
\ No newline at end of file
src/components/livedModel/livedControls.vue
View file @
b9b8c0c0
...
@@ -156,14 +156,16 @@ export default {
...
@@ -156,14 +156,16 @@ export default {
this
.
liveId
=
params
.
liveId
;
this
.
liveId
=
params
.
liveId
;
let
_this
=
this
;
let
_this
=
this
;
wx
.
getStorage
({
wx
.
getStorage
({
key
:
"sessionid"
,
key
:
"sessionid"
,
success
(
res
)
{
success
(
res
)
{
_this
.
loadingShare
=
true
;
_this
.
loadingShare
=
true
;
},
},
fail
(
res
)
{
fail
(
res
)
{
_this
.
loadingShare
=
false
;
_this
.
loadingShare
=
false
;
}
}
});
});
// 获取直播配置
this
.
getLivedConfig
();
},
},
mounted
()
{},
mounted
()
{},
methods
:
{
methods
:
{
...
@@ -294,6 +296,14 @@ export default {
...
@@ -294,6 +296,14 @@ export default {
this
.
$emit
(
"toSendMsg"
,
query
);
this
.
$emit
(
"toSendMsg"
,
query
);
}
}
}
}
},
getLivedConfig
(){
let
configCode
=
"LIVE_LIKE_ICON"
;
live
.
getConfigValueByConfigCode
(
configCode
).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
){
this
.
iconList
=
JSON
.
parse
(
res
.
data
.
data
);
}
})
}
}
}
}
};
};
...
...
src/components/livedModel/livedExplainingCommodities.vue
View file @
b9b8c0c0
...
@@ -2,7 +2,12 @@
...
@@ -2,7 +2,12 @@
<!-- 讲解商品 -->
<!-- 讲解商品 -->
<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.productImgUrl"
alt
/>
<img
:src=
"item.productImgUrl"
alt
/>
<p
class=
"num"
>
{{
item
.
number
}}
</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>
...
@@ -12,8 +17,11 @@
...
@@ -12,8 +17,11 @@
<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.productImgUrl"
alt
/>
<img
:src=
"item.productImgUrl"
alt
/>
<
p
class=
"num"
>
{{
item
.
number
}}
</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>
<p
class=
"price"
v-if=
"item.minPrice"
>
<span>
¥
</span>
<span>
{{
item
.
minPrice
}}
</span>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -30,38 +38,39 @@ export default {
...
@@ -30,38 +38,39 @@ export default {
list
:
[],
list
:
[],
// 讲解中浮动商品
// 讲解中浮动商品
fixedGoodsList
:
[],
fixedGoodsList
:
[],
firstCom
:
true
,
//首次进入
firstCom
:
true
//首次进入
};
};
},
},
watch
:
{
watch
:
{
updateGoods
()
{
updateGoods
()
{
if
(
this
.
firstCom
==
true
){
console
.
log
(
this
.
goodsList
,
'---------------------------------46goodsList'
)
this
.
list
=
[];
if
(
this
.
firstCom
==
true
)
{
this
.
firstCom
=
false
;
this
.
list
=
[];
let
arr1
=
[];
this
.
firstCom
=
false
;
let
arr2
=
[];
let
arr1
=
[];
this
.
goodsList
.
forEach
((
item
,
index
)
=>
{
let
arr2
=
[];
if
(
item
.
upperScreenState
==
1
){
this
.
goodsList
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
upperScreenState
==
1
)
{
arr1
.
push
(
item
);
arr1
.
push
(
item
);
}
else
if
(
item
.
upperScreenState
==
0
)
{
}
else
if
(
item
.
upperScreenState
==
0
)
{
arr2
.
push
(
item
);
arr2
.
push
(
item
);
}
}
});
});
this
.
list
=
[...
arr1
,
...
arr2
];
this
.
list
=
[...
arr1
,
...
arr2
];
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
fixedGoodsList
=
arr1
?
arr1
:
[];
this
.
fixedGoodsList
=
arr1
?
arr1
:
[];
this
.
showFixedGoods
=
true
;
this
.
showFixedGoods
=
true
;
},
5000
);
},
5000
);
}
else
{
}
else
{
if
(
!
this
.
equalsObj
(
this
.
list
,
this
.
goodsList
))
{
if
(
!
this
.
equalsObj
(
this
.
list
,
this
.
goodsList
))
{
let
newArr
=
[];
let
newArr
=
[];
newArr
=
this
.
goodsList
.
filter
((
item
,
index
)
=>
{
newArr
=
this
.
goodsList
.
filter
((
item
,
index
)
=>
{
if
(
item
.
upperScreenState
==
1
)
{
if
(
item
.
upperScreenState
==
1
)
{
return
item
;
return
item
;
}
}
});
});
if
(
newArr
)
{
if
(
newArr
)
{
this
.
fixedGoodsList
=
newArr
;
this
.
fixedGoodsList
=
newArr
;
}
}
}
}
}
}
...
@@ -212,16 +221,14 @@ img {
...
@@ -212,16 +221,14 @@ img {
left
:
12px
;
left
:
12px
;
.goodsList
{
.goodsList
{
width
:
22vw
;
width
:
22vw
;
height
:
22vw
;
border
:
1px
solid
#ff3334
;
border
:
1px
solid
#ff3334
;
margin-right
:
10px
;
margin-right
:
10px
;
overflow
:
hidden
;
overflow
:
hidden
;
margin-bottom
:
10px
;
margin-bottom
:
10px
;
position
:
relative
;
position
:
relative
;
padding
:
2px
;
img
{
img
{
width
:
100%
;
width
:
22vw
;
height
:
100%
;
height
:
22vw
;
object-fit
:
cover
;
object-fit
:
cover
;
}
}
.num
{
.num
{
...
@@ -237,12 +244,19 @@ img {
...
@@ -237,12 +244,19 @@ img {
.explain
{
.explain
{
position
:
absolute
;
position
:
absolute
;
top
:
0
;
top
:
0
;
righ
t
:
0
;
lef
t
:
0
;
color
:
#fff
;
color
:
#fff
;
font-size
:
12px
;
font-size
:
12px
;
background
:
#ff3334
;
background
:
#ff3334
;
padding
:
2px
4px
;
padding
:
2px
4px
;
border-bottom-left-radius
:
6px
;
border-bottom-right-radius
:
6px
;
}
.price
{
width
:
100%
;
color
:
#FA7018
;
background
:
#fff
;
text-align
:
center
;
font-size
:
16px
;
}
}
}
}
}
}
...
...
src/components/livedModel/livedIsEnded.vue
View file @
b9b8c0c0
...
@@ -232,8 +232,8 @@ export default {
...
@@ -232,8 +232,8 @@ export default {
color
:
#fff
;
color
:
#fff
;
}
}
.endTxt
{
.endTxt
{
font-size
:
3
0
px
;
font-size
:
3
4
px
;
font-weight
:
400
;
font-weight
:
bold
;
}
}
.time
{
.time
{
margin-top
:
10px
;
margin-top
:
10px
;
...
@@ -315,7 +315,7 @@ export default {
...
@@ -315,7 +315,7 @@ export default {
}
}
}
}
.itemBorder
{
.itemBorder
{
border-bottom
:
1
px
solid
#b8b8b8
;
border-bottom
:
0.5
px
solid
#b8b8b8
;
}
}
}
}
}
}
...
...
src/pages/lived/index.vue
View file @
b9b8c0c0
...
@@ -130,6 +130,9 @@ export default {
...
@@ -130,6 +130,9 @@ export default {
},
},
computed
:
{},
computed
:
{},
onLoad
(
options
)
{
onLoad
(
options
)
{
wx
.
setKeepScreenOn
({
keepScreenOn
:
true
})
getNavbarInfo
(
res
=>
{
getNavbarInfo
(
res
=>
{
console
.
log
(
res
,
"--------------------125"
);
console
.
log
(
res
,
"--------------------125"
);
this
.
navTop
=
res
.
navTop
;
this
.
navTop
=
res
.
navTop
;
...
@@ -560,8 +563,8 @@ img {
...
@@ -560,8 +563,8 @@ img {
}
}
}
}
.toShop
{
.toShop
{
background
:
#fb566d
;
background
:
linear-gradient
(
90deg
,
rgba
(
255
,
135
,
125
,
1
),
rgba
(
251
,
86
,
109
,
1
))
;
padding
:
0
4
px
;
padding
:
0
8
px
;
color
:
#fff
;
color
:
#fff
;
font-size
:
14px
;
font-size
:
14px
;
display
:
inline-block
;
display
:
inline-block
;
...
...
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