hengmei-two/components/list-doctor.vue

60 lines
1.5 KiB
Vue

<template>
<view class="disjbac fw">
<view @tap="chooseDoctor(index)" class="radius10 disjb fc bacf mar-x20" v-for="(item,index) in list" :key="index">
<image :src="item.imgSrc" class="doctorImg" mode="aspectFill"></image>
<view class="col3 mar-s10 mar-x20 mar-z10">
<view class="fon28 bold doctoritem disac">{{item.name}}</view>
<view class="fon26 mar-sx10 disac">
<view>从业{{item.cyear}}年</view>
<view v-if="item.bmen!=''" class="doctorx"></view>
<view>{{item.bmen}}</view>
</view>
<view class="fon26 mar-x10">职称:{{item.zcheng}}</view>
<view class="fon24 disac">
<view class="flexs">擅长:</view>
<scroll-view scroll-x style="width: 250rpx;">
<view class="disac">
<view class="flexs" v-for="(itemt,indext) in item.goodAt" :key="indext">
<text class="bold mar-y10 pcol">{{itemt.disease_name}}</text>
</view>
</view>
</scroll-view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
name:"list-doctor",
props:{
list:{
type:Array,
default:function(){
return []
}
}
},
data() {
return {
};
},
methods:{
chooseDoctor(index){//选择医生事件
console.log(this.list[index].id);
if(this.list[index].show_detail==1){
uni.navigateTo({
url:'/pagesB/doctorDetail/doctorDetail?doctor_id='+this.list[index].id
})
} else this.$toolAll.tools.showToast('禁止查看该医生信息')
},
}
}
</script>
<style>
</style>