| 
					
				 | 
			
			
				@@ -10,10 +10,7 @@ import com.alibaba.android.arouter.facade.annotation.Route 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.yingyang.healthconsultation.R 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.yingyang.healthconsultation.adapter.ConsultationDataAdapter 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.yingyang.healthconsultation.databinding.ActivityPaidBinding 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import com.yingyangfly.baselib.ext.getEndAnimation 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import com.yingyangfly.baselib.ext.getScaleAnimation 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import com.yingyangfly.baselib.ext.show 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import com.yingyangfly.baselib.ext.toast 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.yingyangfly.baselib.ext.* 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.yingyangfly.baselib.mvvm.BaseMVVMActivity 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.yingyangfly.baselib.router.RouterUrlCommon 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.yingyangfly.baselib.utils.JumpUtil 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -73,6 +70,7 @@ class PaidActivity : BaseMVVMActivity<ActivityPaidBinding, PaidViewModel>(), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 imageList.clear() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 if (it != null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     binding.data = it 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    setStatusInfo(it.status, it.payOrder != null) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     if (it.payOrder != null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         binding.payOrder = it.payOrder 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -94,6 +92,70 @@ class PaidActivity : BaseMVVMActivity<ActivityPaidBinding, PaidViewModel>(), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * 设置订单状态 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * @param isGenerateOrder 是否生成订单 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @SuppressLint("SetTextI18n") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private fun setStatusInfo(status: String, isGenerateOrder: Boolean) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        when (status) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            "0" -> { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //0未支付 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                binding { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    tvStatus.text = "订单待支付,超时将取消" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    btnCancleOrder.show(true) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    btnCancleOrder.text = "取消订单" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    btnCancleOrder.setBackgroundResource(R.drawable.bg_record_cancel_order) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    btnCancleOrder.setTextColorResource(R.color.color_FFA5A5A5) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    btnContactDoctor.show(true) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    btnContactDoctor.text = "去支付" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    btnContactDoctor.setBackgroundResource(R.drawable.bg_pay_order) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    btnContactDoctor.setTextColorResource(R.color.color_FFFFFF) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            "1" -> { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //1待接诊 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                binding { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    tvStatus.text = "订单已支付,等待医生回复医生会在24小时内回复您" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            "2" -> { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //2接诊中 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                binding { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    tvStatus.text = "医生接诊中" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            "3" -> { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //3已拒诊 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                binding { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    tvStatus.text = "医生已取消" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            "4" -> { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //4已完成 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                binding { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    tvStatus.text = "订单完成" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            "5" -> { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //5已取消 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                binding { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    tvStatus.text = if (isGenerateOrder) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        "订单已取消,超时未支付" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        "订单已取消,支付的费用会在24小内返还到您的支付账户里" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    btnCancleOrder.show(false) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    btnContactDoctor.text = "重新问诊" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    btnContactDoctor.setBackgroundResource(R.drawable.bg_pay_order) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    btnContactDoctor.setTextColorResource(R.color.color_FFFFFF) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * 获取医生信息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 |