瀏覽代碼

修改问题

lex-xin 4 月之前
父節點
當前提交
bd572152af
共有 2 個文件被更改,包括 7 次插入15 次删除
  1. 6 14
      miniprogram/pages/orders/order-detail.ts
  2. 1 1
      miniprogram/pages/orders/order-result.wxml

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

@@ -100,20 +100,12 @@ Page({
         if (data.code === 200) {
           const { paymentConfig, paymentType, orderNo } = data.data
           this.onExecutePay(paymentConfig, paymentType, orderNo)
-          
-          // 测试h5页面支付流程
-          // const params = {
-          //   paymentType: 'adapay-cooleshow-6560',
-          //   pay_channel: 'wx_pub',
-          //   wxAppId: 'wxbde13f59d40cb4f2',
-          //   body: 'aaa',
-          //   price: '0.01',
-          //   orderNo,
-          //   userId: app.globalData.userInfo?.id
-          // }
-          // wx.navigateTo({
-          //   url: '../protocol/register?orderInfo=' + encodeURIComponent(JSON.stringify(params))
-          // })
+        } else if(data.code === 5200) {
+          wx.hideLoading()
+          wx.showToast({
+            title: data.message,
+            icon: 'none'
+          })
         } else {
           this.onPayError()
         }

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

@@ -25,7 +25,7 @@
           </view>
         </view>
       </view>
-      <view class="qrcode-section" wx:if="{{ (goodsInfo.wechatStatus == 'SUCCESS' || goodsInfo.wechatStatus == 'WAIT_USE') && showCanvas }}">
+      <view class="qrcode-section" wx:if="{{ (goodsInfo.wechatStatus == 'PAID' || goodsInfo.wechatStatus == 'WAIT_USE') && showCanvas }}">
         <view class="qrcode-wrap">
           <canvas class='my_draw_canvas' data-type="image" canvas-id='canvasCode' id="canvasCode"></canvas>
         </view>