junyuanz 4 rokov pred
rodič
commit
a12ed2a2fb
2 zmenil súbory, kde vykonal 6 pridanie a 4 odobranie
  1. 4 3
      pages/user/all/all.js
  2. 2 1
      utils/request.js

+ 4 - 3
pages/user/all/all.js

@@ -216,14 +216,15 @@ Page({
 		  channel_id = Number(channel.parent_id)
 		}
 		var that = this
-		if (res.userInfo.detail.errMsg === 'getUserInfo:ok') {
+		console.log('res.userInfo',res.userInfo);
+		// if (res.userInfo.detail.errMsg === 'getUserInfo:ok') {
 		  wx.showLoading({
 		    title: '加载中'
 		  })
-		  _request.sendInfo(val, channel_id, invite, that)
+		  _request.sendInfo(res.userInfo, channel_id, invite, that)
 		  
 		  that.onShow();
-		}
+		// }
 		}
 	})
   },

+ 2 - 1
utils/request.js

@@ -207,7 +207,8 @@ function setAuthorize () {
 }
 // 发送个人信息给后端
 function sendInfo (a, channel, invite, that) {
-  var userInfo = a.detail
+  // var userInfo = a.detail;
+  var userInfo = a;//新授权方式
   var str = JSON.stringify(userInfo)
   updateWxUserInfo(str, channel, invite, that)
 }