From 6a20878b9b1e3460531b055d72d5d671f761abc3 Mon Sep 17 00:00:00 2001
From: peng <peng.com>
Date: 星期四, 16 十月 2025 15:36:20 +0800
Subject: [PATCH] 定制商品
---
pages/order/cardPack.vue | 125 +++++++++++++++++++++++++----------------
1 files changed, 75 insertions(+), 50 deletions(-)
diff --git a/pages/order/cardPack.vue b/pages/order/cardPack.vue
index 6b00db7..e8b61fe 100644
--- a/pages/order/cardPack.vue
+++ b/pages/order/cardPack.vue
@@ -24,6 +24,7 @@
'coupon-used': item.claimStatus === 'CLAIMED',
'coupon-expired': item.status === 'EXPIRED'
}"
+ :data-item="JSON.stringify(item)"
>
<!-- 宸︿晶浼樻儬鍒镐富浣� -->
<view class="left">
@@ -51,7 +52,7 @@
<view class="status-tag"
:class="{
'unclaimed': item.claimStatus === 'NOT_CLAIM',
- 'claimed': item.claimStatus === 'CLAIMED'
+ 'claimed': item.claimStatus === 'CLAIM'
}">
{{ item.claimStatus === 'NOT_CLAIM' ? '鏈鍙�' : '宸查鍙�' }}
</view>
@@ -63,37 +64,41 @@
}">
{{ item.shareStatus === 'NOT_SHARE' ? '鏈垎浜�' : '宸插垎浜�' }}
</view>
-
-
- <view v-if="item.claimStatus === 'CLAIMED'">
- <button class="action-btn shared" open-type="share" :data-item="JSON.stringify(item)">
- 鍒嗕韩濂藉弸
- </button>
- </view>
-
-
</view>
</view>
+
+ <!-- 鍒嗕韩鎸夐挳 -->
+ <view v-if="item.claimStatus !== 'CLAIM'" class="share-btn-container">
+ <button class="action-btn shared" open-type="share" :data-item="JSON.stringify(item)">
+ <uni-icons class="share-icon" type="redo" size="20" color="#FFFFFF"></uni-icons>
+ </button>
+ </view>
</view>
+ </view>
+
+ <!-- 鍔犺浇鏇村鎻愮ず -->
+ <view class="load-more" v-if="couponList.length > 0">
+ <text v-if="loadStatus === 'more'">涓婃媺鍔犺浇鏇村</text>
+ <text v-else-if="loadStatus === 'loading'">鍔犺浇涓�...</text>
+ <text v-else>娌℃湁鏇村浜�</text>
</view>
</div>
</div>
</div>
-
- <!-- 鍔犺浇鏇村鎻愮ず -->
- <view class="load-more" v-if="couponList.length > 0">
- <text v-if="loadStatus === 'more'">涓婃媺鍔犺浇鏇村</text>
- <text v-else-if="loadStatus === 'loading'">鍔犺浇涓�...</text>
- <text v-else>娌℃湁鏇村浜�</text>
- </view>
</view>
</template>
<script>
import configs from '@/config/config'
- import {getPage} from '@/api/couponVirtual.js'
+ import {getPage,changShareStatus} from '@/api/couponVirtual.js'
import storage from "@/utils/storage.js";
+ // 寮曞叆uni-icons缁勪欢
+ import uniIcons from '@/uni_modules/uni-icons/components/uni-icons/uni-icons.vue'
export default {
+ // 娉ㄥ唽缁勪欢
+ components: {
+ uniIcons
+ },
data() {
return {
loadStatus: "more", //涓嬫媺鐘舵��
@@ -114,11 +119,13 @@
console.log("鏈櫥褰曚笉鑳藉垎浜�");
return
}
- const shareItem = e.target?.dataset?.item ? JSON.parse(e.target.dataset.item) : this.item;
+ console.log('------------------------->',e)
+ const shareItem = e.target?.dataset?.item ? JSON.parse(e.target.dataset.item) : this.item;2
+ changShareStatus(shareItem.id);
return {
- title: '鍒嗕韩浼樻儬鍗�',
+ title: shareItem.name,
path: `/pages/order/claim-coupon/claim-coupon?id=${shareItem.id}`,
- imageUrl: ''
+ imageUrl:shareItem.original
}
},
onLoad(options) {
@@ -226,7 +233,7 @@
.swiper-item {
.scroll-v {
height: calc(100vh - 100rpx);
- padding: 30rpx 24rpx 100rpx;
+ padding: 30rpx 24rpx 30rpx;
}
}
}
@@ -380,6 +387,11 @@
opacity: 0.9;
}
+ .order-id {
+ word-break: break-all;
+ white-space: normal;
+ }
+
.valid-date {
margin-top: 16rpx;
font-size: 22rpx;
@@ -458,29 +470,47 @@
color: $gray;
border: 1rpx solid rgba(158, 158, 158, 0.3);
}
-
- // 鎿嶄綔鎸夐挳
- .action-btn {
- background: linear-gradient(135deg, $primary, $primary-light);
- color: $white;
- padding: 14rpx 28rpx;
- border-radius: 40rpx;
- font-size: 26rpx;
- text-align: center;
- margin-top: 10rpx;
- font-weight: 500;
- box-shadow: 0 4rpx 12rpx rgba(255, 107, 59, 0.3);
-
- &.shared {
- background: linear-gradient(135deg, $info, #42A5F5);
- box-shadow: 0 4rpx 12rpx rgba(33, 150, 243, 0.3);
- }
-
- &.disabled {
- background: linear-gradient(135deg, #BDBDBD, #9E9E9E);
- box-shadow: 0 4rpx 12rpx rgba(158, 158, 158, 0.3);
- }
- }
+ }
+ }
+
+ // 鍒嗕韩鎸夐挳瀹瑰櫒
+ .share-btn-container {
+ position: absolute;
+ top: 0rpx;
+ right: 0rpx;
+ z-index: 10;
+ }
+
+ // 鎿嶄綔鎸夐挳
+ .action-btn {
+ background: linear-gradient(135deg, $primary, $primary-light);
+ width: 50rpx;
+ height: 50rpx;
+ border-radius: 50%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ box-shadow: 0 4rpx 12rpx rgba(255, 107, 59, 0.3);
+ border: none;
+ padding: 0;
+ margin: 0;
+
+ &.shared {
+ background: linear-gradient(135deg, $info, #42A5F5);
+ box-shadow: 0 4rpx 12rpx rgba(33, 150, 243, 0.3);
+ }
+
+ &.disabled {
+ background: linear-gradient(135deg, #BDBDBD, #9E9E9E);
+ box-shadow: 0 4rpx 12rpx rgba(158, 158, 158, 0.3);
+ }
+
+ .share-icon {
+ width: 100%;
+ height: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
}
}
@@ -491,11 +521,6 @@
color: $gray;
font-size: 26rpx;
background-color: $bg-color;
- position: fixed;
- bottom: 0;
- left: 0;
- right: 0;
- z-index: 10;
}
}
</style>
\ No newline at end of file
--
Gitblit v1.8.0