当前位置:网站首页>The uniapp applet checks and prompts for updates
The uniapp applet checks and prompts for updates
2022-07-31 22:10:00 【Han Mo Ming Shang】
The code above:
xcxCheckUpdate.js
export default function xcxCheckUpdate(){const updateManager = uni.getUpdateManager();updateManager.onCheckForUpdate(function (res) {// Callback for requesting new version information});updateManager.onUpdateReady(function (res) {uni.showModal({title: 'Update Tips',content: 'The new version is ready, do you want to restart the application?',success(res) {if (res.confirm) {// The new version has been downloaded, call applyUpdate to apply the new version and restartupdateManager.applyUpdate();}}});});updateManager.onUpdateFailed(function (res) {// Failed to download new version});}App.vue:
边栏推荐
- BM3 flips the nodes in the linked list in groups of k
- Summary of the classic drawing method of histogram
- 第七章
- Implementation of a sequence table
- [Open class preview]: Research and application of super-resolution technology in the field of video image quality enhancement
- GateWay implements load balancing
- 架构实战营模块 8 作业
- 信息学奥赛一本通 1941:【07NOIP普及组】Hanoi双塔问题 | 洛谷 P1096 [NOIP2007 普及组] Hanoi 双塔问题
- The principle of ReentrantLock (to be continued)
- linux view redis version command (linux view mysql version number)
猜你喜欢

Chapter Six

Basic configuration of OSPFv3

Go mode tidy reports an error go warning “all” matched no packages

登录业务实现(单点登录+微信扫码+短信服务)

The whole network is on the verge of triggering, and the all-round assistant for content distribution from media people - Rongmeibao

GateWay implements load balancing

嵌入式开发没有激情了,正常吗?

Embedded development has no passion, is it normal?

Implementation of a sequence table

角色妆容的实现
随机推荐
Flink_CDC construction and simple use
【论文精读】iNeRF
C程序设计-方法与实践(清华大学出版社)习题解析
20. Support vector machine - knowledge of mathematical principles
求n以内的素数
顺序表的实现
linux view redis version command (linux view mysql version number)
A shortcut to search for specific character content in idea
MATLAB program design and application 2.4 Common internal functions of MATLAB
全网一触即发,自媒体人的内容分发全能助手——融媒宝
有一说一,外包公司到底值不值得去?
Book of the Month (202207): The Definitive Guide to Swift Programming
Mobile web development 02
21. Support Vector Machine - Introduction to Kernel Functions
server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none failed
Transfer Learning - Domain Adaptation
useragent online lookup
PCB叠层设计
The old music player WinAmp released version 5.9 RC1: migrated to VS 2019, completely rebuilt, compatible with Win11
VOT2021比赛简介