export default {
onLaunch: function() {
uni.getSystemInfo({
success: function(e) {}
})
}
}

- 发布:2025-03-13 10:32
- 更新:2025-03-13 13:49
- 阅读:19
产品分类: uniapp/小程序/微信
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: 10
HBuilderX类型: 正式
HBuilderX版本号: 4.56
第三方开发者工具版本号: 稳定版 Stable Build(1.06.2412050)
基础库版本号: 3.7.10
项目创建方式: HBuilderX
操作步骤:
预期结果:
希望能编译成微信小程序最新的API
希望能编译成微信小程序最新的API
实际结果:
微信小程序开发者工具会警告:
wx.getSystemInfo is deprecated.Please use wx.getSystemSetting/wx.getAppAuthorizeSetting/wx.getDeviceInfo/wx.getWindowInfo/wx.getAppBaseInfo instead.
wx.getSystemInfoSync is deprecated.Please use wx.getSystemSetting/wx.getAppAuthorizeSetting/wx.getDeviceInfo/wx.getWindowInfo/wx.getAppBaseInfo instead.
微信小程序开发者工具会警告:
wx.getSystemInfo is deprecated.Please use wx.getSystemSetting/wx.getAppAuthorizeSetting/wx.getDeviceInfo/wx.getWindowInfo/wx.getAppBaseInfo instead.
wx.getSystemInfoSync is deprecated.Please use wx.getSystemSetting/wx.getAppAuthorizeSetting/wx.getDeviceInfo/wx.getWindowInfo/wx.getAppBaseInfo instead.
bug描述:
使用uni.getSystemInfo 或 uni.getSystemInfoSync 会报错。如下。




爱豆豆 - 办法总比困难多
不都提示出来了嘛?停止维护了啊 不是uniapp的问题
请使用 wx.getSystemSetting、wx.getAppAuthorizeSetting、wx.getDeviceInfo、wx.getWindowInfo、wx.getAppBaseInfo 代替
参考文档:https://developers.weixin.qq.com/miniprogram/dev/api/base/system/wx.getSystemInfoSync.html