惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
F
Fortinet All Blogs
量子位
G
Google Developers Blog
J
Java Code Geeks
N
Netflix TechBlog - Medium
博客园 - 聂微东
宝玉的分享
宝玉的分享
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
月光博客
月光博客
The Cloudflare Blog
Apple Machine Learning Research
Apple Machine Learning Research
爱范儿
爱范儿
雷峰网
雷峰网
M
MIT News - Artificial intelligence
T
Tailwind CSS Blog
V
Visual Studio Blog
阮一峰的网络日志
阮一峰的网络日志
博客园 - 三生石上(FineUI控件)
Microsoft Azure Blog
Microsoft Azure Blog
aimingoo的专栏
aimingoo的专栏
Martin Fowler
Martin Fowler
有赞技术团队
有赞技术团队
T
The Blog of Author Tim Ferriss

博客园 - luckylou

Vuex和Pinia css3 transform scale 和 translate 不同步 translate 放前面 给nodejs分配内存 vue 图片旋转 CSS Transition通过改变Height实现展开收起元素 JS中?? 与 || 的区别 error:03000086:digital envelope routines::initialization error antdesign vue3 a-input-search 清空 css 重置focus样式 sass 中使用/deep/报错(已解决) Object.entries() 凡事有度,过则为灾 h5 判断嵌入微信小程序页面 HTML5页面仅允许拍照 html2canvas 下载图片 anvas保存图片时,谷歌浏览器Chrome报错【解决方案】Not allowed to navigate top frame to data URL append节点原节点消失 clone js 根据 location 获取query string 参数 Easyui常用按钮图标汇总
微信小程序代码提交发布之后,必须删除原来的小程序才会更新...
luckylou · 2022-06-23 · via 博客园 - luckylou
//检查微信小程序是否最新版本

checkForUpdate: function () {

const updateManager = wx.getUpdateManager()

updateManager.onUpdateReady(function () {

wx.showModal({

title: '更新提示',

content: '新版本已经准备好,是否重启应用?',

success: function (res) {

if (res.confirm) {

updateManager.applyUpdate()

}

}

})

})

updateManager.onUpdateFailed(function () { })

},

将此函数放到app.js中,在

onLaunch

this.checkForUpdate()

中调用即可