demingshangjia/App.vue

39 lines
789 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>