故障报修小程序里uni.getUserInfo获取用户名为微信用户,使用uni.getUserProfile即可。可以使用 if(uni.getUserProfile) 判断uni.getUserProfile是否可用。
uni.getUserProfile({
lang:'zh_CN',
desc:'用户登录',
success:(detail)=>{
console.log(detail)
}
})
故障报修小程序里uni.getUserInfo获取用户名为微信用户,使用uni.getUserProfile即可。可以使用 if(uni.getUserProfile) 判断uni.getUserProfile是否可用。
uni.getUserProfile({
lang:'zh_CN',
desc:'用户登录',
success:(detail)=>{
console.log(detail)
}
})