From 1fb44496929548b4f07b37796d506dedc494d44a Mon Sep 17 00:00:00 2001
From: xuxueyang <xuxy@fengyuntec.com>
Date: 星期二, 30 七月 2024 17:29:35 +0800
Subject: [PATCH] update 问题修复
---
sub_pages/customer/self/collect.vue | 44 ++++++++++++++++++++++++++++++--------------
1 files changed, 30 insertions(+), 14 deletions(-)
diff --git a/sub_pages/customer/self/collect.vue b/sub_pages/customer/self/collect.vue
index 3a6706f..490e57f 100644
--- a/sub_pages/customer/self/collect.vue
+++ b/sub_pages/customer/self/collect.vue
@@ -56,15 +56,21 @@
},
methods: {
toDetail(item) {
+ if (item.status == 'UP') {
+
+ } else {
+ this.$message.showToast('已失效,无法查看详情')
+ return
+ }
uni.navigateTo({
url: `/sub_pages/customer/trade/detail?id=${item.id}`
})
},
async submitShopping(dto) {
//提交到购物车中
- this.$message.showLoading()
+ // this.$message.showLoading()
await this.$store.dispatch('submitShopping', dto);
- this.$message.hideLoading()
+ // this.$message.hideLoading()
},
select_level(e) {
this.level_show = false
@@ -91,7 +97,7 @@
<view class="flex1 input">
<u-input placeholder="请输入花名" v-model="query.name">
<template slot="suffix">
- <uni-icons color="#20613D" type="search" size="24" @tap="refreshList"></uni-icons>
+ <uni-icons color="#20613D" type="search" size="24" @click="refreshList"></uni-icons>
</template>
</u-input>
</view>
@@ -117,15 +123,16 @@
@cancel="order_show=false"></u-picker>
<view class="trade-list-container">
- <view class="trade-info-container flex" v-for="(dto,index) of list" :key="index" @click.stop="toDetail(dto)">
+ <view class="trade-info-container flex" v-for="(dto,index) of list" :key="index"
+ @click.stop="toDetail(dto)">
<image class="img img100 br-4 m-r-10" :src="dto.url||dto.cover"></image>
<view class="flex1">
<view class="flex">
<view class="title">
<span class="m-r-5" style="display: inline-block;"
- v-if="item.categoryStr">{{item.categoryStr||''}}</span>
- <span v-if="item.levelStr" class="m-r-5"
- style="display: inline-block;">{{ item.levelStr || '' }}</span>
+ v-if="dto.categoryStr">{{dto.categoryStr||''}}</span>
+ <span v-if="dto.levelStr" class="m-r-5"
+ style="display: inline-block;">{{ dto.levelStr || '' }}</span>
{{ dto.name || '-' }}
</view>
<view class="price m-l-a m-r-0">
@@ -137,7 +144,7 @@
<view class="m-r-15">剩余:{{ dto.stock || 0 }}</view>
<view class="m-r-15">颜色:{{ dto.color || '-' }}</view>
</view>
- <view class="button-icons flex m-l-a m-r-0 m-t-20">
+ <view class="button-icons flex m-l-a m-r-0 m-t-20" v-if="dto.status=='UP'">
<view class="m-r-0 gwc" @click.stop="submitShopping(dto)">
+ 购物车
</view>
@@ -153,6 +160,8 @@
<style lang="scss" scoped>
.page-collect {
+ min-height: 99vh;
+
.search-container {
display: flex;
margin: 12rpx 0rpx 20rpx 0rpx;
@@ -174,14 +183,21 @@
}
}
- .trade-info-container {
- background-color: #fff;
- border-top-right-radius: 40rpx;
- border-top-left-radius: 40rpx;
- padding: 30rpx;
- overflow: hidden;
+ .trade-list-container {
min-height: calc(100vh - 300rpx);
overflow-y: scroll;
+ border-top-right-radius: 40rpx;
+ border-top-left-radius: 40rpx;
+ padding: 20rpx;
+
+ }
+
+ .trade-info-container {
+ background-color: #fff;
+ border-radius: 40rpx;
+ margin-bottom: 20rpx;
+ padding: 20rpx;
+
.img {
width: 124rpx;
--
Gitblit v1.9.3