uniapp的plus获取数据
Posted 苏格拉的底
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了uniapp的plus获取数据相关的知识,希望对你有一定的参考价值。
switch ( plus.os.name )
case "Android":
// Android平台: plus.android.*
break;
case "iOS":
// iOS平台: plus.ios.*
break;
default:
// 其它平台
break;
switch (uni.getSystemInfoSync().platform)
case 'android':
console.log('运行在android上')
break;
case 'ios':
console.log('运行在IOS上')
break;
default:
console.log('运行在开发者工具上')
this.show = true
break;
- 获取屏幕、元素的高度宽度
uni.getSystemInfo(OBJECT)
screenWidth 屏幕宽度
screenHeight 屏幕高度
windowWidth 可使用窗口宽度
windowHeight 可使用窗口高度
windowTop 可使用窗口的顶部位置 App、H5
windowBottom 可使用窗口的底部位置 App、H5
statusBarHeight 状态栏的高
uni.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);
);
以上是关于uniapp的plus获取数据的主要内容,如果未能解决你的问题,请参考以下文章