NurseStationApp/pages/startup/startup.vue
2022-11-09 16:38:05 +08:00

85 lines
1.4 KiB
Vue

<template>
<view class="app">
<image src="../../static/logo.png" mode=""></image>
<view class="title">
泉医到家
</view>
</view>
</template>
<script>
export default {
data() {
return {
};
},
onLoad() {
let that = this
try {
const value = uni.getStorageSync('patientId');
if (value) {
setTimeout(() => {
uni.reLaunch({
url: '/pages/homepage/homepage'
});
}, 2000);
} else {
setTimeout(() => {
uni.reLaunch({
url: '/pages/login/login'
});
}, 2000);
}
} catch (e) {
setTimeout(() => {
uni.reLaunch({
url: '/pages/login/login'
});
}, 2000);
}
// uni.getStorage({
// key: 'patientId',
// success: function(res) {
// setTimeout(() => {
// uni.reLaunch({
// url: '/pages/homepage/homepage'
// });
// }, 2000);
// },
// fail() {
// setTimeout(() => {
// uni.reLaunch({
// url: '/pages/login/login'
// });
// }, 2000);
// }
// });
},
methods: {},
}
</script>
<style lang="scss">
image {
width: 50%;
height: 200rpx;
position: absolute;
left: 25%;
top: 28%;
}
.title {
width: 80%;
height: 48rpx;
font-size: 49rpx;
text-align: center;
font-family: DengXian;
font-weight: bold;
color: #000000;
position: absolute;
top: 50%;
left: 10%;
}
</style>