lex-xin 3 months ago
parent
commit
99bb153fc1

+ 1 - 1
miniprogram/pages/index/index.wxml

@@ -31,7 +31,7 @@
               <block wx:if="{{ selected.originalPrice > selected.salePrice }}">
                 <view class="originPrice">原价 ¥{{ selected.originalPrice || '0.00' }}</view><text style="padding: 0 6rpx"> | </text>
               </block>
-              <view class="saleNum">已售100W+</view>
+              <view class="saleNum">已售10W+</view>
             </view>
             <view class="right-bottom">
               <view class="shopName">

+ 8 - 4
miniprogram/pages/orders/order-result.less

@@ -129,9 +129,9 @@ page {
   aspect-ratio: 1;
   border-radius: 50%;
   background: 
-    radial-gradient(farthest-side,#E8E8E8 94%,#0000) top/8px 8px no-repeat,
+    radial-gradient(farthest-side,#E8E8E8 94%,#0000) top/8rpx 8rpx no-repeat,
     conic-gradient(#0000 30%,#E8E8E8);
-  -webkit-mask: radial-gradient(farthest-side,#0000 calc(100% - 8px),#000 0);
+  -webkit-mask: radial-gradient(farthest-side,#0000 calc(100% - 8rpx),#000 0);
   animation: tempLoading 1s infinite linear;
 }
 @keyframes tempLoading{ 
@@ -202,11 +202,14 @@ page {
   .qrcode-wrap {
     position: relative;
     margin: 32rpx auto;
-    border: 2rpx solid #EDEDED;
+    border: 2rpx solid #ECCEA0;
     padding: 6rpx;
     border-radius: 8rpx;
     display: inline-block;
     font-size: 0;
+    &.used {
+      border: 2rpx solid #EDEDED;
+    }
   }
   .my_draw_canvas {
     width: 202rpx;
@@ -220,7 +223,7 @@ page {
     line-height: 40rpx;
     border-radius: 12rpx;
     font-size: 26rpx;
-    border: 2rpx solid #ECCEA0;
+    border: 2rpx solid #F2F2F2;
     padding: 16rpx 24rpx;
     text-align: left;
     text {
@@ -229,6 +232,7 @@ page {
     }
     &.used {
       color: #777;
+      border-color: #E9E6E3;
     }
   }
 }

+ 1 - 1
miniprogram/pages/orders/order-result.wxml

@@ -48,7 +48,7 @@
         <view class="qrcode-text used" wx:else>登录<text>「音乐数字课堂」</text>APP,开启AI学练之旅~</view>
         <view class="qrcode-block">
           <view class="left-text">{{goodsInfo.wechatStatus == 'WAIT_USE' ? '待使用' : '已使用'}}</view>
-          <view class="qrcode-wrap">
+          <view class="qrcode-wrap {{goodsInfo.wechatStatus == 'WAIT_USE' ? '' : 'used'}}">
             <image src="{{canvasImg}}" mode="scaleToFill" class='my_draw_canvas' style="opacity: {{ goodsInfo.wechatStatus == 'PAID' ? 0.5 : 1 }};" show-menu-by-longpress="true"></image>
             <view class="loader" wx:if="{{!canvasImg}}"></view>
           </view>

+ 9 - 0
miniprogram/pages/orders/orders.ts

@@ -42,6 +42,7 @@ Page({
     recordList: [],
     maxPage: 1, // 总分页数
     refoundStatus: false,
+    cancelRefoundStatus: false,
     goodsInfo: {}, // 选中的数据
   },
   /**
@@ -313,6 +314,9 @@ Page({
     }
 
     if(item.wechatStatus === "REFUNDING") {
+      this.setData({
+        cancelRefoundStatus: true
+      })
       try {
         const refundOrderId = item.refundOrderId
         const {data} = await api_userPaymentCancelRefund(refundOrderId)
@@ -322,6 +326,9 @@ Page({
           this.onRefoundComfirm()
         } else {
           wx.showToast({ title: data.message, icon: 'none' })
+          this.setData({
+            cancelRefoundStatus: false
+          })
         }
       } catch {}
     } else {
@@ -341,6 +348,7 @@ Page({
       }
       this.setData({
         goodsInfo,
+        cancelRefoundStatus: true,
         refoundStatus: true
       })
     }
@@ -357,6 +365,7 @@ Page({
     })
     setTimeout(() => {
       that.setData({
+        cancelRefoundStatus: false,
         page: 1,
         maxPage: 1,
         recordList: [],

+ 2 - 2
miniprogram/pages/orders/orders.wxml

@@ -34,8 +34,8 @@
                 <!-- 订单金额:<text class="price">¥ {{item.amount}}</text> -->
               </view>
               <block wx:if="{{ item.wechatStatus == 'REFUNDING' || (item.wechatStatus == 'WAIT_USE' && tabIdx == 5) }}" wx:key="block">
-                <button wx:if="{{ item.wechatStatus == 'REFUNDING' }}" type="primary" wx:if="{{ item.wechatStatus == 'REFUNDING' }}"  catch:tap="onRefounded" data-id="{{item.id}}">取消退款</button>
-                <button wx:else type="primary" catch:tap="onRefounded" data-id="{{item.id}}">申请退款</button>
+                <button wx:if="{{ item.wechatStatus == 'REFUNDING' }}" type="primary" wx:if="{{ item.wechatStatus == 'REFUNDING' }}" disabled="{{cancelRefoundStatus}}" catch:tap="onRefounded" data-id="{{item.id}}">取消退款</button>
+                <button wx:else type="primary" disabled="{{cancelRefoundStatus}}" catch:tap="onRefounded" data-id="{{item.id}}">申请退款</button>
               </block>
               <block wx:else wx:key="block">
                 <button class="sure" type="primary" wx:if="{{ item.wechatStatus == 'WAIT_PAY' }}"  catch:tap="onPay" data-id="{{item.id}}">继续支付</button>