Browse Source

1.添加获取单个医生信息接口

王鹏鹏 2 years ago
parent
commit
992bbecc53

+ 6 - 1
healthconsultation/src/main/java/com/yingyang/healthconsultation/adapter/ConsultationRecordAdapter.kt

@@ -17,9 +17,10 @@ class ConsultationRecordAdapter(override val layoutId: Int = R.layout.item_consu
 
     var onLeftClickListener: ((bean: DoctorBean) -> Unit)? = null
 
-
     var onRightClickListener: ((bean: DoctorBean) -> Unit)? = null
 
+    var onClickListener: ((bean: DoctorBean) -> Unit)? = null
+
     override fun onBindViewHolder(
         binding: ItemConsultationRecordBinding,
         item: DoctorBean,
@@ -76,5 +77,9 @@ class ConsultationRecordAdapter(override val layoutId: Int = R.layout.item_consu
             onRightClickListener?.invoke(item)
         }
 
+        binding.consultationRecordLayout.setOnSingleClickListener {
+            onClickListener?.invoke(item)
+        }
+
     }
 }

+ 5 - 0
healthconsultation/src/main/java/com/yingyang/healthconsultation/record/ConsultationRecordActivity.kt

@@ -14,6 +14,7 @@ import com.yingyangfly.baselib.ext.show
 import com.yingyangfly.baselib.ext.toast
 import com.yingyangfly.baselib.mvvm.BaseMVVMActivity
 import com.yingyangfly.baselib.router.RouterUrlCommon
+import com.yingyangfly.baselib.utils.JumpUtil
 
 /**
  * 问诊记录
@@ -78,6 +79,10 @@ class ConsultationRecordActivity :
                     }
                 }
             }
+
+            adapter.onClickListener = {
+                JumpUtil.jumpActivityWithUrl(RouterUrlCommon.paid, it.id, mContext)
+            }
         }
     }
 

+ 1 - 0
healthconsultation/src/main/res/layout/item_consultation_record.xml

@@ -12,6 +12,7 @@
     </data>
 
     <com.google.android.material.card.MaterialCardView
+        android:id="@+id/consultationRecordLayout"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:layout_marginTop="@dimen/divider_20px"