<template> <view class="disjb fw"> <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"> <view class="fon28 bold doctoritem disac">{{item.name}}</view> <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> </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>