获取系统信息。
OBJECT参数说明:
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
success | Function | 是 | 接口调用成功的回调 |
fail | Function | 否 | 接口调用失败的回调函数 |
complete | Function | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
success回调参数说明:
参数 | 说明 | 最低版本 |
---|---|---|
brand | 手机品牌 | 1.5.0 |
model | 手机型号 | |
pixelRatio | 设备像素比 | |
screenWidth | 屏幕宽度 | 1.1.0 |
screenHeight | 屏幕高度 | 1.1.0 |
windowWidth | 可使用窗口宽度 | |
windowHeight | 可使用窗口高度 | |
language | 微信设置的语言 | |
version | 微信版本号 | |
system | 操作系统版本 | |
platform | 客户端平台 | |
fontSizeSetting | 用户字体大小设置。以“我-设置-通用-字体大小”中的设置为准,单位:px | 1.5.0 |
SDKVersion | 客户端基础库版本 | 1.1.0 |
示例代码:
wx.getSystemInfo({
success: function(res) {
console.log(res.model)
console.log(res.pixelRatio)
console.log(res.windowWidth)
console.log(res.windowHeight)
console.log(res.language)
console.log(res.version)
console.log(res.platform)
}
})
更多微信小程序开发教程,关注多程序。
评论时间:2023-09-22 03:54:02
软件功能1、支持多个平台适配2、可自定义风格3、一键安装4、自动加载5、招聘app制作 批量导入6、数据统计7、实时监控app开发流程和使用方法 可自定义风格3、一键安装4、自动加载5、批量导入6、数据统计7、实时监控8、用户评价9、智能推荐10、优化界面11、安全防护12、下载管理13、权限设置14、资源分享15、文件共享等16、系统提示17、其他相关内容
回复