2022-10-12 16:54:34 +08:00
|
|
|
<template>
|
|
|
|
|
<view class="app">
|
2022-11-09 16:38:05 +08:00
|
|
|
<image src="../../static/logo.png" mode=""></image>
|
2022-10-12 16:54:34 +08:00
|
|
|
<view class="title">
|
|
|
|
|
泉医到家
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
2022-11-23 16:41:09 +08:00
|
|
|
import {
|
|
|
|
|
appLoginpwd
|
|
|
|
|
} from '../../api/login/index.js'
|
2022-10-12 16:54:34 +08:00
|
|
|
export default {
|
|
|
|
|
data() {
|
2022-11-23 16:41:09 +08:00
|
|
|
return {};
|
2022-10-12 16:54:34 +08:00
|
|
|
},
|
2022-11-10 14:20:16 +08:00
|
|
|
onShow() {
|
2022-11-03 17:26:15 +08:00
|
|
|
let that = this
|
2022-11-09 16:38:05 +08:00
|
|
|
try {
|
2022-11-23 16:41:09 +08:00
|
|
|
const value = uni.getStorageSync('phone');
|
|
|
|
|
const value2 = uni.getStorageSync('password');
|
|
|
|
|
if (value && value2) {
|
|
|
|
|
appLoginpwd(value, value2).then(res => {
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
uni.switchTab({
|
|
|
|
|
url: '/pages/homepage/homepage',
|
|
|
|
|
})
|
|
|
|
|
}, 2000);
|
|
|
|
|
} else {
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
uni.reLaunch({
|
|
|
|
|
url: '/pages/login/login'
|
|
|
|
|
});
|
|
|
|
|
}, 2000);
|
|
|
|
|
}
|
|
|
|
|
})
|
2022-11-09 16:38:05 +08:00
|
|
|
} else {
|
2022-11-03 17:26:15 +08:00
|
|
|
setTimeout(() => {
|
|
|
|
|
uni.reLaunch({
|
|
|
|
|
url: '/pages/login/login'
|
|
|
|
|
});
|
|
|
|
|
}, 2000);
|
|
|
|
|
}
|
2022-11-09 16:38:05 +08:00
|
|
|
} 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);
|
|
|
|
|
// }
|
|
|
|
|
// });
|
2022-10-12 16:54:34 +08:00
|
|
|
},
|
2022-11-03 17:26:15 +08:00
|
|
|
methods: {},
|
2022-10-12 16:54:34 +08:00
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss">
|
2022-11-23 16:41:09 +08:00
|
|
|
.app {
|
2022-11-11 17:23:23 +08:00
|
|
|
height: 100vh;
|
2023-02-23 10:45:26 +08:00
|
|
|
background-color: #fff;
|
2022-11-11 17:23:23 +08:00
|
|
|
}
|
2022-11-23 16:41:09 +08:00
|
|
|
|
2022-10-12 16:54:34 +08:00
|
|
|
image {
|
2022-10-12 17:45:22 +08:00
|
|
|
width: 50%;
|
2023-02-23 10:45:26 +08:00
|
|
|
height: 400rpx;
|
2022-10-12 16:54:34 +08:00
|
|
|
position: absolute;
|
2022-10-12 17:45:22 +08:00
|
|
|
left: 25%;
|
2022-10-24 14:42:03 +08:00
|
|
|
top: 28%;
|
2022-10-12 16:54:34 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.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>
|