当前位置:网站首页>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 .'
})
}
边栏推荐
- Ultra quicksort reverse sequence pair
- Et framework -22 creating serverinfo entities and events
- 出现Could not find com.scwang.smart:refresh-layout-kernel:2.0.3.Required by: project :app 无法加载第三方包情况
- 史上最详细的Swin-Transformer 掩码机制(mask of window attentation)————shaoshuai
- 1-72 convert string to decimal integer
- MySQL索引
- XOR prefix and +map maintenance
- 5g China Unicom ap:b SMS ASCII transcoding requirements
- dumi 搭建文檔型博客
- Use the visual studio code terminal to execute the command, and the prompt "because running scripts is prohibited on this system" will give an error
猜你喜欢
Single chip microcomputer: basic concepts of a/d and d/a
Common encryption and decryption function encapsulation - AES encryption and decryption
[test development] use case
[test development] fundamentals of software testing
SCM signal generator program
[test development] advanced part - Classification of various test technologies
Single chip microcomputer: main index of a/d (analog-to-digital conversion)
[kubernetes series] pod chapter actual operation
MCU: pcf8591 hardware interface
一款開源的Markdown轉富文本編輯器的實現原理剖析
随机推荐
120. triangle minimum path sum - Dynamic Planning
Redis-HyperLogLog-基数统计算法
MCU: pcf8591 hardware interface
MCU: NEC protocol infrared remote controller
在线音频调节技术汇总
高等数学(第七版)同济大学 习题1-3 个人解答
Day45. data analysis practice (1): supermarket operation data analysis
SQL advanced challenge (1 - 5)
ACM ICPC
Sword finger offer II 022 Entry node of a link in a linked list
SCM: introduction to Modbus communication protocol
Single chip microcomputer: a/d differential input signal
Principle, composition and functions of sensors of Dajiang UAV flight control system
一款開源的Markdown轉富文本編輯器的實現原理剖析
Principle and control program of single chip microcomputer serial port communication
Single chip microcomputer: d/a output
小程序基础入门(黑马学习笔记)
Interpretation of mobile phone private charging protocol
Suffix Automaton
Advanced Mathematics (Seventh Edition) Tongji University exercises 1-3 personal solutions