youzan / vant-weapp

轻量、可靠的小程序 UI 组件库
https://vant.pro/vant-weapp/
MIT License
17.79k stars 3.48k forks source link

[Bug Report] wx.getSystemInfoSync is deprecated. #5903

Open bookshiyi opened 1 month ago

bookshiyi commented 1 month ago

重现链接

Please use wx.getSystemSetting/wx.getAppAuthorizeSetting/wx.getDeviceInfo/wx.getWindowInfo/wx.getAppBaseInfo instead. getSystemInfoSync

Vant Weapp 版本

1.11.6

描述一下你遇到的问题。

从基础库 2.20.1 开始,wx.getSystemInfoSync()接口停止维护,请使用 wx.getSystemSettingwx.getAppAuthorizeSettingwx.getDeviceInfowx.getWindowInfowx.getAppBaseInfo 代替

详见文档:https://developers.weixin.qq.com/miniprogram/dev/api/base/system/wx.getSystemInfoSync.html

重现步骤

调用任意组件,都可复现

version.js 中的getSystemInfoSync()被调用时发生

function getSystemInfoSync() {
    if (systemInfo == null) {
        systemInfo = wx.getSystemInfoSync();
    }
    return systemInfo;
}

设备/浏览器

No response

zenonux commented 1 month ago

+1

joe1224 commented 4 days ago

还没处理好呀?效率太低了