收藏
回答

企业微信UpdateManager.applyUpdate()触发后小程序为什么没有更新到最新版本?

框架类型 问题类型 API/组件名称 终端类型 微信版本 基础库版本
小程序 Bug UpdateManager.applyUpdate() 微信iOS客户端 企业微信 3.1.18(75051) 2.12.3
onLaunch() {
    let cpage = this;
    const updateManager = wx.getUpdateManager()


    updateManager.onCheckForUpdate(function (res{
      // 请求完新版本信息的回调
      console.log(res.hasUpdate)
    })


    updateManager.onUpdateReady(function () {
      wx.showModal({
        title'更新提示',
        content'新版本已经准备好,是否重启应用?',
        success(res) {
          if (res.confirm) {
            // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
            updateManager.applyUpdate()
          }
        }
      })
    })
}
回答关注问题邀请回答
收藏

1 个回答

登录 后发表内容