瀏覽代碼

如果重置的时候获取不到用户id就不要发送请求到微信了

XWookey 2 年之前
父節點
當前提交
bf7f6de8fc
共有 1 個文件被更改,包括 9 次插入0 次删除
  1. 9 0
      pages/chargemoney/chargemoney.js

+ 9 - 0
pages/chargemoney/chargemoney.js

@@ -44,9 +44,18 @@ Page({
      })
   },
   beginChargemoneySuccess(e) {
+
+
+
+
     //console.log(this.data.chargemoney_select);
     log.info('[充值]', '[开始充值流程]');
     let that = this;
+
+    if(that.data.userInfo==null ||that.data.userInfo=={} || that.data.userInfo.userId==null ){
+      return 
+    }
+
     if (this.data.chargemoney_select) {
       wx.showLoading({
         title: '充值中...',