/// export function updateApp() { const updateManager = wx.getUpdateManager(); updateManager.onCheckForUpdate((res) => { if (res.hasUpdate) { updateManager.onUpdateReady(() => { wx.showModal({ title: '更新提示', content: '新版本已经准备好,是否重启应用?', success(result) { if (result.confirm) { updateManager.applyUpdate(); } } }); }); updateManager.onUpdateFailed(() => { wx.showToast({ title: '更新失败,请检查网络' }); }); } }); }