sunshibo 1 сар өмнө
parent
commit
d58677e0d6

+ 4 - 4
pages/coupon/components/RulesModal.vue

@@ -40,12 +40,12 @@
       <view class="rules-content">
         <view class="rules-item">
           <text class="rules-label">有效期</text>
-          <text class="rules-value">{{ couponData?.validDays || 90 }}天</text>
+          <text class="rules-value">{{ couponData?.specifiedDay ?? '' }}</text>
         </view>
         
         <view class="rules-item">
           <text class="rules-label">补充说明</text>
-          <text class="rules-value">{{ couponData?.description || '周一、周五不可用' }}</text>
+          <text class="rules-value">{{ couponData?.supplementaryInstruction || '暂无说明' }}</text>
         </view>
       </view>
     </view>
@@ -69,8 +69,8 @@ const props = defineProps({
       minAmount: 66,
       name: '6元通用优惠券',
       expireDate: '2025/07/12',
-      validDays: 90,
-      description: '周一、周五不可用'
+      specifiedDay: '',
+      supplementaryInstruction: ''
     })
   }
 });

+ 6 - 8
pages/coupon/index.vue

@@ -74,8 +74,8 @@ const selectedCoupon = ref({
   minAmount: 0,
   name: '',
   expireDate: '',
-  validDays: 90,
-  description: '周一、周五不可用'
+  specifiedDay: '',
+  supplementaryInstruction: ''
 });
 
 // 优惠券数据(接口返回)
@@ -108,7 +108,9 @@ function normalizeCouponItem(raw) {
     couponType,
     nominalValue,
     discountRate,
-    conditionText
+    conditionText,
+    specifiedDay: raw.specifiedDay ?? raw.validDays ?? '',
+    supplementaryInstruction: raw.supplementaryInstruction ?? raw.description ?? ''
   };
 }
 
@@ -148,11 +150,7 @@ const getCouponCardClass = (coupon) => {
 
 // 查看使用规则
 const handleShowRules = (coupon) => {
-  selectedCoupon.value = {
-    ...coupon,
-    validDays: 90,
-    description: '周一、周五不可用'
-  };
+  selectedCoupon.value = { ...coupon };
   showRulesModal.value = true;
 };
 

+ 1 - 1
pages/orderFood/components/FoodCard.vue

@@ -244,7 +244,7 @@ const getPriceDecimal = (price) => {
   &--signature {
     background: linear-gradient(90deg, #FCB13F 0%, #FC793D 100%);
     color: #fff;
-    border-radius: 999rpx;
+    border-radius: 4rpx;
   }
 }