<script> export default { globalData: { isMobieDevice: true, physicalInvoiceList: [], // 新增物理发票信息 btmInset: 0 }, onLaunch: function() { //小程序自动更新 if (uni.canIUse('getUpdateManager')) { const updateManager = uni.getUpdateManager(); updateManager.onCheckForUpdate(res => { // 请求完新版本信息的回调 if (res.hasUpdate) { updateManager.onUpdateReady(() => { uni.showModal({ title: this.$t('index.update-note'), content: this.$t('index.msg-update'), success: res => { if (res.confirm) { // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启 updateManager.applyUpdate(); } } }); }); updateManager.onUpdateFailed(() => { // 新的版本下载失败 uni.showModal({ title: this.$t('index.msg-updated'), content: this.$t('index.msg-update-tips') }); }); } }); } let _this = this; wx.getSystemInfo({ success: function(res) { let platform = res.platform _this.globalData.isMobieDevice = platform == "ios" || platform == "android" || platform == "devtools" } }) const { safeAreaInsets } = uni.getSystemInfoSync() this.btmInset = safeAreaInsets.bottom }, onShow: function() { console.log('App Show') }, onHide: function() { console.log('App Hide') } } </script> <style lang="scss"> /*每个页面公共css */ @import '@/uni_modules/uni-scss/index.scss'; /* #ifndef APP-NVUE */ @import '@/static/customicons.css'; // 设置整个项目的背景色 page { background-color: #F5F5F6; } /* #endif */ .example-info { font-size: 14px; color: #333; padding: 10px; } .custom-uni-list { /deep/ .uni-list--border-top { left: 15px !important; right: 15px !important; } /deep/ .uni-list--border-bottom { left: 15px !important; right: 15px !important; } /deep/ .uni-list--border::after { left: 15px !important; right: 15px !important; } /deep/ .uni-list-item__content { flex: none !important; } /deep/ .uni-list-item__content-title { color: #697077 !important; } /deep/ .uni-list-item__extra { flex: auto; } /deep/ .uni-list-item__extra-text { font-size: 14px !important; color: #222222 !important; } .custom-uni-value { flex: auto; text-align: right; font-size: 14px; color: #B60001; } .list-item-left { position: absolute; flex: auto; left: 240rpx; text-align: left; font-size: 14px; color: #333; } } </style>