UpdateManager.onUpdateFailed

    示例

    代码示例

    • 在 swan 文件中
    • 在 js 文件中
    1. data: { },
    2. onLoad() {
    3. const updateManager = swan.getUpdateManager();
    4. updateManager.onUpdateFailed(function (res) {
    5. console.log("res", res);
    6. swan.showModal({
    7. title: '更新提示',
    8. });
    9. }
    10. });