demingshangjia/App.vue
2020-09-10 14:48:17 +08:00

39 lines
780 B
Vue

<script>
export default {
globalData: {
im: {}
},
onLaunch: function() {
// 禁止旋转
// #ifdef APP-PLUS
plus.screen.lockOrientation('portrait-primary');
// #endif
getApp().globalData.im = this.imService
console.log('App Launch');
// 缓存token
uni.getStorage({
key: "token",
success: (res) => {
// uni.switchTab({
// url: "/pages/index/index"
// })
}
})
},
onShow: function() {
console.log('App Show');
},
onHide: function() {
console.log('App Hide');
}
};
</script>
<style lang="scss">
/*每个页面公共css */
/* #ifndef APP-PLUS-NVUE */
@import 'uview-ui/index.scss';
/* #endif*/
</style>