5.29
This commit is contained in:
@@ -1,9 +1,17 @@
|
||||
<template>
|
||||
<view class="navbox">
|
||||
<view class="bg"></view>
|
||||
<view class="namebox">
|
||||
<view class="logo">logo</view>
|
||||
<view class="name">肝胆相照临床病例库</view>
|
||||
<view class="namebox">
|
||||
<view class="logo">
|
||||
<up--image
|
||||
:src="logoImg"
|
||||
width="62rpx"
|
||||
height="62rpx"
|
||||
radius="50%"
|
||||
|
||||
></up--image>
|
||||
</view>
|
||||
<view class="name">{{ navName }}</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
@@ -41,6 +49,7 @@
|
||||
padding-top: 102rpx;
|
||||
margin: 0rpx 30rpx 0rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.name {
|
||||
margin-left: 16rpx;
|
||||
font-size: 30rpx;
|
||||
|
||||
@@ -2,25 +2,25 @@
|
||||
<view class="navbox">
|
||||
<view class="bg"></view>
|
||||
<view class="namebox">
|
||||
<view class="logo">logo</view>
|
||||
<view class="logo">
|
||||
<up--image
|
||||
:src="logoImg"
|
||||
width="62rpx"
|
||||
height="62rpx"
|
||||
radius="50%"
|
||||
|
||||
></up--image>
|
||||
</view>
|
||||
<view class="name">{{ navName }}</view>
|
||||
|
||||
</view>
|
||||
<view class="search">
|
||||
<view class="searchwrap">
|
||||
|
||||
<!-- <up--image
|
||||
:src="ssImg"
|
||||
class="ssImg"
|
||||
mode="widthFix"
|
||||
width="30rpx"
|
||||
height="30rpx"
|
||||
></up--image> -->
|
||||
<input type="text" class="ipt" v-model="keyWord" :placeholder="placeholder"/>
|
||||
<up-icon name="search" size="26" color="#999" @click="search"></up-icon>
|
||||
</view>
|
||||
<up--image
|
||||
:src="headImg"
|
||||
@click="goMy"
|
||||
mode="widthFix"
|
||||
width="62rpx"
|
||||
height="62rpx"
|
||||
@@ -33,7 +33,7 @@
|
||||
<script setup>
|
||||
import { ref, watch} from "vue";
|
||||
import headImg from "@/static/headImg.png";
|
||||
import ssImg from "@/static/ss.png";
|
||||
import logoImg from "@/static/logo.png";
|
||||
const keyWord = ref('');
|
||||
const props=defineProps({
|
||||
searchWord:{
|
||||
@@ -62,6 +62,11 @@ watch(()=>props.type,(newVal)=>{
|
||||
watch(()=>props.searchWord,(newVal)=>{
|
||||
keyWord.value=newVal
|
||||
})
|
||||
const goMy=()=>{
|
||||
uni.navigateTo({
|
||||
url:'/pages/my/my'
|
||||
})
|
||||
}
|
||||
const search=()=>{
|
||||
// if (!keyWord.value) {
|
||||
// return uni.showToast({
|
||||
@@ -104,6 +109,7 @@ const search=()=>{
|
||||
padding-top: 102rpx;
|
||||
margin: 0rpx 30rpx 0rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.name {
|
||||
margin-left: 16rpx;
|
||||
font-size: 30rpx;
|
||||
|
||||
@@ -0,0 +1,155 @@
|
||||
<template>
|
||||
<view class="navbox">
|
||||
<view class="bg"></view>
|
||||
<view class="namebox">
|
||||
<view class="back" @click="goBack">
|
||||
<u-icon name="arrow-left" color="#000" size="24"></u-icon>
|
||||
</view>
|
||||
<view class="logo">
|
||||
<up--image
|
||||
:src="logoImg"
|
||||
width="62rpx"
|
||||
height="62rpx"
|
||||
radius="50%"
|
||||
|
||||
></up--image>
|
||||
</view>
|
||||
<view class="name">{{ navName }}</view>
|
||||
</view>
|
||||
<view class="search">
|
||||
<view class="searchwrap">
|
||||
<input type="text" class="ipt" v-model="keyWord" :placeholder="placeholder"/>
|
||||
<up-icon name="search" size="26" color="#999" @click="search"></up-icon>
|
||||
</view>
|
||||
<up--image
|
||||
:src="headImg"
|
||||
@click="goMy"
|
||||
mode="widthFix"
|
||||
width="62rpx"
|
||||
height="62rpx"
|
||||
radius="50%"
|
||||
></up--image>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, watch} from "vue";
|
||||
import headImg from "@/static/headImg.png";
|
||||
import logoImg from "@/static/logo.png";
|
||||
const keyWord = ref('');
|
||||
const props=defineProps({
|
||||
searchWord:{
|
||||
type:String,
|
||||
default:''
|
||||
},
|
||||
type:{
|
||||
type:String,
|
||||
default:'',
|
||||
},
|
||||
navName:{
|
||||
type:String,
|
||||
default:'肝胆相照临床病例库',
|
||||
}
|
||||
|
||||
})
|
||||
const placeholder = ref("输入疾病名称、标题、作者搜索");
|
||||
watch(()=>props.type,(newVal)=>{
|
||||
if(newVal==='doctor'){
|
||||
placeholder.value='输入医生姓名'
|
||||
}else if(newVal==='hospital'){
|
||||
placeholder.value='输入医院名称'
|
||||
}
|
||||
|
||||
},{immediate: true })
|
||||
watch(()=>props.searchWord,(newVal)=>{
|
||||
keyWord.value=newVal
|
||||
})
|
||||
const goMy=()=>{
|
||||
uni.navigateTo({
|
||||
url:'/pages/my/my'
|
||||
})
|
||||
}
|
||||
const goBack = () => {
|
||||
uni.navigateBack({
|
||||
delta: 1,
|
||||
});
|
||||
};
|
||||
const search=()=>{
|
||||
// if (!keyWord.value) {
|
||||
// return uni.showToast({
|
||||
// title: "请输入关键字",
|
||||
// icon:'none'
|
||||
// });
|
||||
// }
|
||||
|
||||
uni.navigateTo({
|
||||
url: `/pages/search/search?keyWord=${keyWord.value}`,
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.navbox {
|
||||
padding-bottom: 20rpx;
|
||||
background-color: #f9fafb;
|
||||
position: relative;
|
||||
|
||||
background: radial-gradient(
|
||||
60% 90% at 4% 2%,
|
||||
#43c9c3 0%,
|
||||
rgba(255, 255, 255, 0) 100%
|
||||
);
|
||||
}
|
||||
.bg {
|
||||
z-index: -1;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
background: radial-gradient(
|
||||
43% 90% at 84% 6%,
|
||||
#ffd6c9 0%,
|
||||
rgba(255, 255, 255, 0) 100%
|
||||
);
|
||||
}
|
||||
.namebox {
|
||||
padding-top: 102rpx;
|
||||
margin: 0rpx 30rpx 0rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.logo{
|
||||
margin-left: 35rpx;
|
||||
}
|
||||
.name {
|
||||
margin-left: 16rpx;
|
||||
font-size: 30rpx;
|
||||
color: #111827;
|
||||
}
|
||||
}
|
||||
.search {
|
||||
margin: 40rpx 30rpx 0rpx;
|
||||
display: flex;
|
||||
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
.searchwrap {
|
||||
display: flex;
|
||||
padding-right:35rpx;
|
||||
align-items: center;
|
||||
flex: 1;
|
||||
padding-left: 28rpx;
|
||||
margin-right: 23rpx;
|
||||
height: 80rpx;
|
||||
background: #fbfbfb;
|
||||
box-shadow: 0px 4rpx 10rpx 0px rgba(153, 153, 153, 0.5);
|
||||
border-radius: 40rpx;
|
||||
|
||||
.ipt {
|
||||
flex:1;
|
||||
margin-left: 15rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -65,10 +65,18 @@ const props=defineProps({
|
||||
}
|
||||
});
|
||||
const handleClick = (e) => {
|
||||
if(e==1){
|
||||
if(e==0){
|
||||
uni.navigateTo({
|
||||
url: "/pages/index/index",
|
||||
});
|
||||
}else if(e==1){
|
||||
uni.navigateTo({
|
||||
url: "/pages/case/case",
|
||||
});
|
||||
}else if(e==2){
|
||||
uni.navigateTo({
|
||||
url: "/pages/caseTalk/caseTalk",
|
||||
});
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user