hengmei-two/components/list-doctor.vue

50 lines
1.2 KiB
Vue
Raw Normal View History

2021-08-19 06:40:59 +00:00
<template>
2022-01-04 03:05:47 +00:00
<view class="disjb fw">
2022-01-28 09:04:37 +00:00
<view @tap="chooseDoctor(index)" class="radius10 dis fc bacf mar-x20" style="width: 48.6%;" v-for="(item,index) in list" :key="index">
<image :src="item.imgSrc" class="doctorImg radius10" mode="aspectFill" lazy-load></image>
<!-- <view class="col3 mar-s10 mar-x20 mar-z10">
2021-08-19 06:40:59 +00:00
<view class="fon28 bold doctoritem disac">{{item.name}}</view>
2022-01-04 03:05:47 +00:00
<view class="fon24 disac fw mar-s10" style="width: 166px;">
<view class="flexs">擅长</view>
<view class="flexs" v-for="(itemt,indext) in item.goodAt" :key="indext">
<text class="bold mar-y10 pcol">{{itemt.disease_name}}</text>
</view>
2021-08-19 06:40:59 +00:00
</view>
</view> -->
2021-08-19 06:40:59 +00:00
</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>