demingshangjia/App.vue

34 lines
639 B
Vue
Raw Normal View History

2020-06-11 01:16:12 +00:00
<script>
2020-07-29 07:21:40 +00:00
export default {
2020-08-08 07:09:56 +00:00
globalData: {
im: {}
},
2020-07-29 07:21:40 +00:00
onLaunch: function() {
2020-08-08 07:09:56 +00:00
getApp().globalData.im = this.imService
2020-07-29 07:21:40 +00:00
console.log('App Launch');
2020-08-25 03:12:33 +00:00
// 缓存token
uni.getStorage({
key: "token",
success: (res) => {
uni.switchTab({
url: "/pages/index/index"
})
}
})
2020-07-29 07:21:40 +00:00
},
onShow: function() {
console.log('App Show');
},
onHide: function() {
console.log('App Hide');
2020-06-11 01:16:12 +00:00
}
2020-07-29 07:21:40 +00:00
};
2020-06-11 01:16:12 +00:00
</script>
2020-06-11 09:54:15 +00:00
<style lang="scss">
2020-07-29 07:21:40 +00:00
/*每个页面公共css */
2020-08-08 10:34:43 +00:00
/* #ifndef APP-PLUS-NVUE */
2020-07-29 07:21:40 +00:00
@import 'uview-ui/index.scss';
2020-08-08 10:34:43 +00:00
/* #endif*/
2020-08-08 07:09:56 +00:00
</style>