2023-11-07 10:24:08 +08:00
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
onLaunch: function () {
|
|
|
|
console.log('App Launch')
|
|
|
|
this.isLogin()
|
|
|
|
},
|
|
|
|
onShow: function () {
|
|
|
|
console.log('App Show')
|
|
|
|
},
|
|
|
|
onHide: function () {
|
|
|
|
console.log('App Hide')
|
|
|
|
},
|
|
|
|
methods:{
|
|
|
|
// 是否登录
|
|
|
|
isLogin() {
|
|
|
|
if(!this.$store.getters.getUserInfo.USER_ID) {
|
|
|
|
uni.redirectTo({
|
|
|
|
url: '/pages/login/login'
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
/*每个页面公共css */
|
|
|
|
@import "uview-ui/index.scss";
|
|
|
|
@import './styles/theme.scss';
|
|
|
|
@import './styles/uview.scss';
|
|
|
|
@import './styles/home_style.scss';
|
2024-08-08 11:08:55 +08:00
|
|
|
@import './styles/common.scss';
|
2023-11-07 10:24:08 +08:00
|
|
|
</style>
|