Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
bookshiyi opened this issue Oct 11, 2024 · 2 comments
Open

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

bookshiyi opened this issue Oct 11, 2024 · 2 comments

Comments

@bookshiyi
Copy link

重现链接

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
Copy link

zenonux commented Oct 22, 2024

+1

@joe1224
Copy link

joe1224 commented Nov 22, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants