You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
570 B
33 lines
570 B
<script>
|
|
export default {
|
|
onLaunch: async function() {
|
|
try {
|
|
if(this.base.isNull(this.vuex_token)){
|
|
uni.redirectTo({
|
|
url:'/package_sub/login/login'
|
|
})
|
|
}else{
|
|
const user = await this.$u.api.getUser()
|
|
console.log("user",user)
|
|
this.$u.vuex('vuex_user', user)
|
|
}
|
|
|
|
|
|
|
|
} catch (err) {
|
|
console.error(err)
|
|
}
|
|
},
|
|
onShow: function() {
|
|
|
|
},
|
|
onHide: function() {
|
|
console.log('App Hide')
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
/*每个页面公共css */
|
|
@import "uview-ui/index.scss";
|
|
</style> |