changed the getSn and visual func

This commit is contained in:
zhongchao
2021-05-27 21:13:36 +08:00
parent aecdc24636
commit 504fc47132
54 changed files with 216 additions and 192 deletions

View File

@@ -2,6 +2,7 @@ package com.zhidao.roadcondition.model
import android.util.Log
import com.google.gson.Gson
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
import com.mogo.commons.network.Utils
import com.mogo.module.common.constants.HostConst
import com.zhidao.roadcondition.base.BaseRepository
@@ -13,7 +14,7 @@ class StrategyServiceModel : BaseRepository() {
suspend fun getCityStrategy(): BaseResponse<Results> {
return apiCall {
val map = hashMapOf<String, String>()
map["sn"] = Utils.getSn()
map["sn"] = MoGoAiCloudClientConfig.getInstance().getSn()
val locInfo = LocationUtil.getInstance().getLocationInfo()
map["data"] = Gson().toJson(
StrategyRequest(
@@ -31,7 +32,7 @@ class StrategyServiceModel : BaseRepository() {
val informationBodyStr = Gson().toJson(informationBody)
Log.d("MainServiceController", "uploadInformation informationBody = $informationBodyStr")
HttpClient.getInstance(HostConst.DEVA_HOST).getHttpApi()
.uploadInformation(mapOf("sn" to Utils.getSn(), "data" to informationBodyStr))
.uploadInformation(mapOf("sn" to MoGoAiCloudClientConfig.getInstance().getSn(), "data" to informationBodyStr))
}
}
}