// 獲取設(shè)備信息
wx.getSystemInfoSync()
// 返回的是對(duì)象
即: ↓↓↓
{
SDKVersion: "2.12.2"
batteryLevel: 100
benchmarkLevel: 1
brand: "devtools"
deviceOrientation: "portrait"
devicePixelRatio: 2
fontSizeSetting: 16
language: "zh_CN"
model: "iPhone 5"
pixelRatio: 2
platform: "devtools"
safeArea: {
right: 320,
bottom: 568,
left: 0,
top: 20,
width: 320
}
screenHeight: 568
screenWidth: 320
statusBarHeight: 20
system: "iOS 10.0.1"
version: "7.0.4"
windowHeight: 504 // 屏高
windowWidth: 320 // 屏寬
}
// 獲取設(shè)備網(wǎng)絡(luò)信息
wx.getNetworkType(OBJECT)
即:↓↓↓
Promise {
[[PromiseStatus]]: "resolved"
[[PromiseValue]]:{
errMsg: "getNetworkType:ok",
networkType: "wifi" // 網(wǎng)絡(luò)狀態(tài)
}
}
// 撥打電話
wx.makePhoneCall({
phoneNumber: '即將撥打的號(hào)碼'
})