123456789101112131415161718192021222324252627282930 |
- <script>
- export default {
- onLaunch: function() {
- // #ifndef H5 || APP-NVUE || APP-PLUS || APP-PLUS-NVUE
- const updateManager = uni.getUpdateManager();
- updateManager.onUpdateReady(function(res) {
- uni.showModal({
- title: '更新提示',
- content: '新版本已经准备好,是否重启应用?',
- success(res) {
- if (res.confirm) {
- updateManager.applyUpdate();
- }
- }
- });
- });
- // #endif
- },
- onShow: function() {
- console.log('App Show')
- },
- onHide: function() {
- console.log('App Hide')
- }
- }
- </script>
- <style lang="scss">
- @import './common/common.scss';
- </style>
|