优化选项

This commit is contained in:
2023-12-29 00:59:58 +08:00
parent 5c7d95a2be
commit 8733d995ec
2 changed files with 27 additions and 6 deletions

View File

@@ -6,7 +6,9 @@
import {useStore} from '@/store/index.js'
const store = useStore()
import api from "@/api/index.js"
const h_index = ref(0)
onLoad(() => {
getHospitalList()
// console.log(useStore.userInfo)
userinfo.value = JSON.parse(uni.getStorageSync('userInfo'))
console.log(userinfo.value)
@@ -163,6 +165,10 @@
else{
uni.clearStorage();
}
}
function bindPickerChange(e) {
console.log(hospitals.value )
h_index.value = e.detail.value
}
</script>
<template>
@@ -216,8 +222,11 @@
手术医院</view>
<view class="rbc-content-row rbc-content-right">
<!-- {{h_info?.name}} -->
<uni-combox :border="false" @input="onInputH" :candidates="hospitals" placeholder="请选择医院" @choosed="toChooseH" v-model="userinfo.HospitalId"></uni-combox>
<!-- <uni-combox :border="false" @input="onInputH" :candidates="hospitals" placeholder="请选择医院" @choosed="toChooseH" v-model="userinfo.HospitalId"></uni-combox> -->
<!-- <uni-icons type="forward" color="gray" size="20"></uni-icons> -->
<picker @change="bindPickerChange" :value="h_index" :range="hospitals" range-key="name">
<view class="uni-input">{{hospitals[h_index]?.name}}</view>
</picker>
</view>
</view>
</view>