[包车] 包车司机端订单显示逻辑:乘客下单后立马显示订单

This commit is contained in:
wangmingjun
2023-04-11 17:24:56 +08:00
parent f5808c9744
commit a520449296
4 changed files with 17 additions and 11 deletions

View File

@@ -48,11 +48,14 @@ class DriverM1Fragment : CharterBaseFragment<DriverM1Fragment?, DriverM1Presente
}
private fun showOrHideOrderUI(show:Boolean){
if (show && group_stations_panel.visibility == GONE){
if (show && (group_stations_panel.visibility != VISIBLE
|| group_stations_panel2.visibility != VISIBLE)){
group_stations_panel.visibility = VISIBLE
group_stations_panel2.visibility = VISIBLE
no_line_data_view.visibility = GONE
}else if (!show){
group_stations_panel.visibility = GONE
group_stations_panel2.visibility = GONE
hideSlidePanel()
}
}
@@ -71,7 +74,7 @@ class DriverM1Fragment : CharterBaseFragment<DriverM1Fragment?, DriverM1Presente
if (orderStatus.lineName.isEmpty()){
driverm1_line_name.text = "暂无"
group_stations_panel1.visibility = VISIBLE
group_stations_panel2.visibility = GONE
no_line_data_view.visibility = VISIBLE
no_order_data_tv.text = resources.getString(R.string.bus_task_wait_tip)
}else{

View File

@@ -572,10 +572,10 @@ class DriverM1Model {
mCurrentOrder == null
sendCharterEndTripInfo()
startOrStopCheckCountDown(false)
}else{ // 订单不为空,有服务中订单,去查询订单
mOrderCallback?.updateReturnCarStatus(true)
startQueryCurrentOrder()
}
// else{ // 订单不为空,有服务中订单,等待去查询订单
// mOrderCallback?.updateReturnCarStatus(true)
// }
}else{ //车辆无订单,闲置状态
clearAutopilotControlParameters()
mCurrentOrder = null
@@ -603,7 +603,6 @@ class DriverM1Model {
isArrivedStation = false
mCurrentOrder = null
queryCurrentServiceStatus()
stopQueryCurrentOrder()
return
}
if (data.data.equals(mCurrentOrder)){

View File

@@ -72,6 +72,7 @@ class DriverM1Presenter(view: DriverM1Fragment?) :
if(isLogin()){
// 查询服务状态
DriverM1Model.get().queryCurrentServiceStatus()
DriverM1Model.get().startQueryCurrentOrder()
}else{
CharterTrajectoryManager.stopTrajReqLoop()
}

View File

@@ -82,10 +82,12 @@
android:id="@+id/cur_station_title1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_50"
android:textSize="@dimen/dp_34"
android:text="@string/bus_arrive_to_next_tag1"
android:textColor="@color/station_title_color"
app:layout_constraintBottom_toTopOf="@+id/driverm1StationName2Tv"
app:layout_constraintTop_toBottomOf="@+id/driverm1StationName1Tv"
app:layout_constraintLeft_toLeftOf="parent"
android:layout_marginLeft="@dimen/dp_96"/>
@@ -112,7 +114,7 @@
android:layout_height="wrap_content"
android:text="--"
android:textSize="@dimen/module_mogo_och_bus_station_name_text_size"
android:layout_marginTop="@dimen/dp_10"
android:layout_marginBottom="@dimen/dp_20"
android:textStyle="bold"
android:textColor="@color/bus_arrived_station_name_text_color"
android:includeFontPadding = "false"
@@ -121,7 +123,7 @@
android:marqueeRepeatLimit="marquee_forever"
app:layout_constraintLeft_toLeftOf="@+id/cur_station_title1"
app:layout_constraintRight_toRightOf="@+id/driverm1_order_count_down"
app:layout_constraintTop_toBottomOf="@+id/cur_station_title1" />
app:layout_constraintBottom_toTopOf="@+id/line3"/>
<ImageView
android:id="@+id/driverm1CircleIvBg"
@@ -170,6 +172,7 @@
android:layout_marginBottom="@dimen/dp_40"
android:background="#33FFFFFF"
app:layout_constraintLeft_toLeftOf="@id/driverm1_line_name"
app:layout_constraintRight_toRightOf="@+id/driverm1_order_count_down"
app:layout_constraintBottom_toTopOf="@+id/during_time"/>
<TextView
@@ -203,12 +206,12 @@
,line3,during_time,passenger_phone"/>
<androidx.constraintlayout.widget.Group
android:id="@+id/group_stations_panel1"
android:id="@+id/group_stations_panel2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
app:constraint_referenced_ids="driverm1_line_name,driverm1_order_count_down
,line1,line2,line3,during_time,passenger_phone"/>
app:constraint_referenced_ids="cur_station_title,cur_station_title1,driverm1StationName1Tv,
driverm1StationName2Tv,driverm1nextCircleIv,driverm1CircleIvBg,driverm1ArrowBg"/>
</androidx.constraintlayout.widget.ConstraintLayout>