|
@@ -39,15 +39,14 @@ class ResponseInterceptor : Interceptor {
|
39
|
39
|
charset = contentType.charset(charset)
|
40
|
40
|
}
|
41
|
41
|
val bodyString = buffer.clone().readString(charset)
|
42
|
|
- val data = GsonUtils.parseJsonWithGson(bodyString, ResponseData::class.java)
|
43
|
|
- if (data == null) {
|
44
|
|
- throw RuntimeException("数据为空")
|
45
|
|
- } else {
|
|
42
|
+ /* val data = GsonUtils.parseJsonWithGson(bodyString, ResponseData::class.java)
|
|
43
|
+ if (data != null) {
|
|
44
|
+ //TODO 接口统一退出
|
46
|
45
|
if (data.code == 401) {
|
47
|
46
|
//强制退出
|
48
|
47
|
UIEvent(Const.LOGIN_OUT_401).post()
|
49
|
48
|
}
|
50
|
|
- }
|
|
49
|
+ }*/
|
51
|
50
|
originalResponse
|
52
|
51
|
} catch (e: Exception) {
|
53
|
52
|
e.printStackTrace()
|