uniapp的plus获取数据与版本号

https://www.html5plus.org/doc/zh_cn/runtime.html#plus.runtime.versionCode

plus.runtime.version plus.runtime.getProperty拿到的版本

plus.runtime.version拿到的是manifest.json中设置的apk/ipa版本号,整包更新的版本

plus.runtime.getProperty(plus.runtime.appid, function(widgetInfo) {
console.log(widgetInfo.version);
})

widgetInfo.version 拿到的当前应用的版本如果热更新过就是热更新的版本

Hbuilder 连接手机
plus.os.name:"Android"
plus.runtime.appid:"HBuilder"
plus.runtime.version:13.6.4
plus.runtime.versionCode:130604

{
"appid":"HBuilder",
"version":"1.0.01",
"name":"辰戍定时系统",
"versionCode":"10001",
"description":"辰戍定时系统",
"author":"",
"email":"",
"features":["geolocation","maps","push","oauth","uninview"]
} 

uniapp官网 - API - 设备 - 系统
获取系统信息:
异步(uni.getSystemInfo)
同步(uni.getSystemInfoSync)
https://uniapp.dcloud.net.cn/api/system/info.html#getsysteminfo-new-fields

取得手机平台
https://blog.csdn.net/userzou/article/details/123399912
uni.getSystemInfoSync().platform
https://www.html5plus.org/doc/zh_cn/device.html#plus.os.name

posted @   寒冷的雨呢  阅读(1414)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 单元测试从入门到精通
点击右上角即可分享
微信分享提示