微信小程序API-设备-系统信息


本文整理自网络,侵删。

wx.getSystemInfo(OBJECT)

获取系统信息。

OBJECT参数说明:

参数 类型 必填 说明
success Function 接口调用成功的回调
fail Function 接口调用失败的回调函数
complete Function 接口调用结束的回调函数(调用成功、失败都会执行)

success回调参数说明:

参数 说明 最低版本
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)

}
})

wx.getSystemInfoSync()

获取系统信息同步接口

阅读剩余部分

相关阅读 >>

微信小程序 运维中心realtimelogsearch

微信小程序 运力方使用onorderadd

微信小程序 sitemap配置

微信小程序 用户信息-授权

微信小程序 快递接口(商家查看)-联系我们

微信小程序api 文件-保存文件到本地

微信小程序 用户信息-开放数据校验与解密

微信小程序 小程序使用opendelivery

微信小程序api 实时语音-取消监听在线状态变化事件

微信小程序特有页面间传参方式

更多相关阅读请进入《微信小程序》频道 >>




打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...