|
|
@ -75,7 +75,7 @@ |
|
|
|
<view class="goods-list clearfix" :class="['column-' + (showView ? '1' : '2')]"> |
|
|
|
<view class="goods-list clearfix" :class="['column-' + (showView ? '1' : '2')]"> |
|
|
|
<view v-if="showView"> |
|
|
|
<view v-if="showView"> |
|
|
|
<view class="goods-item" v-for="(item, index) in list.data" :key="index" |
|
|
|
<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"> |
|
|
|
<view v-if="showView" class="dis-flex"> |
|
|
|
<!-- 商品图片 --> |
|
|
|
<!-- 商品图片 --> |
|
|
@ -112,7 +112,7 @@ |
|
|
|
<u-waterfall v-model="list.data" ref="uWaterfall1"> |
|
|
|
<u-waterfall v-model="list.data" ref="uWaterfall1"> |
|
|
|
<template v-slot:left="{leftList}"> |
|
|
|
<template v-slot:left="{leftList}"> |
|
|
|
<view class="goods-item goods-item1" v-for="(item, index) in leftList" :key="index" |
|
|
|
<view class="goods-item goods-item1" v-for="(item, index) in leftList" :key="index" |
|
|
|
@click="onTargetDetail(item.goods_id)"> |
|
|
|
@click="onTargetDetail(item)"> |
|
|
|
<!-- 多列显示 --> |
|
|
|
<!-- 多列显示 --> |
|
|
|
<view class=""> |
|
|
|
<view class=""> |
|
|
|
<!-- 商品图片 --> |
|
|
|
<!-- 商品图片 --> |
|
|
@ -168,7 +168,7 @@ |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<template v-slot:right="{rightList}"> |
|
|
|
<template v-slot:right="{rightList}"> |
|
|
|
<view class="goods-item goods-item1" v-for="(item, index) in rightList" :key="index" |
|
|
|
<view class="goods-item goods-item1" v-for="(item, index) in rightList" :key="index" |
|
|
|
@click="onTargetDetail(item.goods_id)"> |
|
|
|
@click="onTargetDetail(item)"> |
|
|
|
<!-- 多列显示 --> |
|
|
|
<!-- 多列显示 --> |
|
|
|
<view class=""> |
|
|
|
<view class=""> |
|
|
|
<!-- 商品图片 --> |
|
|
|
<!-- 商品图片 --> |
|
|
@ -301,6 +301,7 @@ |
|
|
|
}], |
|
|
|
}], |
|
|
|
multiIndex: -1, |
|
|
|
multiIndex: -1, |
|
|
|
blheight: 0, |
|
|
|
blheight: 0, |
|
|
|
|
|
|
|
from: '' |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
@ -311,6 +312,8 @@ |
|
|
|
// 记录options |
|
|
|
// 记录options |
|
|
|
this.options = options |
|
|
|
this.options = options |
|
|
|
this.searchText = options.search |
|
|
|
this.searchText = options.search |
|
|
|
|
|
|
|
this.from = options.from || ''; |
|
|
|
|
|
|
|
console.log(this.from, 316); |
|
|
|
// 设置默认列表显示方式 |
|
|
|
// 设置默认列表显示方式 |
|
|
|
this.setShowView() |
|
|
|
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', { |
|
|
|
this.$navTo('pages/goods/detail', { |
|
|
|
goodsId |
|
|
|
goodsId: item.goods_id |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|