接口在H5,小程序和模拟机上均能运行,而且这个页面中的另一个接口是可以实现的,只有这个接口不行 两个接口的写法一致,只是请求的路径不同,请各位大佬帮忙看看
let appid = plus.runtime.appid;
let version = ""
let _this = this
plus.runtime.getProperty(appid, async (app) => {
version = app.version;
try{
await this.$api.get(this.baseUrl + "/app/manage/getLatest/bgdt").then(res => {
let data = res.data.data;
this.url = data.fileUrl;
uni.showModal({
title:data.appVersion
})
this.content = data.appVersionDescription;
let oldversion = version.split(".");
let newversion = data.appVersion.split(".");;
for (var i = 0; i < oldversion.length; i++) {
if (oldversion[i] < newversion[i]) {
this.isupdateApp = false
this.isnewversion = data.appVersion
}
}
})
}catch(e){
console.log(e)
}
})
将showmodal放在接口外面,app中可以弹出,放入接口内,则弹出失败
0 个回复