当前位置:网站首页>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:
边栏推荐
- Basic Grammar Introduction of Carbon Tutorial (Tutorial)
- 高通cDSP简单编程例子(实现查询高通cDSP使用率、签名),RK3588 npu使用率查询
- JS basic exercises
- Qualcomm cDSP simple programming example (to query Qualcomm cDSP usage, signature), RK3588 npu usage query
- 「SDOI2016」征途 题解
- The old music player WinAmp released version 5.9 RC1: migrated to VS 2019, completely rebuilt, compatible with Win11
- GateWay implements load balancing
- One thing to say, is outsourcing company worth it?
- 角色妆容的实现
- Quick Start Tutorial for flyway
猜你喜欢

Socket Review and I/0 Model

How to debug TestCafe

PCB叠层设计

【论文精读】iNeRF

What's wrong with the sql syntax in my sql

Arduino框架下STM32全系列开发固件安装指南

Recognize anomalies (you will understand after reading this)

Flink_CDC construction and simple use

Bionic caterpillar robot source code

The old music player WinAmp released version 5.9 RC1: migrated to VS 2019, completely rebuilt, compatible with Win11
随机推荐
Shell script quick start to actual combat -02
MATLAB program design and application 2.4 Common internal functions of MATLAB
TestCafeSummary
NVIDIA has begun testing graphics products with AD106 and AD107 GPU cores
Realize serial port receiving data based on STM32 ring queue
Go1.18 upgrade function - Fuzz test from scratch in Go language
[NLP] What is the memory of the model!
Returns a zero-length array or empty collection, do not return null
[Code Hoof Set Novice Village 600 Questions] Merge two numbers without passing a character array
A solution to the server encountered an internal error that prevented it from fulfilling this request [easy to understand]
利用反射实现一个管理对象信息的简单框架
Qualcomm cDSP simple programming example (to query Qualcomm cDSP usage, signature), RK3588 npu usage query
Pytorch lstm time series prediction problem stepping on the pit "recommended collection"
关注!海泰方圆加入《个人信息保护自律公约》
GateWay implements load balancing
高通cDSP简单编程例子(实现查询高通cDSP使用率、签名),RK3588 npu使用率查询
hboot与recovery、boot.img、system.img
Implementation of a sequence table
A shortcut to search for specific character content in idea
「APIO2010」巡逻 题解