1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <script>
- import checkUpdate from '@/uni_modules/uni-upgrade-center-app/utils/check-update';
- export default {
- onLaunch: function() {
-
- const updateManager = wx.getUpdateManager();
- updateManager.onCheckForUpdate(function(res) {
-
-
- });
- updateManager.onUpdateReady(function() {
- wx.showModal({
- title: '更新提示',
- content: '新版本已经准备好,是否重启应用?',
- success: function(res) {
- if (res.confirm) {
-
- updateManager.applyUpdate();
- }
- }
- });
- });
- updateManager.onUpdateFailed(function() {
-
- });
-
-
- checkUpdate();
-
- },
- onShow: function() {
-
- },
- onHide: function() {
-
- }
- };
- </script>
- <style lang="scss">
- @import 'uview-ui/index.scss';
- </style>
- <style>
- @import url('./static/css/iconfont.css');
- @import url('./static/css/common.css');
- </style>
|