Ver código fonte

修改样式

lex-xin 4 meses atrás
pai
commit
609dc33974

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

@@ -118,7 +118,7 @@ page {
     font-size: 28rpx;
     color: #131415;
     line-height: 68rpx;
-    margin: 24rpx;
+    margin: 24rpx 0;
     flex-shrink: 0;
   }
 

+ 7 - 6
miniprogram/pages/orders/order-detail.ts

@@ -54,10 +54,10 @@ Page({
       console.log(error, "error");
     }
   },
-  onPayError() {
+  onPayError(message?: string) {
     wx.hideLoading()
     wx.showToast({
-      title: '支付失败',
+      title: message || '支付取消',
       icon: 'none'
     })
   },
@@ -132,7 +132,7 @@ Page({
         if(res.data.code === 200) {
           this.onPay(paymentType, res.data.data.reqParams, orderNo)
         } else {
-          this.onPayError()
+          this.onPayError(res.data.message)
         }
       },
       fail: () => {
@@ -161,10 +161,11 @@ Page({
       },
       fail(ressonInfo) {
         console.log('支付失败', ressonInfo)
-        // wx.showToast({ title: '支付失败!', icon: 'none' });
         that.onPayError()
-        wx.redirectTo({
-          url: '/pages/orders/order-result?orderNo=' + orderNo
+        const goodsInfo = that.data.goodsInfo
+        goodsInfo.orderNo = orderNo
+        that.setData({
+          goodsInfo
         })
       }
     })

+ 7 - 2
miniprogram/pages/orders/orders.less

@@ -76,7 +76,7 @@ page {
     justify-content: space-between;
     font-size: 28rpx;
     line-height: 48rpx;
-    padding-bottom: 12rpx;
+    padding-bottom: 24rpx;
     
     .item-mid {
       color: #131415;
@@ -166,10 +166,15 @@ page {
       color: #131415;
       line-height: 48rpx;
 
+      .price-first {
+        font-weight: bold;
+        color: #FE2451;
+        font-size: 28rpx;
+      }
       .price {
         font-family: DINAlternate, DINAlternate;
         font-weight: bold;
-        font-size: 28rpx;
+        font-size: 36rpx;
         color: #FE2451;
         line-height: 48rpx;
       }

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

@@ -31,7 +31,7 @@
             </view>
             <view class="item-footer">
               <view class="order-price">
-                订单金额:<text class="price">¥ {{item.amount}}</text>
+                订单金额:<text class="price-first">¥ </text><text class="price">{{item.amount}}</text>
               </view>
               <block wx:if="{{ item.wechatStatus == 'REFUNDING' || item.wechatStatus == 'WAIT_USE' }}" wx:key="block">
                 <button wx:if="{{ item.wechatStatus == 'REFUNDING' }}" type="primary" wx:if="{{ item.wechatStatus == 'REFUNDING' }}"  catch:tap="onRefounded" data-id="{{item.id}}">取消退款</button>