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.
48 lines
998 B
48 lines
998 B
|
1 year ago
|
<script>
|
||
|
|
export default {
|
||
|
|
onLaunch: function () {
|
||
|
|
|
||
|
|
const value = uni.getStorageSync("token");
|
||
|
|
if (!value) {
|
||
|
|
|
||
|
|
uni.navigateTo({
|
||
|
|
url: "/pages/login/login",
|
||
|
|
});
|
||
|
|
}
|
||
|
|
console.log("App Launch",value);
|
||
|
|
// this.$common.getStorage("user").then((res) => {
|
||
|
|
// if (res == null || res == "") {
|
||
|
|
// uni.redirectTo({
|
||
|
|
// url: "/pages/login/login"
|
||
|
|
// });
|
||
|
|
// }
|
||
|
|
// });
|
||
|
|
|
||
|
|
const _self = this;
|
||
|
|
// const _handlePush = function(message) {
|
||
|
|
// uni.navigateTo({
|
||
|
|
// url: "/pages/task/index"
|
||
|
|
// });
|
||
|
|
// };
|
||
|
|
// plus.push.addEventListener('click', _handlePush);
|
||
|
|
// plus.push.addEventListener('receive', _handlePush);
|
||
|
|
},
|
||
|
|
onShow: function () {
|
||
|
|
console.log("App Show");
|
||
|
|
},
|
||
|
|
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>
|
||
|
|
|