以Promise风格调用: 不支持
监听小程序有版本更新事件。客户端主动触发下载(无需开发者触发),下载成功后回调
function callback
App({ onLaunch() { // 此处仅为效果展示,建议在app.js中的OnLaunch()中调用 const updateManager = tt.getUpdateManager(); updateManager.onUpdateFailed((err) => { console.log("版本更新失败原因", err); tt.showToast({ title: "版本更新失败,请重试", icon: "none", }); }); }, });