This commit is contained in:
2024-03-20 14:44:01 +08:00
parent 81758accdc
commit 5d6abb0219
7 changed files with 227 additions and 176 deletions

View File

@@ -15,16 +15,21 @@
onShow((e) => {
getLbtList()
// console.log("store:",store)
// if(store.userInfo && !store.operation_info) { //登录过 且 未填写手术信息
// getHospitalList()
// setTimeout(()=>{
// inputDialog.value.open()
// },0)
// }
// let s = `$http({code:'1s'});if`
// // let arr = /\$http\((\S*)\)\;if/.exec(s);
// let arr = s.match(/\$http\((.*)\)\;if/)
// console.log(arr[1])
// if(!store.userInfo && !store.operation_info) { //登录过 且 未填写手术信息
if(!store.userInfo) { //没登录过
// console.log("没有store.userInfo",store.userInfo)
// getHospitalList()
setTimeout(()=>{
inputDialog.value.open()
},0)
// uni.navigateTo({
// url:'/pages/login/login'
// })
} else {
setTimeout(()=>{
inputDialog.value.close()
},0)
}
})
// 变量
@@ -176,9 +181,13 @@
}
function bindPickerChange(e) {
console.log(hospitals.value )
h_index.value = e.detail.value
}
// 手机号登录
async function getPhoneNumber (e) {
await store.getAccess_token({code:e.detail.code})
toClose()
}
</script>
<template>
<view class="content page-box">
@@ -251,9 +260,9 @@
</view>
<uni-popup ref="inputDialog" @tap="toBlur" :is-mask-click='false'>
<view class="pop-box">
<view class="pb-title">完善手术信息</view>
<view class="pb-title">您好, 请先登录</view>
<view class="pb-content">
<view class="pb-item">
<!-- <view class="pb-item">
<view class="pb-item-left">已经手术</view>
<view class="pb-item-right">
<radio-group @change="radioChange">
@@ -265,38 +274,42 @@
<view class="pb-item">
<view class="pb-item-left">手术时间</view>
<view class="pb-item-right">
<!-- <uni-datetime-picker type="date" :clear-icon="false" v-model="single" @maskClick="maskClick" /> -->
<uniDatetimePicker type="date" :clear-icon="false" v-model="surgery_time" @maskClick="maskClick" ></uniDatetimePicker>
</view>
</view>
<view class="pb-item">
<view class="pb-item-left">医院名称</view>
<view class="pb-item-right">
<!-- <uniEasyinput @tap.stop="focusFunc" suffixIcon="search" v-model="hValue" focus placeholder="请输入内容" @iconClick="onClickH"></uniEasyinput>
<view class="h_res_show_aprt" v-if="hospitals">
<view v-for="(item,i) in hospitals" @tap.stop="toChooseH(item)" class="h_res_show_aprt_row text-ellipsis-1">
{{item.name}}
</view>
</view> -->
<!-- <uni-combox @input="onClickH" :candidates="hospitals" placeholder="请选择医院" @choosed="toChooseH" v-model="hValue"></uni-combox> -->
<picker @change="bindPickerChange" :value="h_index" :range="hospitals" range-key="name">
<view class="uni-input">{{hospitals[h_index]?.name}}</view>
</picker>
</view>
</view>
<view class="pb-item pb-item-btn" @tap="toSave">提交</view>
</view> -->
<!-- <view class="pb-item pb-item-btn" @tap="toSave">提交</view> -->
<!-- <view class="pb-item pb-item-btn" @tap="toSave">获取手机号</view> -->
<button class="buy-btn" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">手机号登录</button>
</view>
</view>
<view class="pop-close" @tap="toClose">
<!-- <view class="pop-close" @tap="toClose">
关闭
</view>
<!-- <uni-popup-dialog ref="inputClose" mode="input" title="输入内容" value="对话框预置提示内容!"
placeholder="请输入内容" @confirm="dialogInputConfirm"></uni-popup-dialog> -->
</view> -->
</uni-popup>
<aikefu />
</view>
</template>
<style scoped lang="scss">
.buy-btn{
display: block;
margin-top:1rem;
background-color: #26758d;
color: white;
border-radius: 50rpx;
font-weight: 200;
font-size: 24rpx;
width: 80%;
padding: 10rpx 0;
margin: 0 auto;
}
.test-card{
padding: 30rpx 20rpx;
margin: 20rpx 0;