liudan пре 4 недеља
родитељ
комит
11e5dd2e64
1 измењених фајлова са 6 додато и 2 уклоњено
  1. 6 2
      src/pages/myConsultRoom/page/treatment/360/patient360.vue

+ 6 - 2
src/pages/myConsultRoom/page/treatment/360/patient360.vue

@@ -16,8 +16,7 @@
             <!-- 患者信息卡 -->
             <view class="patient-card" v-if="cardVisible">
                 <view class="pc-top">
-                    <image class="pc-avatar" v-if="patient.avatar" :src="patient.avatar" mode="aspectFill"></image>
-                    <view class="pc-avatar pc-avatar-txt" v-else>{{ patient.name }}</view>
+                    <image class="pc-avatar" :src="getDefaultPatientAvatar(patient)" mode="aspectFill"></image>
                     <view class="pc-top-main">
                         <view class="pc-row1">
                             <text class="nm">{{ patient.name }}</text>
@@ -974,6 +973,11 @@ export default {
     },
 
     methods: {
+        getDefaultPatientAvatar: function (patient) {
+            return patient.sex === '男性'
+                ? 'https://hlwyy.scsmysgkyy.cn/images/icon/gender-male.png'
+                : 'https://hlwyy.scsmysgkyy.cn/images/icon/gender-female.png';
+        },
         /* ---------------- 接口取数 ---------------- */
 
         /**