当前位置:网站首页>Applet version update
Applet version update
2022-06-13 04:23:00 【Twinkle, twinkle, twinkle, twinkle, twinkle, twinkle, twinkle, 】
// Check for new versions
if (wx.canIUse('getUpdateManager')) {
const updateManager = wx.getUpdateManager()
updateManager.onCheckForUpdate(function (res) {
if (res.hasUpdate) {
updateManager.onUpdateReady(function () {
wx.showModal({
title: ' Update hints ',
content: ' The new version is ready , Restart application or not ?',
success: function (res) {
if (res.confirm) {
updateManager.applyUpdate()
}
}
})
})
updateManager.onUpdateFailed(function () {
wx.showModal({
title: ' There is a new version ~',
content: ' The new version is online ~, Please delete the current applet , Search again open ~'
})
})
}
})
} else {
wx.showModal({
title: ' Tips ',
content: ' Current wechat version is too low , This feature is not available , Please upgrade to the latest wechat version and try again .'
})
}
边栏推荐
- 基于DE2-115平台的VGA显示
- Single chip microcomputer: d/a output
- The WebView case of flutter
- Reread the classic: end to end object detection with transformers
- Day45. data analysis practice (1): supermarket operation data analysis
- Analysis of the implementation principle of an open source markdown to rich text editor
- 小程序基础入门(黑马学习笔记)
- [sword finger offer] interview question 24 Reverse linked list
- February 25, 2021 (Archaeology 12 year Landbridge provincial competition)
- Unity shader learning 004 shader debugging platform difference third-party debugging tools
猜你喜欢
Promise combined with await
Intervention analysis + pseudo regression
Reread the classic: end to end object detection with transformers
MCU: RS485 communication and Modbus Protocol
Solution to failure to download files by wechat scanning QR code
Use ASE encryption and decryption cache encapsulation in Vue project
Google Chrome browser reports an error: net:: err_ BLOCKED_ BY_ CLIENT
Understand the pseudo static configuration to solve the 404 problem of refreshing the page of the deployment project
Value of line height
R: Airline customer value analysis practice
随机推荐
【剑指Offer】面试题24.反转链表
[note]vs2015 compilation of masm32 using MASM32 Library
Ego planner code analysis ----cmakelists Txt and package xml
Hugo blog building tutorial
Redis persistence mode AOF and RDB
Interpretation of usb-if bc1.2 charging protocol
dumi 搭建文档型博客
Notes on uni app
The most detailed swing transformer mask of window attachment in history -- Shaoshuai
Data analysis report
一款開源的Markdown轉富文本編輯器的實現原理剖析
[sword finger offer] interview question 25 Merge two ordered linked lists
Answer private message @ Tiantian Wx //2022-6-12 C language 51 single chip microcomputer led analog traffic light
小程序基础入门(黑马学习笔记)
Filter and listener
1.4.2 Capital Market Theroy
Google Chrome browser reports an error: net:: err_ BLOCKED_ BY_ CLIENT
Common ways to traverse map sets
建模雜談系列143 數據處理、分析與决策系統開發的梳理
2019 Blue Bridge Cup