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.
315 lines
5.8 KiB
315 lines
5.8 KiB
<script>
|
|
export default {
|
|
globalData:{
|
|
doctorId:'',
|
|
doctoridStorageKey:'doctor_id'
|
|
},
|
|
onLaunch: function(option) {
|
|
console.log(option,'option====');
|
|
var did = false
|
|
|
|
// #ifdef H5
|
|
try {
|
|
const pathParts = location.pathname.split('/');
|
|
const paramIndex = pathParts.indexOf('did');
|
|
|
|
if(paramIndex !== -1 && paramIndex + 1 < pathParts.length) {
|
|
did = pathParts[paramIndex + 1]
|
|
}
|
|
} catch (e) {
|
|
}
|
|
// #endif
|
|
|
|
// #ifdef MP-WEIXIN
|
|
if(option.query && option.query.did) did = option.query.did
|
|
|
|
if(option.query && option.query.scene) {
|
|
var scene = decodeURIComponent(option.query.scene)
|
|
const params = {};
|
|
scene.split('&').forEach(item => {
|
|
const pair = item.split('=');
|
|
if (pair.length === 2) {
|
|
params[pair[0]] = pair[1];
|
|
}
|
|
});
|
|
if(params['depart_id']) did = params['depart_id'];
|
|
option.query.logintype = params['logintype'];
|
|
uni.clearStorageSync()
|
|
}
|
|
// #endif
|
|
|
|
if(option.query && option.query.checkin_depart_id) {
|
|
uni.setStorageSync('checkin_depart_id', option.query.checkin_depart_id)
|
|
}
|
|
|
|
if(!did){
|
|
var doctor_id = uni.getStorageSync(this.globalData.doctoridStorageKey)
|
|
if(doctor_id){
|
|
this.globalData.doctorId = doctor_id
|
|
}else{
|
|
|
|
// #ifdef H5
|
|
document.getElementsByTagName('body')[0].innerHTML = ""
|
|
setTimeout(function(){
|
|
alert('请扫描二维码或点击分享网站链接进入');
|
|
}, 500)
|
|
// #endif
|
|
|
|
// #ifdef MP-WEIXIN
|
|
uni.showModal({
|
|
title: '请扫描小程序二维码进入',
|
|
content: '',
|
|
showCancel: false,
|
|
success: ({ confirm, cancel }) => {}
|
|
})
|
|
// #endif
|
|
|
|
}
|
|
}else{
|
|
this.globalData.doctorId = did
|
|
uni.setStorageSync(this.globalData.doctoridStorageKey, did)
|
|
|
|
// #ifdef H5
|
|
location.href = '/'
|
|
// #endif
|
|
|
|
}
|
|
},
|
|
onShow: function() {},
|
|
onHide: function() {}
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
view,
|
|
text,
|
|
h1,
|
|
h2,
|
|
h3,
|
|
h4,
|
|
h5,
|
|
p,
|
|
span,
|
|
a,
|
|
div,
|
|
ol,
|
|
ul,
|
|
li,
|
|
dl,
|
|
dt,
|
|
dd,
|
|
table,
|
|
tbody,
|
|
tfoot,
|
|
thead,
|
|
tr,
|
|
th,
|
|
td,
|
|
input,
|
|
textarea,
|
|
form {
|
|
margin: 0;
|
|
padding: 0;
|
|
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
}
|
|
input,
|
|
textarea {
|
|
outline: none;
|
|
}
|
|
input[type="text"]{
|
|
border-radius: 12rpx;
|
|
-webkit-appearance: none;
|
|
}
|
|
page,html,body{
|
|
height: 100%;
|
|
margin:0 auto;
|
|
padding: 0;
|
|
background: #F8F6F9;
|
|
-webkit-text-size-adjust: 100%;
|
|
font-family: "PingFang SC","Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
font-weight: normal;
|
|
height: 100%;
|
|
}
|
|
.fl {
|
|
float: left;
|
|
}
|
|
.fr {
|
|
float: right;
|
|
}
|
|
.clear:after {
|
|
display: block;
|
|
content: '';
|
|
clear: both;
|
|
}
|
|
.hide {
|
|
display: none;
|
|
}
|
|
.hover{
|
|
opacity: 0.8;
|
|
}
|
|
.hover2{
|
|
background: #DEF3DB !important;
|
|
}
|
|
.ft18{
|
|
font-size:18rpx;
|
|
line-height: 18rpx;
|
|
}
|
|
.ft22{
|
|
font-size:22rpx;
|
|
line-height: 22rpx;
|
|
}
|
|
.ft24{
|
|
font-size:24rpx;
|
|
line-height: 24rpx;
|
|
}
|
|
.ft26{
|
|
font-size:26rpx;
|
|
line-height: 18rpx;
|
|
}
|
|
.ft28{
|
|
font-size:28rpx;
|
|
line-height: 28rpx;
|
|
}
|
|
.ft30{
|
|
font-size:30rpx;
|
|
line-height: 30rpx;
|
|
}
|
|
.ft32{
|
|
font-size:32rpx;
|
|
line-height: 32rpx;
|
|
}
|
|
.ft34{
|
|
font-size:34rpx;
|
|
line-height: 34rpx;
|
|
}
|
|
.ft40{
|
|
font-size:40rpx;
|
|
line-height: 40rpx;
|
|
}
|
|
.ft50{
|
|
font-size:50rpx;
|
|
line-height: 50rpx;
|
|
}
|
|
.PfScMedium{
|
|
font-weight: 600;
|
|
}
|
|
.PfScSemibold{
|
|
font-weight: 700;
|
|
}
|
|
|
|
@supports (-webkit-touch-callout: none) {
|
|
.PfScMedium{
|
|
font-weight: 500;
|
|
}
|
|
.PfScSemibold{
|
|
font-weight: 600;
|
|
}
|
|
}
|
|
|
|
.over{
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
word-break: break-all;
|
|
}
|
|
.over2{
|
|
overflow: hidden;
|
|
display: -webkit-box;
|
|
-webkit-line-clamp: 2;
|
|
-webkit-box-orient: vertical;
|
|
text-overflow: ellipsis;
|
|
word-break: break-all;
|
|
}
|
|
.over3{
|
|
-webkit-line-clamp: 3 !important;
|
|
}
|
|
.over4{
|
|
-webkit-line-clamp: 4 !important;
|
|
}
|
|
.over5{
|
|
-webkit-line-clamp: 5 !important;
|
|
}
|
|
.btPadding{
|
|
padding-bottom: constant(safe-area-inset-bottom);
|
|
padding-bottom: env(safe-area-inset-bottom);
|
|
}
|
|
.btn{
|
|
text-align: center;
|
|
}
|
|
.primary.btn{
|
|
background-color: #39D067;
|
|
color: #FFFFFF;
|
|
}
|
|
.cancel.btn{
|
|
background-color: #F1F2F3;
|
|
color: #616266;
|
|
}
|
|
.btn.noclick{
|
|
background: #CFCFCF;
|
|
color: #FFFFFF;
|
|
}
|
|
.btn.btn1{
|
|
width: 300rpx;
|
|
height: 90rpx;
|
|
line-height: 90rpx;
|
|
border-radius: 12rpx;
|
|
}
|
|
.btn.btn2{
|
|
width: 666rpx;
|
|
height: 92rpx;
|
|
line-height: 92rpx;
|
|
border-radius: 16rpx;
|
|
}
|
|
.btn.btn3{
|
|
width: 646rpx;
|
|
height: 92rpx;
|
|
line-height: 92rpx;
|
|
border-radius: 16rpx;
|
|
}
|
|
.flex{
|
|
display: flex;
|
|
}
|
|
.line36{
|
|
line-height: 36rpx !important;
|
|
height: 36rpx !important;
|
|
}
|
|
.line40{
|
|
line-height: 40rpx !important;
|
|
}
|
|
.height40{
|
|
line-height: 40rpx !important;
|
|
height: 40rpx !important;
|
|
}
|
|
|
|
.pages-visitors-visitors ::v-deep .uni-actionsheet__cell{
|
|
color:#31333B !important;
|
|
font-size: 34rpx;
|
|
line-height: 112rpx;
|
|
height: 112rpx;
|
|
padding: 0rpx 6rpx;
|
|
}
|
|
.pages-visitors-visitors ::v-deep uni-actionsheet .uni-actionsheet {
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: #F6F6F6;
|
|
border-radius: 20rpx 20rpx 0 0;
|
|
padding-bottom: constant(safe-area-inset-bottom);
|
|
padding-bottom: env(safe-area-inset-bottom);
|
|
}
|
|
.pages-visitors-visitors ::v-deep .uni-actionsheet__menu{
|
|
border-radius: 20rpx 20rpx 0 0;
|
|
}
|
|
|
|
.pages-visitors-visitors ::v-deep uni-actionsheet .uni-actionsheet__cell:before {
|
|
border-top: 2rpx solid #EEEEEE;
|
|
color: #EEEEEE;
|
|
}
|
|
.pages-visitors-visitors ::v-deep uni-actionsheet .uni-actionsheet__action{
|
|
margin-top: 24rpx;
|
|
margin-bottom: 10rpx;
|
|
}
|
|
|
|
|
|
|
|
</style>
|
|
|