MD5在远程服务器报错,远程URL没有MD5码。
热更新太麻烦
实现方法:wx-downloader.js =>
声明全局变量string version为版本号
if (wx.getStorageSync('version') != version) {
wx.setStorageSync('version', version);
downloadRemoteFile(item, callback);
} else {
var filePath = item.url;
// Read from package
fs.access({
path: filePath,
success: function () {
if (item.type && non_text_format.indexOf(item.type) !== -1) {
nextPipe(item, callback);
}
else {
readText(item, callback);
}
},
fail: function (res) {
readFromLocal(item, callback);
}
});
}
在 Read from package的位置替换上面的code
构建时不需要勾选MD5
每次更新版本改版本号