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
70a9fe33
Commit
70a9fe33
authored
Mar 26, 2020
by
李嘉林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
讲解商品可进入商品详情
parent
1d8dcb10
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
2 deletions
+23
-2
src/components/livedModel/livedExplainingCommodities.vue
+22
-1
src/components/livedModel/livedIsEnded.vue
+1
-1
No files found.
src/components/livedModel/livedExplainingCommodities.vue
View file @
70a9fe33
...
...
@@ -7,6 +7,7 @@
:class=
"
{isEC:item.upperScreenState==1}"
v-for="(item,index) in list"
:key="index"
@click="toGoodsInfo(item)"
>
<img
:src=
"item.productImgUrl"
alt
/>
<p
class=
"num"
>
{{
item
.
number
}}
</p>
...
...
@@ -15,7 +16,7 @@
</div>
<!-- 左上角展示讲解中商品 -->
<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"
@
click=
"toGoodsInfo(item)"
>
<img
:src=
"item.productImgUrl"
alt
/>
<!--
<p
class=
"num"
>
{{
item
.
number
}}
</p>
-->
<div
class=
"explain"
v-if=
"item.upperScreenState==1"
>
讲解中
</div>
...
...
@@ -29,6 +30,7 @@
<
script
type=
"text/ecmascript-6"
>
import
{
DFSImg
}
from
"@/utils/index"
;
import
live
from
"@/api/live"
;
export
default
{
props
:
[
"updateGoods"
,
"goodsList"
],
name
:
""
,
...
...
@@ -86,6 +88,25 @@ export default {
},
mounted
()
{},
methods
:
{
// 到商品详情
toGoodsInfo
(
val
)
{
// 点击商品埋点
let
info
=
{
liveBroadcastId
:
Number
(
this
.
liveId
),
liveBroadcastGoodsId
:
Number
(
val
.
productId
),
}
live
.
addLiveUserGoodsByUser
(
info
).
then
(
res
=>
{});
let
query
=
{
fromLived
:
1
,
liveId
:
this
.
liveId
};
let
backPath
=
`/goods/
${
val
.
productId
}
`
;
wx
.
reLaunch
({
url
:
`../index/main?from=livedToGoodsInfo&backpath=
${
backPath
}
¶ms=
${
JSON
.
stringify
(
query
)}
`
});
},
/**
* 判断此对象是否是Object类型
* @param {Object} obj
...
...
src/components/livedModel/livedIsEnded.vue
View file @
70a9fe33
...
...
@@ -272,7 +272,7 @@ export default {
padding
:
0
4px
6px
0
;
}
.list
{
max-height
:
50
vh
;
max-height
:
48
vh
;
overflow-y
:
auto
;
.item
{
padding
:
14px
4px
;
...
...
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