modify host

This commit is contained in:
lixiaopeng
2021-01-06 16:51:23 +08:00
parent 5d6d56035a
commit b3b445c9ec
4 changed files with 7 additions and 16 deletions

View File

@@ -19,15 +19,6 @@ class HttpConstants {
}
}
// fun getBaseUrl1(): String {
// return when (BuildConfig.BUILD_TYPE) {
// "debug" -> DEV_BASE_URL_OWNER
// "qa" -> DEV_BASE_URL_OWNER
// "release" -> RELEASE_BASE_URL_OWNER
// "show" -> SHOW_BASE_URL_OWNER
// else -> RELEASE_BASE_URL_OWNER
// }
// }
}
}

View File

@@ -3,6 +3,7 @@ package com.zhidao.roadcondition.model
import android.util.Log
import com.google.gson.Gson
import com.mogo.commons.network.Utils
import com.mogo.module.common.constants.HostConst
import com.zhidao.roadcondition.base.BaseRepository
import com.zhidao.roadcondition.net.HttpClient
import com.zhidao.roadcondition.util.LocationUtil
@@ -21,7 +22,7 @@ class StrategyServiceModel : BaseRepository() {
locInfo.cityCode
)
)
HttpClient.getInstance().getHttpApi().getCityStrategy(map)
HttpClient.getInstance(HostConst.GEOFENCE_HOST).getHttpApi().getCityStrategy(map)
}
}
@@ -29,7 +30,7 @@ class StrategyServiceModel : BaseRepository() {
return apiCall {
val informationBodyStr = Gson().toJson(informationBody)
Log.d("MainServiceController", "uploadInformation informationBody = $informationBodyStr")
HttpClient.getInstance().getHttpApi()
HttpClient.getInstance(HostConst.DEVA_HOST).getHttpApi()
.uploadInformation(mapOf("sn" to Utils.getSn(), "data" to informationBodyStr))
}
}

View File

@@ -22,8 +22,4 @@ interface HttpApi {
@POST("/deva/car/path/no/addInfomation/v2")
suspend fun uploadInformation(@FieldMap information: Map<String, String>): BaseResponse<UploadResult>
//获取所有配置
@GET("dataService/car/customConfig/no/getAll/v1")
suspend fun getAllCommonConfig(@QueryMap commonConfigBody: Map<String, String>):BaseResponse<CommonConfig>
}

View File

@@ -13,7 +13,10 @@ public class HostConst {
public static final String DATA_SERVICE_HOST = "http://dzt-dataService.zhidaozhixing.com";
public static final String REALTIME_LOCATION_HOST = "http://dzt-realtimeLocation.zhidaozhixing.com";
public static final String INSTANT_HOST = "http://dzt-Instant.zhidaozhixing.com";
public static final String GEOFENCE_HOST = "http://dzt-geoFenceCarService.zhidaozhixing.com";
public static final String IM_SOCKET_DOMAIN = "dzt-im.zhidaozhixing.com";
public static final String WEBSOCKET_DOMAIN = "dzt-city.zhidaozhixing.com";
}