const accountInfo = uni.getAccountInfoSync();
console.log(accountInfo)
![1***@qq.com](https://img-cdn-tc.dcloud.net.cn/account/identicon/ee3cff25b08945e954e3144ae50c4f4f.png)
- 发布:2024-05-13 14:15
- 更新:2024-05-13 14:20
- 阅读:177
产品分类: uniapp/App
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: Windows 11
HBuilderX类型: 正式
HBuilderX版本号: 4.15
手机系统: Android
手机系统版本号: Android 14
手机厂商: 小米
手机机型: ?
页面类型: vue
vue版本: vue2
打包方式: 云端
项目创建方式: HBuilderX
示例代码:
操作步骤:
const accountInfo = uni.getAccountInfoSync();
console.log(accountInfo)
const accountInfo = uni.getAccountInfoSync();
console.log(accountInfo)
预期结果:
打印结果
打印结果
实际结果:
报错
报错
bug描述:
const accountInfo = uni.getAccountInfoSync();
console.log(accountInfo)
![](http://img-cdn-tc.dcloud.net.cn/uploads/questions/20240513/3c88cf0d2b203c67e338223829415f27.png)