From 316effed051059575ff9f37a4b3ce4a92ccf934e Mon Sep 17 00:00:00 2001
From: xuxueyang <xuxy@fengyuntec.com>
Date: 星期三, 14 八月 2024 14:54:00 +0800
Subject: [PATCH] add 标签、列表、详情、商铺等
---
sub_pages/customer/trade/detail.vue | 42 +++++++++++++++++++++++++++++++++++++++++-
1 files changed, 41 insertions(+), 1 deletions(-)
diff --git a/sub_pages/customer/trade/detail.vue b/sub_pages/customer/trade/detail.vue
index 97e4269..420baa3 100644
--- a/sub_pages/customer/trade/detail.vue
+++ b/sub_pages/customer/trade/detail.vue
@@ -57,6 +57,15 @@
{{ dto.name || '-' }}
</view>
</view>
+
+ <view class="tags" v-if="dto.tags||false">
+ <!-- <view class="tag red">限时抢购</view> -->
+ <!-- <view class="tag green">品质严选</view> -->
+ <view class="tag red" v-for="(tag,k) of dto.tagArr" :class="[k===0?'red':'green']" :key="tag">{{
+ tag
+ }}
+ </view>
+ </view>
<view class="desc m-t-12">
<view class="m-r-15">已售:{{ dto.sales || 0 }}</view>
<view class="m-r-15">剩余:{{ dto.stock || 0 }}</view>
@@ -449,6 +458,11 @@
if (!this.dto.bannerList) {
this.dto.bannerList = []
}
+ if (this.dto.tags) {
+ this.dto.tagArr = this.dto.tags.split(",") || []
+ } else {
+ this.dto.tagArr = []
+ }
}
this.$message.hideLoading()
@@ -538,7 +552,8 @@
background-color: #fff;
border-radius: 8rpx;
position: relative;
- .index-tag{
+
+ .index-tag {
position: absolute;
color: #fff;
font-size: 22rpx;
@@ -571,6 +586,31 @@
padding: 46rpx 30rpx;
border-radius: 40rpx 40rpx 0rpx 0rpx;
+ .tags {
+ margin-top: 12rpx;
+ display: flex;
+
+ .tag {
+ min-width: 80rpx;
+ padding-left: 20rpx;
+ padding-right: 20rpx;
+ line-height: 36rpx;
+ background: #FEE6E6;
+ border-radius: 21rpx;
+ font-size: 24rpx;
+ color: #CD1212;
+ margin-right: 12rpx;
+ text-align: center;
+ }
+
+ .tag.green {
+ color: rgba(110, 159, 102, 1);
+ background: rgba(202, 229, 214, 1);
+ border-radius: 21rpx;
+ // opacity: 0.57;
+ }
+ }
+
.title {
font-weight: 600;
font-size: 36rpx;
--
Gitblit v1.9.3