소스 검색

加密,增加空字符判断

liujiangyao 8 년 전
부모
커밋
be9c961a03
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      app/src/main/java/com/sheep/gamegroup/model/util/AddPuplicParameIntercept.java

+ 2 - 1
app/src/main/java/com/sheep/gamegroup/model/util/AddPuplicParameIntercept.java

@@ -67,7 +67,8 @@ public class AddPuplicParameIntercept implements Interceptor {
                 }
                 String oldParamsJson = buffer.readUtf8();
                 String newJsonParams = BaseMessageConverter.encrypt(oldParamsJson);
-                body = RequestBody.create(requestBody.contentType(), newJsonParams);
+                if(!TextUtils.isEmpty(newJsonParams))
+                    body = RequestBody.create(requestBody.contentType(), newJsonParams);
 //                oldRequest = oldRequest.newBuilder().post(body).build();
             }
         }