[6.5.0]
[fea] [到达目的地页面迁移]
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.mogo.och.common.module.network
|
||||
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.eagle.core.data.BaseData
|
||||
import com.mogo.eagle.core.network.RequestOptions
|
||||
import com.mogo.eagle.core.network.SubscribeImpl
|
||||
@@ -22,7 +23,7 @@ class OchCommonSubscribeImpl<T : BaseData>(
|
||||
|
||||
init {
|
||||
CallerLogger.e("$flavorTag$TAG", "$apiName: 去请求()")
|
||||
if(writeLog) {
|
||||
if(writeLog || DebugConfig.isDebug()) {
|
||||
OchChainLogManager.writeChainLogNet("接口:${apiName}_${tag}", "去请求")
|
||||
}
|
||||
}
|
||||
@@ -30,7 +31,7 @@ class OchCommonSubscribeImpl<T : BaseData>(
|
||||
override fun onSuccess(o: T) {
|
||||
super.onSuccess(o)
|
||||
CallerLogger.d("$flavorTag$TAG", "$apiName: onSuccess() ${o.msg}")
|
||||
if(writeLog) {
|
||||
if(writeLog || DebugConfig.isDebug()) {
|
||||
OchChainLogManager.writeChainLogNet("接口:${apiName}_${tag}", "请求成功:${o}")
|
||||
}
|
||||
callback?.onSuccess(o)
|
||||
@@ -39,7 +40,7 @@ class OchCommonSubscribeImpl<T : BaseData>(
|
||||
override fun onError(e: Throwable) {
|
||||
super.onError(e)
|
||||
CallerLogger.e("$flavorTag$TAG", "$apiName: onError() ${e.message}")
|
||||
if(writeLog) {
|
||||
if(writeLog || DebugConfig.isDebug()) {
|
||||
OchChainLogManager.writeChainLogNet("接口:${apiName}_${tag}", "请求失败:${e.message}")
|
||||
}
|
||||
callback?.onError("$apiName: onError() ${e.message}")
|
||||
@@ -49,7 +50,7 @@ class OchCommonSubscribeImpl<T : BaseData>(
|
||||
override fun onError(message: String, code: Int) {
|
||||
super.onError(message, code)
|
||||
CallerLogger.e("$flavorTag$TAG", "$apiName: onError() code = $code; message = $message")
|
||||
if(writeLog) {
|
||||
if(writeLog || DebugConfig.isDebug()) {
|
||||
OchChainLogManager.writeChainLogNet(
|
||||
"接口:${apiName}_${tag}",
|
||||
"请求失败: onError() code = $code; message = $message\""
|
||||
|
||||
Reference in New Issue
Block a user