hzd 2 years ago
parent
commit
ef9e74f629
4 changed files with 23 additions and 8 deletions
  1. 1 1
      pages/index/index.js
  2. 13 6
      pages/pay/index.js
  3. 4 0
      pages/pay/index.wxml
  4. 5 1
      pages/pay/index.wxss

+ 1 - 1
pages/index/index.js

@@ -10,7 +10,7 @@ Page({
     
 
   onLoad:function(options){
-    console.log(1111111111,encodeURIComponent("org_3"));
+    // console.log(1111111111,encodeURIComponent("org_3"));
     app.getScene(options);
 
     var userId = wx.getStorageSync("userId");

+ 13 - 6
pages/pay/index.js

@@ -111,6 +111,13 @@ Page({
     });
   },
 
+  nopay(){
+    let url = encodeURIComponent(app.globalData.h5Url + "/#/pages/order/index?"+app.getCommonParam());
+    wx.reLaunch({
+      url: '/pages/webview/index?url='+url
+    }); 
+  },
+
   pay(){
     // let url = encodeURIComponent(app.globalData.h5Url + "/#/pages/order/index?"+app.getCommonParam());
     // wx.navigateTo({
@@ -124,16 +131,16 @@ Page({
       paySign: this.data.info.paysign,
       success (res) { 
         let url = encodeURIComponent(app.globalData.h5Url + "/#/pages/order/index?"+app.getCommonParam());
-        wx.navigateTo({
+        wx.reLaunch({
           url: '/pages/webview/index?url='+url
         }); 
       },
       fail (res) { 
-        wx.showToast({
-          title: '支付调用失败',
-          icon: 'none',
-          duration: 2000
-        })
+        // wx.showToast({
+        //   title: '支付调用失败',
+        //   icon: 'none',
+        //   duration: 2000
+        // })
       }
     })
   },

+ 4 - 0
pages/pay/index.wxml

@@ -20,6 +20,10 @@
       确认支付
     </view>
 
+    <view wx:if="{{info.mode == 1}}" class="btn btn-warning" bindtap="nopay">
+      暂不支付
+    </view>
+
     <!-- <view class="btn" bindtap="paymsg">
       消息
     </view> -->

+ 5 - 1
pages/pay/index.wxss

@@ -32,5 +32,9 @@
   text-align: center;
   margin: 0 auto;
   margin-top: 60rpx;
-  margin-bottom: 50rpx;
+  margin-bottom: 40rpx;
+}
+.btn-warning{
+  background-color: #E6A23C;
+  margin-top: 0rpx;
 }