You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
775 B
38 lines
775 B
<script>
|
|
export default {
|
|
globalData: {
|
|
navbarHeight: 44,
|
|
},
|
|
onLaunch: async function() {
|
|
console.log('App Launch')
|
|
this.globalData.navbarHeight = uni.getSystemInfoSync().safeArea.top
|
|
|
|
const token = this.vuex_token ? this.vuex_token : uni.getStorageSync('lifeData')?.vuex_token;
|
|
if (token) {
|
|
try {
|
|
const {
|
|
user
|
|
} = await this.$u.api.getUserInfo()
|
|
this.$u.vuex('vuex_user', user)
|
|
} catch (err) {
|
|
console.error(err)
|
|
}
|
|
}
|
|
},
|
|
onShow: function() {
|
|
console.log('App Show')
|
|
},
|
|
onHide: function() {
|
|
console.log('App Hide')
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
/*每个页面公共css */
|
|
@import "uview-ui/index.scss";
|
|
|
|
page {
|
|
background-color: #f2f3f7;
|
|
}
|
|
</style> |