[6.2.4] fix bug of request in main thread
This commit is contained in:
@@ -29,22 +29,20 @@ class AiCloudIdentifyNetWorkModel private constructor() {
|
||||
onError: ((String) -> Unit)
|
||||
) {
|
||||
request<BaseResponse<Any>> {
|
||||
val map = mutableMapOf<String, Any>()
|
||||
start {
|
||||
map["sn"] = MoGoAiCloudClientConfig.getInstance().sn
|
||||
map["status"] = dataReceive
|
||||
map["startMetre"] = START_METRE
|
||||
map["endMetre"] = END_METRE
|
||||
map["type"] = 1
|
||||
if (lon != 0.0) {
|
||||
map["lon"] = lon
|
||||
}
|
||||
if (lat != 0.0) {
|
||||
map["lat"] = lat
|
||||
}
|
||||
}
|
||||
loader {
|
||||
apiCall {
|
||||
val map = mutableMapOf<String, Any>()
|
||||
map["sn"] = MoGoAiCloudClientConfig.getInstance().sn
|
||||
map["status"] = dataReceive
|
||||
map["startMetre"] = START_METRE
|
||||
map["endMetre"] = END_METRE
|
||||
map["type"] = 1
|
||||
if (lon != 0.0) {
|
||||
map["lon"] = lon
|
||||
}
|
||||
if (lat != 0.0) {
|
||||
map["lat"] = lat
|
||||
}
|
||||
getNetWorkApi().identifyRange(map)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user