统一USER_HOST

This commit is contained in:
huangzhuanghua
2016-10-11 10:46:55 +08:00
parent 896c4e980c
commit 4e4c2cd788
4 changed files with 10 additions and 8 deletions

View File

@ -56,11 +56,10 @@ public class TokenUtils {
SharedPreferences sp = context.getSharedPreferences(Config.PREFERENCE, Context.MODE_PRIVATE);
sp.edit().putBoolean("isUploadMid", false).apply();
}
String url = "http://user.ghzhushou.com/v1d0/device/register";
HttpURLConnection connection = null;
String url = Config.USER_HOST + "/device/register";
try {
JSONObject body = new JSONObject(params);
connection = (HttpURLConnection) new URL(url).openConnection();
HttpURLConnection connection = (HttpURLConnection) new URL(url).openConnection();
connection.setDoInput(true);
connection.setDoOutput(true);
connection.setConnectTimeout(5000);
@ -120,7 +119,7 @@ public class TokenUtils {
}
// 重新获取token
String url = "http://user.ghzhushou.com/v1d0/login";
String url = Config.USER_HOST + "/login";
Map<String, String> params = new HashMap<>();
params.put("device_id", getDeviceId(context));
try {