demingshangjia/App.vue

39 lines
780 B
Vue
Raw Normal View History

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