当前位置:网站首页>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:
边栏推荐
- Getting Started with Tkinter
- BOW/DOM (top)
- server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none failed
- Unity-LineRenderer显示一条线
- Socket Review and I/0 Model
- [Open class preview]: Research and application of super-resolution technology in the field of video image quality enhancement
- 登录业务实现(单点登录+微信扫码+短信服务)
- Architecture Battalion Module 8 Homework
- 每月一书(202207):《Swift编程权威指南》
- focus on!Haitai Fangyuan joins the "Personal Information Protection Self-discipline Convention"
猜你喜欢

In Golang go-redis cluster mode, new connections are constantly created, and the problem of decreased efficiency is solved

How to identify fake reptiles?

Realization of character makeup

Count characters in UTF-8 string function

Document management and tools in the development process

The latest masterpiece!Alibaba just released the interview reference guide (Taishan version), I just brushed it for 29 days

IDA PRO中汇编结构体识别

Implementation of a sequence table

ReentrantLock原理(未完待续)

How to debug TestCafe
随机推荐
cas and spin locks (is lightweight locks spin locks)
高通cDSP简单编程例子(实现查询高通cDSP使用率、签名),RK3588 npu使用率查询
每月一书(202207):《Swift编程权威指南》
利用反射实现一个管理对象信息的简单框架
【AcWing】The 62nd Weekly Match 【2022.07.30】
PCB stackup design
Bika LIMS open source LIMS set - use of SENAITE (detection process)
-xms -xmx(information value)
server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none failed
Count characters in UTF-8 string function
#yyds dry goods inventory# Interview must brush TOP101: the entry node of the ring in the linked list
Qualcomm cDSP simple programming example (to query Qualcomm cDSP usage, signature), RK3588 npu usage query
Golang must know the Go Mod command
The whole network is on the verge of triggering, and the all-round assistant for content distribution from media people - Rongmeibao
架构实战营模块八作业
Embedded development has no passion, is it normal?
AI 自动写代码插件 Copilot(副驾驶员)
Audio alignment using cross-correlation
Chapter VII
iNeuOS industrial Internet operating system, equipment operation and maintenance business and "low-code" form development tools