Commit 70a9fe33 by 李嘉林

讲解商品可进入商品详情

parent 1d8dcb10
......@@ -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
}&params=${JSON.stringify(query)}`
});
},
/**
* 判断此对象是否是Object类型
* @param {Object} obj
......
......@@ -272,7 +272,7 @@ export default {
padding: 0 4px 6px 0;
}
.list {
max-height: 50vh;
max-height: 48vh;
overflow-y: auto;
.item {
padding: 14px 4px;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment