解决方法:替换微信授权api为uni.getUserProfile
需要更新大微信开发工具最新版本,就可以支持在Hbuilder里点出最新的getUserProfile函数了
UNI-APP_uni-app uni.getUserProfile微信授权,微信授权信息显示微信用户解决-小白菜博客
代码:

<button class='bottom' type='primary' withCredentials="true" lang="zh_CN" @click="xwLogin" >
xwLogin(){
	// console.log('微信授权弹窗');
	uni.getSetting({
		success(res) {
			// console.log("授权:", res);
			uni.showModal({
				title: '授权提醒',
				content: '请授权头像等信息,以便为您提供更好的服务',
				cancelText: "随便逛逛",
				confirmText: '确认授权',
				success: function (showres) {
					if (showres.confirm) {
						// console.log('用户点击确定');
						uni.getUserProfile({
							desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
							lang:"zh_CN",
							success: (infoRes) => {
								console.log('授权信息',infoRes);
								uni.login({
									provider: 'weixin',
									success: (res1) => {
										//在这里调取后台登录接口
										console.log(res1);
										console.log('code',res1.code);
									},
									fail: () => {
										uni.showToast({
											title: "微信登录授权失败",
											icon: "none"
										});
									}
								})
							}  
						})
					} else if (showres.cancel) {
						// console.log('用户点击取消');
					}
				}
			})
		}
	})
},