This commit is contained in:
zoujiandong
2025-06-10 17:40:29 +08:00
parent db955ff4f3
commit e25eb25063
11 changed files with 1341 additions and 675 deletions
+16 -8
View File
@@ -42,7 +42,7 @@ const props=defineProps({
},
type:{
type:String,
default:'',
default:'home',
},
navName:{
type:String,
@@ -50,12 +50,13 @@ const props=defineProps({
}
})
const emit = defineEmits(['changeWord'])
const placeholder = ref("输入疾病名称、标题、作者搜索");
watch(()=>props.type,(newVal)=>{
if(newVal==='doctor'){
placeholder.value='输入医生姓名'
}else if(newVal==='hospital'){
placeholder.value='输入医院名称'
if(newVal==='home'){
//placeholder.value='输入医生姓名'
}else if(newVal==='caseTalk'){
//placeholder.value='输入医院名称'
}
},{immediate: true })
@@ -68,6 +69,15 @@ const goMy=()=>{
})
}
const search=()=>{
if(props.type=='home'){
uni.navigateTo({
url: `/pages/search/search?keyWord=${keyWord.value}`,
});
}else if(props.type=='caseTalk'){
uni.navigateTo({
url: `/pages/specialList/specialList?keyWord=${keyWord.value}`,
});
}
// if (!keyWord.value) {
// return uni.showToast({
// title: "请输入关键字",
@@ -75,9 +85,7 @@ const search=()=>{
// });
// }
uni.navigateTo({
url: `/pages/search/search?keyWord=${keyWord.value}`,
});
}
</script>