demingshangjia/App.vue
2020-08-25 11:12:33 +08:00

34 lines
639 B
Vue

<script>
export default {
globalData: {
im: {}
},
onLaunch: function() {
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>