Skip to content

Commit

Permalink
配置
Browse files Browse the repository at this point in the history
  • Loading branch information
AcmenHe committed May 7, 2021
1 parent e20a453 commit f61c750
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
8 changes: 4 additions & 4 deletions app/src/main/java/com/acmenhe/androidutils/httptest/Api.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ public interface Api {
/**用户密码登陆*/
@POST(ApiUrl.USER_LOGIN)
Observable<ResponseBody> userLogin(@Query("mobile")String mobile , @Query("userPwd")String userPwd ,
@Query("smsCode")String smsCode , @Query("loginType")String loginType); /**用户密码登陆*/
/**用户密码登陆*/
@GET("api/task/taskinstance/getTaskStepInfo?client=2&runLogId=lwzccq20210322151906246179139&client=2&taskId=lwzccq20210320163525603861506")
Observable<JSONObject> getTaskStepInfo(); /**用户密码登陆*/
@Query("smsCode")String smsCode , @Query("loginType")String loginType);

@GET(ApiUrl.TASK_LIST)
Observable<JSONObject> getTaskList();

}
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@
public class ApiUrl {
/**用户密码登陆*/
public static final String USER_LOGIN = "user/login";

public static final String TASK_LIST = "api/task/getTaskList";
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
*
*/
public class Config {
// public static String serverUrl = "http://test.user.xioyee.com/api/";
public static String serverUrl = "http://219.153.65.238:16002/zdpm/";
public static String serverUrl = "http://127.0.0.1:8080/test/";
}
10 changes: 5 additions & 5 deletions httplib/src/main/java/com/acmenhe/httplib/HttpManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,16 @@ public class HttpManager {
* 初始化默认值
* @param url
*/
public static void initUrl(String url){
public static void setDefaultUrl(String url){
defaultUrl = url;
}
public static void initInterceptor(Interceptor interceptor ){
public static void setDefaultInterceptor(Interceptor interceptor ){
defaultInterceptor = interceptor;
}
public static void initAuth(String sAuthorization){
public static void setDefaultAuth(String sAuthorization){
defaultAuthorization = sAuthorization;
}
public static void initAuthBase64(String sUserName,String sPassword){
public static void setDefaultAuthBase64(String sUserName,String sPassword){
defaultAuthorization = getAuthBase64(sUserName,sPassword);
}

Expand All @@ -62,7 +62,7 @@ private HttpManager(String url) {
throw new RuntimeException("baseUrl is null!");
}
sServerUrl = url;
getOkHttpClient();
// getOkHttpClient();
}
/**
* 自定义过滤器
Expand Down

0 comments on commit f61c750

Please sign in to comment.