|
|
|
@ -75,7 +75,7 @@ |
|
|
|
|
<view class="goods-list clearfix" :class="['column-' + (showView ? '1' : '2')]"> |
|
|
|
|
<view v-if="showView"> |
|
|
|
|
<view class="goods-item" v-for="(item, index) in list.data" :key="index" |
|
|
|
|
@click="onTargetDetail(item.goods_id)"> |
|
|
|
|
@click="onTargetDetail(item)"> |
|
|
|
|
<!-- 单列显示 --> |
|
|
|
|
<view v-if="showView" class="dis-flex"> |
|
|
|
|
<!-- 商品图片 --> |
|
|
|
@ -112,7 +112,7 @@ |
|
|
|
|
<u-waterfall v-model="list.data" ref="uWaterfall1"> |
|
|
|
|
<template v-slot:left="{leftList}"> |
|
|
|
|
<view class="goods-item goods-item1" v-for="(item, index) in leftList" :key="index" |
|
|
|
|
@click="onTargetDetail(item.goods_id)"> |
|
|
|
|
@click="onTargetDetail(item)"> |
|
|
|
|
<!-- 多列显示 --> |
|
|
|
|
<view class=""> |
|
|
|
|
<!-- 商品图片 --> |
|
|
|
@ -168,7 +168,7 @@ |
|
|
|
|
</template> |
|
|
|
|
<template v-slot:right="{rightList}"> |
|
|
|
|
<view class="goods-item goods-item1" v-for="(item, index) in rightList" :key="index" |
|
|
|
|
@click="onTargetDetail(item.goods_id)"> |
|
|
|
|
@click="onTargetDetail(item)"> |
|
|
|
|
<!-- 多列显示 --> |
|
|
|
|
<view class=""> |
|
|
|
|
<!-- 商品图片 --> |
|
|
|
@ -301,6 +301,7 @@ |
|
|
|
|
}], |
|
|
|
|
multiIndex: -1, |
|
|
|
|
blheight: 0, |
|
|
|
|
from: '' |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
@ -311,6 +312,8 @@ |
|
|
|
|
// 记录options |
|
|
|
|
this.options = options |
|
|
|
|
this.searchText = options.search |
|
|
|
|
this.from = options.from || ''; |
|
|
|
|
console.log(this.from, 316); |
|
|
|
|
// 设置默认列表显示方式 |
|
|
|
|
this.setShowView() |
|
|
|
|
// 设置微信公众号链接分享卡片内容 |
|
|
|
@ -497,10 +500,18 @@ |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 跳转商品详情页 |
|
|
|
|
onTargetDetail(goodsId) { |
|
|
|
|
onTargetDetail(item) { |
|
|
|
|
console.log(item); |
|
|
|
|
if (this.from === 'dynamic') { |
|
|
|
|
let pages = getCurrentPages(); //获取所有页面栈实例列表 |
|
|
|
|
let prevPage = pages[pages.length - 2].$vm; //上一页页面实例 |
|
|
|
|
prevPage.good = item; |
|
|
|
|
uni.navigateBack(); |
|
|
|
|
} else { |
|
|
|
|
this.$navTo('pages/goods/detail', { |
|
|
|
|
goodsId |
|
|
|
|
goodsId: item.goods_id |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|