the code in App.vue is as follows
onLaunch (options) {
//
console.log(options.scene)
//
if (wx.canIUse("getUpdateManager")) {
const updateManager = wx.getUpdateManager()
updateManager.onCheckForUpdate(function (res) {
//
if (res.hasUpdate) {
updateManager.onUpdateReady(function () {
wx.showModal({
title: "",
content: "",
success: function (res) {
if (res.confirm) {
// applyUpdate
updateManager.applyUpdate()
}
}
})
})
updateManager.onUpdateFailed(function () {
//
wx.showModal({
title: "~",
content: "~~"
})
})
}
})
} else {
//
wx.showModal({
title: "",
content: ""
})
}
}