浏览代码

加密,增加空字符判断

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();
             }
         }