zoukankan      html  css  js  c++  java
  • 小程序获取系统信息

    wx.getSystemInfo(Object object)

    属性类型默认值是否必填说明支持版本
    success function   接口调用成功的回调函数  
    fail function   接口调用失败的回调函数  
    complete function   接口调用结束的回调函数(调用成功、失败都会执

     

     

     

     

    属性类型说明支持版本
    brand string 手机品牌 >=1.5.0
    model string 手机型号  
    pixelRatio number 设备像素比  
    screenWidth number 屏幕宽度 >=1.1.0
    screenHeight number 屏幕高度 >=1.1.0
    windowWidth number 可使用窗口宽度  
    windowHeight number 可使用窗口高度  
    statusBarHeight number 状态栏的高度 >=1.9.0
    language string 微信设置的语言  
    version string 微信版本号  
    system string 操作系统版本  
    platform string 客户端平台  
    fontSizeSetting number 用户字体大小设置。以“我-设置-通用-字体大小”中的设置为准,单位 px。 >=1.5.0
    SDKVersion string 客户端基础库版本 >=1.1.0
    benchmarkLevel number (仅Android小游戏) 性能等级,-2 或 0:该设备无法运行小游戏,-1:性能未知,>=1 设备性能值,该值越高,设备性能越好 (目前设备最高不到50)
    wx.getSystemInfo({
      success (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)
      }
    })
  • 相关阅读:
    BZOJ 1051: [HAOI2006]受欢迎的牛( tarjan )
    BZOJ 2208: [Jsoi2010]连通数( DFS )
    js效果-鼠标提示框
    CSS-背景
    CSS-文本
    tomcat 安装 for Mac
    CSS选择器基础
    POJ3349-Snowflake Snow Snowflakes-Hash
    数据库的三大设计范式
    HDU5120-Intersection-两个圆环相交面积
  • 原文地址:https://www.cnblogs.com/studyh5/p/9898648.html
Copyright © 2011-2022 走看看