free性ⅴideo另类重口,欧美激情视频一区二区三区免费,国内精品国产三级国产av,国产激情久久久久久熟女老人av,欧美成人乱码一区二区三区

大學(xué)生新聞網(wǎng),大學(xué)生新聞發(fā)布平臺(tái)
大學(xué)生新聞網(wǎng)
大學(xué)生新聞大學(xué)生活校園文學(xué)大學(xué)生村官
社會(huì)實(shí)踐活動(dòng)社會(huì)實(shí)踐經(jīng)歷社會(huì)實(shí)踐報(bào)告社會(huì)實(shí)踐總結(jié)社會(huì)實(shí)踐心得
全國(guó)排名校友會(huì)版軟科排名分類排名本科排名一本排名二本排名?婆琶學(xué)校地址
求職簡(jiǎn)歷職場(chǎng)法則面試技巧職場(chǎng)故事求職招聘大學(xué)生就業(yè)
英語(yǔ)學(xué)習(xí)計(jì)算機(jī)學(xué)習(xí)電氣工程機(jī)械工程經(jīng)濟(jì)管理建筑設(shè)計(jì)財(cái)務(wù)會(huì)計(jì)
申請(qǐng)書證明書檢討書自薦信演講稿心得體會(huì)調(diào)查報(bào)告讀后感求職信推薦信其它范文

小程序wx.getSystemInfoSync

Object wx.getSystemInfoSync()
wx.getSystemInfo 的同步版本

以 Promise 風(fēng)格 調(diào)用:支持
小程序插件:支持,需要小程序基礎(chǔ)庫(kù)版本不低于 1.9.6
微信 Windows 版:支持
微信 Mac 版:支持
返回值
Object res
屬性    類型    說(shuō)明    最低版本
brand    string    設(shè)備品牌    1.5.0
model    string    設(shè)備型號(hào)。新機(jī)型剛推出一段時(shí)間會(huì)顯示unknown,微信會(huì)盡快進(jìn)行適配。    
pixelRatio    number    設(shè)備像素比    
screenWidth    number    屏幕寬度,單位px    1.1.0
screenHeight    number    屏幕高度,單位px    1.1.0
windowWidth    number    可使用窗口寬度,單位px    
windowHeight    number    可使用窗口高度,單位px    
statusBarHeight    number    狀態(tài)欄的高度,單位px    1.9.0
language    string    微信設(shè)置的語(yǔ)言    
version    string    微信版本號(hào)    
system    string    操作系統(tǒng)及版本    
platform    string    客戶端平臺(tái)    
合法值    說(shuō)明
ios    iOS微信(包含 iPhone、iPad)
android    Android微信
windows    Windows微信
mac    macOS微信
fontSizeSetting    number    用戶字體大。▎挝籶x)。以微信客戶端「我-設(shè)置-通用-字體大小」中的設(shè)置為準(zhǔn)    1.5.0
SDKVersion    string    客戶端基礎(chǔ)庫(kù)版本    1.1.0
benchmarkLevel    number    設(shè)備性能等級(jí)(僅 Android)。取值為:-2 或 0(該設(shè)備無(wú)法運(yùn)行小游戲),-1(性能未知),>=1(設(shè)備性能值,該值越高,設(shè)備性能越好,目前最高不到50)    1.8.0
albumAuthorized    boolean    允許微信使用相冊(cè)的開(kāi)關(guān)(僅 iOS 有效)    2.6.0
cameraAuthorized    boolean    允許微信使用攝像頭的開(kāi)關(guān)    2.6.0
locationAuthorized    boolean    允許微信使用定位的開(kāi)關(guān)    2.6.0
microphoneAuthorized    boolean    允許微信使用麥克風(fēng)的開(kāi)關(guān)    2.6.0
notificationAuthorized    boolean    允許微信通知的開(kāi)關(guān)    2.6.0
notificationAlertAuthorized    boolean    允許微信通知帶有提醒的開(kāi)關(guān)(僅 iOS 有效)    2.6.0
notificationBadgeAuthorized    boolean    允許微信通知帶有標(biāo)記的開(kāi)關(guān)(僅 iOS 有效)    2.6.0
notificationSoundAuthorized    boolean    允許微信通知帶有聲音的開(kāi)關(guān)(僅 iOS 有效)    2.6.0
phoneCalendarAuthorized    boolean    允許微信使用日歷的開(kāi)關(guān)    2.19.3
bluetoothEnabled    boolean    藍(lán)牙的系統(tǒng)開(kāi)關(guān)    2.6.0
locationEnabled    boolean    地理位置的系統(tǒng)開(kāi)關(guān)    2.6.0
wifiEnabled    boolean    Wi-Fi 的系統(tǒng)開(kāi)關(guān)    2.6.0
safeArea    Object    在豎屏正方向下的安全區(qū)域    2.7.0
結(jié)構(gòu)屬性    類型    說(shuō)明
left    number    安全區(qū)域左上角橫坐標(biāo)
right    number    安全區(qū)域右下角橫坐標(biāo)
top    number    安全區(qū)域左上角縱坐標(biāo)
bottom    number    安全區(qū)域右下角縱坐標(biāo)
width    number    安全區(qū)域的寬度,單位邏輯像素
height    number    安全區(qū)域的高度,單位邏輯像素
locationReducedAccuracy    boolean    `true` 表示模糊定位,`false` 表示精確定位,僅 iOS 支持    
theme    string    系統(tǒng)當(dāng)前主題,取值為`light`或`dark`,全局配置`"darkmode":true`時(shí)才能獲取,否則為 undefined (不支持小游戲)    2.11.0
合法值    說(shuō)明
dark    深色主題
light    淺色主題
host    Object    當(dāng)前小程序運(yùn)行的宿主環(huán)境    2.12.3
結(jié)構(gòu)屬性    類型    說(shuō)明
appId    string    宿主 app 對(duì)應(yīng)的 appId
enableDebug    boolean    是否已打開(kāi)調(diào)試?赏ㄟ^(guò)右上角菜單或 wx.setEnableDebug 打開(kāi)調(diào)試。    2.15.0
deviceOrientation    string    設(shè)備方向    
合法值    說(shuō)明
portrait    豎屏
landscape    橫屏
示例代碼

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)
  }
})

try {
  const res = wx.getSystemInfoSync()
  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)
} catch (e) {
  // Do something when catch error
}
    作者:大學(xué)生新聞網(wǎng)    來(lái)源:大學(xué)生新聞網(wǎng)
    發(fā)布時(shí)間:2025-04-02    閱讀:
    掃一掃 分享悅讀
  • 小程序wx.getSystemInfoAsync
  • 異步獲取系統(tǒng)信息。需要一定的微信客戶端版本支持,在不支持的客戶端上,會(huì)使用同步實(shí)現(xiàn)來(lái)返回。
  • 04-02 關(guān)注:0