1. wifi zone定位点设置,改为拖动地图设置
2.添加被绑定设备增加提示被绑定的邮箱
This commit is contained in:
@@ -72,7 +72,10 @@ abstract class BaseNetworkApi<I>(private val baseUrl: String) : IService<I> {
|
||||
return Result.success("${ErrorCode.CREDIT_CARD_PAY_FAIL}" as T)
|
||||
}
|
||||
}
|
||||
|
||||
//设备已被绑定
|
||||
else if (response.code == ErrorCode.DEVICE_HAS_BIND) {
|
||||
throw NetworkErrorCodeException.of(response.code, response.message + "")
|
||||
}
|
||||
|
||||
throw NetworkErrorCodeException.of(
|
||||
response.code, "exception code is ${response.code},response code not 200"
|
||||
@@ -81,15 +84,11 @@ abstract class BaseNetworkApi<I>(private val baseUrl: String) : IService<I> {
|
||||
//适用于只管请求成功(T=String),不需要处理结果数据
|
||||
val data = response.data
|
||||
if (null == data || data == "") {
|
||||
|
||||
//处理信用卡支付返回结果
|
||||
if (response.code == ErrorCode.OK) {
|
||||
val message = response.message
|
||||
if (message == "支付成功") {
|
||||
return Result.success("${ErrorCode.CREDIT_CARD_PAY_SUCCESS}" as T)
|
||||
}
|
||||
val message = response.message
|
||||
if (message == "支付成功") {
|
||||
return Result.success("${ErrorCode.CREDIT_CARD_PAY_SUCCESS}" as T)
|
||||
}
|
||||
|
||||
//throw NetworkException.of(ErrorCode.VALUE_IS_NULL, "response data is null")
|
||||
return Result.success("${response.code}" as T)
|
||||
}
|
||||
@@ -114,11 +113,13 @@ abstract class BaseNetworkApi<I>(private val baseUrl: String) : IService<I> {
|
||||
|
||||
//失败重试请求次数
|
||||
private const val RETRY_COUNT = 1
|
||||
|
||||
//请求超时时间
|
||||
private const val REQUEST_TIMEOUT=40L
|
||||
private const val REQUEST_TIMEOUT = 40L
|
||||
private val defaultOkHttpClient by lazy {
|
||||
val builder = OkHttpClient.Builder().callTimeout(REQUEST_TIMEOUT, TimeUnit.SECONDS)
|
||||
.connectTimeout(REQUEST_TIMEOUT, TimeUnit.SECONDS).readTimeout(REQUEST_TIMEOUT, TimeUnit.SECONDS)
|
||||
.connectTimeout(REQUEST_TIMEOUT, TimeUnit.SECONDS)
|
||||
.readTimeout(REQUEST_TIMEOUT, TimeUnit.SECONDS)
|
||||
.writeTimeout(REQUEST_TIMEOUT, TimeUnit.SECONDS).retryOnConnectionFailure(true)
|
||||
//添加拦截器
|
||||
builder.addInterceptor(CommonRequestInterceptor())
|
||||
|
||||
Reference in New Issue
Block a user