nurseWeChatAppletUI/pages/startup/startup.vue
2023-02-27 11:28:17 +08:00

78 lines
1.3 KiB
Vue

<template>
<view class="app">
<image src="../../static/logo.png" mode=""></image>
<view class="title">
泉医到家
</view>
</view>
</template>
<script>
import {
createMobileToken
} from '@/api/login/index.js'
export default {
data() {
return {};
},
//1.分享给朋友
onShareAppMessage(res) {
let pages = getCurrentPages();
let url = pages[pages.length - 1].$page.fullPath
return {
title: '泉医到家',
path: url,
}
},
//2.分享到朋友圈
onShareTimeline(res) {
let pages = getCurrentPages();
let url = pages[pages.length - 1].$page.fullPath
return {
title: '泉医到家',
path: url,
}
},
onShow() {
var that = this
createMobileToken().then(res => {
uni.setStorageSync("token", res.data.token)
})
setTimeout(() => {
uni.reLaunch({
url: '/pages/homepage/homepage'
});
}, 2000);
},
methods: {},
}
</script>
<style lang="scss">
.app {
height: 100vh;
background-color: #fff;
}
image {
width: 50%;
height: 400rpx;
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>