getUserProfile(e) {
tt.getUserProfile({
success(res) {
console.log("getUserProfile 调用成功:", res.userInfo); const {nickName, avatarUrl} = res.userInfo; uni.setStorageSync('user_name', nickName); uni.setStorageSync('avatar_url', avatarUrl); }, fail(res) { console.log("getUserProfile 调用失败", res); }, }); },
报错:getUserProfile:fail must be invoked by user tap gesture