在onUpdateReady中使用showModal时,ios出现模态框闪关
const updateManager = wx.getUpdateManager() updateManager.onCheckForUpdate(function (res) { }) updateManager.onUpdateReady(function () { wx.showModal({ title: '更新提示', content: '新版本已经准备好,需重启应用', showCancel: false, success: function (res) { if (res.confirm) { updateManager.applyUpdate() } } }) }) |
线上新版本审核发布后,小程序执行到上面代码中的wx.showModal时,ios出现弹窗弹出后秒关问题,导致版本无法及时更新!
而Android机更新正常!
