Browse Source

洗车调试

skyline 3 days ago
parent
commit
92e33be4e7

+ 47 - 24
car-wash-mp/src/pages/user/index.vue

@@ -38,19 +38,25 @@
               <uv-icon name="bag" size="18" color="#C6171E"></uv-icon>
               <text>我的钱包</text>
             </view>
-            <view class="wallet-action">
-              <text class="action-text">充值</text>
-              <uv-icon name="arrow-right" size="12" color="#909399"></uv-icon>
-            </view>
+            <uv-icon name="arrow-right" size="14" color="#C0C4CC"></uv-icon>
           </view>
 
           <view class="wallet-balance">
-            <text class="balance-label">账户余额</text>
+            <text class="balance-label">账户余额 (元)</text>
             <view class="balance-value">
               <text class="balance-symbol">¥</text>
               <text class="balance-amount">{{ ((user.balance || 0) / 100).toFixed(2) }}</text>
             </view>
           </view>
+
+          <view class="wallet-actions">
+            <view class="action-btn action-recharge" @click.stop="toPage({path: '/pages-user/wallet/recharge'})">
+              <text>充值</text>
+            </view>
+            <view class="action-btn action-detail" @click.stop="toPage({path: '/pages-user/wallet/index'})">
+              <text>明细</text>
+            </view>
+          </view>
         </view>
       </view>
 
@@ -366,13 +372,14 @@ page {
 
   // 钱包区域
   .wallet-section {
-    padding: 28rpx 32rpx;
+    padding: 28rpx 32rpx 24rpx;
+    text-align: center;
 
     .wallet-header {
       display: flex;
       justify-content: space-between;
       align-items: center;
-      margin-bottom: 20rpx;
+      margin-bottom: 24rpx;
 
       .wallet-title {
         display: flex;
@@ -382,42 +389,58 @@ page {
         font-weight: $uni-font-weight-semibold;
         color: $uni-text-color;
       }
-
-      .wallet-action {
-        display: flex;
-        align-items: center;
-        gap: 4rpx;
-
-        .action-text {
-          font-size: 24rpx;
-          color: $uni-text-color-hint;
-        }
-      }
     }
 
     .wallet-balance {
+      margin-bottom: 28rpx;
+
       .balance-label {
         font-size: 24rpx;
         color: $uni-text-color-hint;
-        margin-bottom: 8rpx;
+        margin-bottom: 12rpx;
         display: block;
       }
 
       .balance-value {
         display: flex;
         align-items: baseline;
+        justify-content: center;
         gap: 6rpx;
 
         .balance-symbol {
-          font-size: 26rpx;
-          color: $uni-color-primary;
-          font-weight: $uni-font-weight-medium;
+          font-size: 36rpx;
+          color: $uni-text-color-dark;
+          font-weight: $uni-font-weight-semibold;
         }
 
         .balance-amount {
-          font-size: 40rpx;
+          font-size: 64rpx;
+          color: $uni-text-color-dark;
+          font-weight: $uni-font-weight-bold;
+          line-height: 1;
+        }
+      }
+    }
+
+    .wallet-actions {
+      display: flex;
+      justify-content: center;
+      gap: 20rpx;
+
+      .action-btn {
+        padding: 14rpx 48rpx;
+        border-radius: 40rpx;
+        font-size: 26rpx;
+        font-weight: $uni-font-weight-medium;
+
+        &.action-recharge {
+          background: $uni-color-primary;
+          color: #fff;
+        }
+
+        &.action-detail {
+          background: rgba($uni-color-primary, 0.08);
           color: $uni-color-primary;
-          font-weight: $uni-font-weight-semibold;
         }
       }
     }

+ 5 - 0
car-wash-service/src/main/java/com/kym/service/awoara/event/handle/OrderCloseEventHandler.java

@@ -61,6 +61,11 @@ public class OrderCloseEventHandler implements AwoaraEventHandler<OrderInfoObjec
             log.error("订单不存在,订单号:{}", orderInfo.getOrder_id());
             return;
         }
+        // 幂等保护:已结算订单不再重复处理
+        if (Integer.valueOf(WashOrder.PAY_STATUS_已支付).equals(washOrder.getPayStatus())) {
+            log.warn("订单:{},已结算,跳过重复关闭事件", orderInfo.getOrder_id());
+            return;
+        }
 
         int rechargePayment;
         int grantsPayment = 0;