更新提示
This commit is contained in:
1 parent
879e74ebda
commit
a9552b3d1a
2 files changed
+36
-16
No files matched your search
@@ -4,7 +4,6 @@ const store = require('../../utils/store');
|
||||
const config = require('../../config/index');
|
||||
|
||||
const app = getApp();
|
||||
const updateManager = wx.getUpdateManager();
|
||||
|
||||
const PAGE_SIZE = 10;
|
||||
|
||||
@@ -107,21 +106,6 @@ Page({
|
||||
.catch((err) => console.error('[index] 文章加载失败', err));
|
||||
},
|
||||
|
||||
onShow() {
|
||||
updateManager.onCheckForUpdate(() => {});
|
||||
updateManager.onUpdateReady(() => {
|
||||
wx.showModal({
|
||||
title: store.cfg('app.update.title'),
|
||||
showCancel: false,
|
||||
content: store.cfg('app.update.content'),
|
||||
success: (res) => {
|
||||
if (res.confirm) updateManager.applyUpdate();
|
||||
},
|
||||
});
|
||||
});
|
||||
updateManager.onUpdateFailed(() => {});
|
||||
},
|
||||
|
||||
onPullDownRefresh() {
|
||||
Promise.all([this.reload()]).then(() => wx.stopPullDownRefresh());
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user