柒零 1 سال پیش
والد
کامیت
3065c455f8
1فایلهای تغییر یافته به همراه12 افزوده شده و 1 حذف شده
  1. 12 1
      componets/authorized-login-dialog/authorizedLoginDialog.js

+ 12 - 1
componets/authorized-login-dialog/authorizedLoginDialog.js

@@ -300,13 +300,24 @@ Component({
     },
     authorizedLogin(e) {
       const that = this;
-      if (e.detail.userInfo) {
+      if (e?.detail?.userInfo) {
         // 用户点击允许,获取到用户信息  
         this.setData({
           showLoading: true,
           disableCommitBtn: true,
         });
 
+        console.log("authorizedLogin=>"+{
+          token: wx.getStorageSync("token") || token_empower,
+          unionid: wx.getStorageSync("unionid"),
+          openid: wx.getStorageSync("openid"),
+          avatarUrl: that.data.avatarUrl,
+          nickname: that.data.nickName,
+          encryptphone: that.data.encryptphone,
+          longandlat: that.data.longitude + "|" + that.data.latitude
+        });
+        
+
         wx.request({
           url: `${homeApi_empower}/wxlogin`,
           data: {