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.
41 lines
770 B
41 lines
770 B
<script> |
|
export default { |
|
onLaunch: function (options) { |
|
uni.hideTabBar() |
|
}, |
|
onReady() { |
|
|
|
}, |
|
onShow: function () { |
|
console.log("App Show"); |
|
const value = uni.getStorageSync("token"); |
|
console.log("App Launch", !value); |
|
if (!value) { |
|
uni.redirectTo({ |
|
url: "/pages/login/login", |
|
}); |
|
return false |
|
} |
|
|
|
const userInfo = uni.getStorageSync("userinfo"); |
|
if (userInfo) { |
|
// 处理用户数据 |
|
this.$store.dispatch("changeTabbar", userInfo.role_id); |
|
} |
|
|
|
}, |
|
onHide: function () { |
|
console.log("App Hide"); |
|
}, |
|
}; |
|
</script> |
|
|
|
<style lang="scss"> |
|
@import "@/uni_modules/uview-ui/index.scss"; |
|
@import "@/static/scss/index.scss"; |
|
|
|
/*每个页面公共css */ |
|
page { |
|
background: #fff; |
|
} |
|
</style>
|
|
|