Browse Source

提示调整

kk.shi 3 years ago
parent
commit
ce6e93fe54
4 changed files with 20 additions and 5 deletions
  1. 2 1
      api/integralinfo.js
  2. 13 0
      pages/integral/integral.js
  3. 2 2
      pages/integral/integral.wxml
  4. 3 2
      pages/integral/integral.wxss

+ 2 - 1
api/integralinfo.js

@@ -33,7 +33,7 @@ class Integralinfo extends request {
                       }
                   } else {
                     console.log(res?.data?.msg);
-                    if(typeof(res?.data?.msg)==undefined) {
+                    if(res?.data?.msg != undefined && typeof(res?.data?.msg)=='string') {
                       wx.showToast({
                         title: res?.data?.msg,
                         icon: "none"
@@ -46,6 +46,7 @@ class Integralinfo extends request {
                       //如果有统一的异常处理,就先调用统一异常处理函数对异常进行处理
                       this._errorHandler(res)
                   }
+            
                   reject(res)
                 }
             }),

+ 13 - 0
pages/integral/integral.js

@@ -693,6 +693,12 @@ paymentClick() {
                             })
                         }, 2500)
                     }
+            }).catch(error => {
+                let res = error.data;
+                wx.showToast({
+                    icon: 'none',
+                    title: res.message
+                })
             });
         } else if (this.data.activeNum === 0 && this.data.active1code !== '') {
             Integralinfo.getPayOnce({
@@ -730,6 +736,13 @@ paymentClick() {
                         })
                     }, 2500)
                 }
+            }).catch(error => {
+               let res = error.data;
+               wx.showToast({
+                icon: 'none',
+                title: res.message
+               })
+           
             })
         } else {
             wx.showToast({

+ 2 - 2
pages/integral/integral.wxml

@@ -182,12 +182,12 @@
     </view>
   </view>
 
-  <view class="showToast" wx:if="{{showToastObj.status}}">
+  <!-- <view class="showToast" wx:if="{{showToastObj.status}}">
     <view class="showToast-icon">
       <text class="showToast-iconfont" class="showToastObj.icon"></text>
     </view>
     <view class="showToast-title">
       <text>{{showToastObj.title}}</text>
     </view>
-  </view>
+  </view> -->
 </view>

+ 3 - 2
pages/integral/integral.wxss

@@ -503,14 +503,14 @@ page {
   position: fixed;
   width: 600rpx;
   height: 540rpx;
-  top: 35%;
+  top: 35% !important;
   left: 50%;
   transform: translate(-50%, -50%);
   background-color: white;
   border-radius: 14rpx;
   padding: 24rpx;
   box-sizing: border-box;
-  top: 63%;
+  z-index: 10;
 }
 
 .payment-code {
@@ -600,6 +600,7 @@ page {
   height: 360rpx;
   background-color: rgba(0, 0, 0, 0.8);
   border-radius: 14rpx;
+  z-index: 12;
 }
 
 .showToast-icon {