feat: 我的足迹新增失效商品判断
parent
274a03fe73
commit
b4f46ded2b
|
@ -6,16 +6,21 @@
|
||||||
<u-empty text="暂无历史记录" style="margin-top:200rpx;" mode="history" v-if="whetherEmpty"></u-empty>
|
<u-empty text="暂无历史记录" style="margin-top:200rpx;" mode="history" v-if="whetherEmpty"></u-empty>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<view v-for="(item, index) in trackList" :key="index">
|
<view v-for="(item, index) in trackList" :key="index">
|
||||||
<view class="myTracks-title" @click="navgaiteToStore(item)">{{item.storeName}}</view>
|
<view class="myTracks-title" @click="navigateToStore(item)" v-if="item.storeName">{{item.storeName}}</view>
|
||||||
<view class="myTracks-items">
|
<view class="myTracks-items">
|
||||||
|
|
||||||
<u-swipe-action style="width: 100%;" :show="item.show" :index="index" :key="item.id"
|
<u-swipe-action style="width: 100%;" :show="item.show" :index="index" :key="item.id"
|
||||||
@click="delTracks" @open="open" :options="options">
|
@click="delTracks" @open="open" :options="options">
|
||||||
<view class="myTracks-item">
|
<!-- 已失效商品 -->
|
||||||
<view class="myTracks-item-img" @click.stop="navgaiteToDetail(item)">
|
<div class="myTracks-item lose-goods" v-if="!item.storeName && !item.goodsName && !item.price">
|
||||||
|
已失效商品
|
||||||
|
</div>
|
||||||
|
<!-- 正常有效商品 -->
|
||||||
|
<view v-else class="myTracks-item">
|
||||||
|
<view class="myTracks-item-img" @click.stop="navigateToDetail(item)">
|
||||||
<image :src="item.thumbnail"></image>
|
<image :src="item.thumbnail"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="myTracks-item-content" @click.stop="navgaiteToDetail(item)">
|
<view class="myTracks-item-content" @click.stop="navigateToDetail(item)">
|
||||||
<view class="myTracks-item-title">
|
<view class="myTracks-item-title">
|
||||||
{{ item.goodsName }}
|
{{ item.goodsName }}
|
||||||
<view class="myTracks-item-title-desc"> </view>
|
<view class="myTracks-item-title-desc"> </view>
|
||||||
|
@ -83,7 +88,7 @@
|
||||||
/**
|
/**
|
||||||
* 导航到店铺
|
* 导航到店铺
|
||||||
*/
|
*/
|
||||||
navgaiteToStore(val) {
|
navigateToStore(val) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/product/shopPage?id=" + val.storeId,
|
url: "/pages/product/shopPage?id=" + val.storeId,
|
||||||
});
|
});
|
||||||
|
@ -99,7 +104,7 @@
|
||||||
/**
|
/**
|
||||||
* 跳转详情
|
* 跳转详情
|
||||||
*/
|
*/
|
||||||
navgaiteToDetail(item) {
|
navigateToDetail(item) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/product/goods?id=" + item.id + "&goodsId=" + item.goodsId,
|
url: "/pages/product/goods?id=" + item.id + "&goodsId=" + item.goodsId,
|
||||||
});
|
});
|
||||||
|
@ -154,6 +159,10 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.lose-goods{
|
||||||
|
color: $main-color;
|
||||||
|
padding-left: 50rpx !important;
|
||||||
|
}
|
||||||
.myTracks {
|
.myTracks {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding-top: 2rpx;
|
padding-top: 2rpx;
|
||||||
|
@ -224,36 +233,10 @@
|
||||||
padding: 10rpx 0 0 0;
|
padding: 10rpx 0 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.myTracks-action {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
position: fixed;
|
|
||||||
bottom: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
background: #fff;
|
|
||||||
height: 75rpx;
|
|
||||||
align-items: center;
|
|
||||||
padding: 0 32rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.myTracks-action-btn {
|
|
||||||
width: 130rpx;
|
|
||||||
height: 60rpx;
|
|
||||||
line-height: 60rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.myTracks-divider {
|
.myTracks-divider {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 20rpx;
|
height: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.myTracks-action-check {
|
|
||||||
align-items: center;
|
|
||||||
display: -webkit-box;
|
|
||||||
display: -webkit-flex;
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue