Device Information
Current device information is accessed via $w.device
.
Properties
viewport: Object
Window Information
Property | Type | Description |
---|---|---|
width | number | Window width (changes in real time) |
height | number | Window height (changes in real time) |
networkType: string
- Mobile network type
(wifi/5g/4g/3g/2g/other)
IOS
Empty in all cases except for the WeChat built-in browser- WeChat built-in browser only has
wifi 3g 2g other
- Non-mini program only has
2g 3g 4g other
- Variable value is empty on non-mobile devices