Commit 239a6c51c05e334d353960fdca10c679f605b63c
1 parent
19d6d515
检查更新的报警优化
Showing
1 changed file
with
3 additions
and
1 deletions
app.js
| @@ -777,7 +777,9 @@ App({ | @@ -777,7 +777,9 @@ App({ | ||
| 777 | if (wx.canIUse('getUpdateManager')) { | 777 | if (wx.canIUse('getUpdateManager')) { |
| 778 | //创建 UpdateManager 实例 | 778 | //创建 UpdateManager 实例 |
| 779 | const updateManager = wx.getUpdateManager(); | 779 | const updateManager = wx.getUpdateManager(); |
| 780 | - console.log('是否进入模拟更新'); | 780 | + if(!updateManager) { |
| 781 | + return false; | ||
| 782 | + } | ||
| 781 | //检测版本更新 | 783 | //检测版本更新 |
| 782 | updateManager.onCheckForUpdate(function(res) { | 784 | updateManager.onCheckForUpdate(function(res) { |
| 783 | console.log('是否获取版本'); | 785 | console.log('是否获取版本'); |