APP更新
在App.vue下onLaunch中,来获取版本号等相关信息
// #ifdef APP-PLUS
plus.runtime.getProperty(plus.runtime.appid,(widgetIngo)=>{
console.log(widgetIngo);
const {name,versionCode}=widgetIngo
})
// #endif
- "appid": "HBuilder" 表示应用程序的ID是"HBuilder"。
- "version": "1.0.2" 表示应用程序的版本号是"1.0.2"。
- "name": "wang" 表示应用程序的名称是"wang"。
- "versionCode": "100" 表示应用程序的版本代码是"100"。
- "description": "" 表示应用程序的描述为空。
- "author": "" 表示应用程序的作者为空。
- "email": "" 表示应用程序的作者的电子邮件为空。
- "features": ["uninview"] 表示应用程序的特性中包含"uninview"。
然后通过uni.request({})调用接口传给后台,然后进行判断
小程序更新
const undate=uni.getUpadteManager()