[shuttle] 乘客屏兼容和司机端断连,拿不到司机端sn

This commit is contained in:
wangmingjun
2023-03-17 22:35:34 +08:00
parent 0cced718cf
commit 5df38df0c9
2 changed files with 5 additions and 1 deletions

View File

@@ -194,6 +194,10 @@ public class BusPassengerModel {
@Override
public void onFail(int code, String msg) {
if (BusPassengerServiceManager.INSTANCE.getDriverAppSn().isEmpty()){
//此处拦截是为了防止过程中乘客屏和司机端断连拿不到司机端sn, 造成请求失败去刷新了界面
return;
}
if (code == 1003){
routesResult = null;
startOrStopCalculateRouteInfo(false);

View File

@@ -28,7 +28,7 @@ object BusPassengerServiceManager {
* 获取Bus司机端的sn
* @return
*/
private val driverAppSn: String
public val driverAppSn: String
get() = getServerToken()
/**