<script>
|
// import config from '@/common/config.js'
|
const config = require('@/common/config.js')
|
export default {
|
globalData: {
|
circleId: '',
|
circlelat: '',
|
circlelng: '',
|
windowHeight: 0, //屏幕的高度
|
rpxR: 0, //换算的单位
|
statusBarHeight: uni.getSystemInfoSync()['statusBarHeight'], //不同机型导航栏高度
|
isPerfectInfo: false, //是否完善个人信息
|
cityCode: 0, //用户所在城市编码
|
...config.config,
|
loginCallback: null,
|
},
|
onLaunch: function(options) {
|
let that = this;
|
// #ifdef MP-WEIXIN
|
const updateManager = uni.getUpdateManager()
|
updateManager.onCheckForUpdate(function(res) {
|
// 请求完新版本信息的回调
|
|
})
|
updateManager.onUpdateReady(function() {
|
uni.showModal({
|
title: '更新提示',
|
content: '新版本已经准备好,是否重启应用?',
|
success(res) {
|
if (res.confirm) {
|
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
|
updateManager.applyUpdate()
|
}
|
}
|
})
|
})
|
updateManager.onUpdateFailed(function() {
|
// 新版本下载失败
|
})
|
// #endif
|
//获取屏幕的高度
|
uni.getSystemInfo({
|
success: function(res) {
|
var model = res.model;
|
//判断设备是iPhone X
|
if (model.search('iPhone X') != -1) {
|
that.globalData.isIpx = true;
|
} else {
|
that.globalData.isIpx = false;
|
}
|
that.globalData.windowHeight = res.windowHeight;
|
that.globalData.rpxR = res.windowHeight / res.windowWidth;
|
}
|
});
|
|
|
},
|
onShow: function() {
|
console.log('App Show')
|
},
|
onHide: function() {
|
console.log('App Hide')
|
},
|
methods: {
|
|
}
|
}
|
</script>
|
|
<style lang="scss">
|
/*每个页面公共css */
|
@import "@/uni_modules/uview-ui/index.scss";
|
@import "@/common/scss/public.scss";
|
.u-empty{
|
margin-top: 340rpx !important;
|
}
|
</style>
|