xinelu-applet-ui/pages/startup/startup.vue

85 lines
1.5 KiB
Vue
Raw Normal View History

2023-09-22 11:08:14 +08:00
<template>
<view class="app">
<image src="../../static/logo.png" mode=""></image>
<view class="title">
泉医到家
</view>
</view>
</template>
<script>
import {
createMobileToken
2023-09-22 11:30:57 +08:00
} from '@/api/pagesB/login/index.js'
2023-09-22 11:08:14 +08:00
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,
}
},
onLoad(query) {
// scene 需要使用 decodeURIComponent 才能获取到生成二维码时传入的 scene
const scene = decodeURIComponent(query.scene)
if (scene >= 0) {
uni.setStorageSync("invitationPatientId", scene)
}
},
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>