var wgtVer = null;
function plusReady() {
// 获取本地应用资源版本号
plus.runtime.getProperty(plus.runtime.appid, function(inf) {
wgtVer = inf.version;
console.log("当前应用版本:" + wgtVer);
checkUpdate();
});
}
if(window.plus) {
plusReady();
} else {
document.addEventListener('plusready', plusReady, false);
}
// 检测更新
var checkUrl = "http://wechat.wisdomitservices.cn/mobile/update.php";
function checkUpdate() {
plus.nativeUI.showWaiting("检测更新...");
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {
switch(xhr.readyState) {
case 4:
plus.nativeUI.closeWaiting();
if(xhr.status == 200) {
console.log("检测更新成
该博客介绍了如何将wgt文件安装到手机上,包括检测更新、下载wgt文件、安装更新以及处理安装失败的问题。当更新时遇到'Not a zip archive'错误,文章提供了可能的解决方案。
最低0.47元/天 解锁文章
3048

被折叠的 条评论
为什么被折叠?



