From 731b3a23a6369aaef5c4fdc0ff4524eb6a7f3642 Mon Sep 17 00:00:00 2001
From: xuxueyang <xuxy@fengyuntec.com>
Date: 星期五, 13 九月 2024 19:07:12 +0800
Subject: [PATCH] update 合伙人、花店端

---
 sub_pages/customer/coupon/good-self.vue |   88 +++++++++++++++++++++++++++++++++++---------
 1 files changed, 70 insertions(+), 18 deletions(-)

diff --git a/sub_pages/customer/coupon/good-self.vue b/sub_pages/customer/coupon/good-self.vue
index a2abe80..c544aaa 100644
--- a/sub_pages/customer/coupon/good-self.vue
+++ b/sub_pages/customer/coupon/good-self.vue
@@ -5,27 +5,35 @@
 
 			</top-tabs>
 		</view>
-		<view class="">
-			<no-data v-if="!list||list.length==0" style="width: 100%;"></no-data>
+		<no-data v-if="!list||list.length==0" style="width: 100%;"></no-data>
 
-			<view v-for="(item,index) of list" :key="index" class="coupont-item" :class="[query.status]">
-				<view class="flex container img100">
+		<view class="p10">
+
+			<view v-for="(item,index) of list" :key="index" class="good-item" :class="[query.status]">
+				<view class="flex container img100" @click="selectItem(item)">
 					<view class="info-price">
 						<image :lazy-load="true" :src="item.cover" class="cover" mode="scaleToFill"></image>
 					</view>
 					<view class="info flex1">
-						<view class="title">
+						<view class="title flex">
 							{{item.name||''}}
+							<!-- <radio :checked="isIngood(item)" @click.stop="updateSelectGood(item)" v-if="source==='shopping'" class="select-coupon"></radio> -->
+
+							<view :style="{ 'margin-right': '20rpx'}" class="component-radio m-l-a"
+								:class="[isIngood(item)?'cur':'']" v-if="source==='shopping'">
+
+							</view>
+
 						</view>
 						<view class="time word-e">
 							{{item.description||''}}
 						</view>
-						<view class="button" @click="getPointGood(item)" v-if="source!=='shopping'">
+						<view class="button m-l-a m-r-10" v-if="source!=='shopping'">
 							查看详情
 						</view>
-						<view class="button" @click="updateSelectGood(item)" v-if="source=='shopping'">
+						<!-- 		<view class="button" @click="updateSelectGood(item)" v-if="source=='shopping'">
 							{{isIngood(item)?'移除':'添加'}}
-						</view>
+						</view> -->
 					</view>
 				</view>
 				<!-- 	<view class="tip">
@@ -33,8 +41,8 @@
 				</view> -->
 			</view>
 		</view>
-		<view style="min-height: 130rpx;" v-if="source=='shopping'"></view>
-		<view class="bottom-button" @click="backpage()" v-if="source=='shopping'">返回订单结算</view>
+		<view style="min-height: 140rpx;" v-if="source=='shopping'"></view>
+		<view class="bottom-button" @click="backpage()" v-if="source=='shopping'">确定选择</view>
 
 		<!-- <view class="bottom-button" @click="toGoodAll">前往兑换</view> -->
 	</view>
@@ -102,9 +110,18 @@
 		},
 
 		methods: {
+			selectItem(item) {
+				if (this.source === 'shopping') {
+					//选择
+					this.updateSelectGood(item)
+				} else {
+					//详情
+					this.getPointGood(item)
+				}
+			},
 			isIngood(item) {
 				for (var tmp of this.cache_goods) {
-					if (tmp.goodsId == item.goodsId) {
+					if (tmp.id == item.id) {
 						return true
 					}
 				}
@@ -114,7 +131,7 @@
 			async updateSelectGood(item) {
 				var has = false
 				for (var tmp of this.cache_goods) {
-					if (tmp.goodsId == item.goodsId) {
+					if (tmp.id == item.id) {
 						has = true
 						break
 					}
@@ -125,7 +142,7 @@
 					//移除
 					var arr = []
 					for (var tmp of this.cache_goods) {
-						if (tmp.goodsId == item.goodsId) {} else {
+						if (tmp.id == item.id) {} else {
 							arr.push(tmp)
 						}
 					}
@@ -174,9 +191,13 @@
 	@import './coupon.scss';
 
 	.coupon-container {
-		.coupont-item {
+		.good-item {
+			height: unset;
+			padding: 20rpx;
+			margin-top: 0rpx;
+
 			.container {
-				background-image: unset;
+				background-color: #fff;
 
 				.info-price {
 					.cover {
@@ -186,9 +207,36 @@
 				}
 
 				.info {
-					.time {
-						margin-top: 0rpx;
+					margin-left: 20rpx;
+					position: relative;
+
+					.title {
+						font-weight: 600;
+						font-size: 36rpx;
+						color: #333333;
+						line-height: 50rpx;
+						text-align: left;
+						position: relative;
+						margin-top: 20rpx;
+
+						.select-coupon {
+							position: absolute;
+							right: 10rpx;
+							top: -6rpx;
+						}
 					}
+
+					.time {
+						font-weight: 400;
+						font-size: 28rpx;
+						color: #666666;
+						line-height: 40rpx;
+						text-align: left;
+						margin-top: 10rpx;
+						word-break: break-all;
+					}
+
+
 
 					.button {
 						width: 150rpx;
@@ -201,7 +249,10 @@
 						color: rgba(68, 119, 90, 1);
 						line-height: 46rpx;
 						text-align: center;
-						margin-top: 10rpx;
+						// margin-top: 10rpx;
+						position: absolute;
+						right: 10rpx;
+						bottom: 20rpx;
 					}
 				}
 			}
@@ -223,6 +274,7 @@
 			color: #20613D;
 			text-align: center;
 			line-height: 90rpx;
+			background-color: #fff;
 		}
 	}
 </style>
\ No newline at end of file

--
Gitblit v1.9.3