|
@@ -1,10 +1,12 @@
|
|
|
-package com.miekir.network;
|
|
|
|
|
|
|
+package com.miekir.ym.net;
|
|
|
|
|
|
|
|
import android.content.Context;
|
|
import android.content.Context;
|
|
|
import android.text.TextUtils;
|
|
import android.text.TextUtils;
|
|
|
import android.util.Log;
|
|
import android.util.Log;
|
|
|
|
|
|
|
|
import com.miekir.common.utils.ContextManager;
|
|
import com.miekir.common.utils.ContextManager;
|
|
|
|
|
+import com.miekir.network.BuildConfig;
|
|
|
|
|
+import com.miekir.ym.manager.UserInfoManager;
|
|
|
import com.readystatesoftware.chuck.ChuckInterceptor;
|
|
import com.readystatesoftware.chuck.ChuckInterceptor;
|
|
|
|
|
|
|
|
import java.io.IOException;
|
|
import java.io.IOException;
|
|
@@ -55,10 +57,10 @@ public class RetrofitHelper {
|
|
|
public Response intercept(Chain chain) throws IOException {
|
|
public Response intercept(Chain chain) throws IOException {
|
|
|
String token = "";
|
|
String token = "";
|
|
|
String email = "";
|
|
String email = "";
|
|
|
-// if (EdenManager.getInstance().isLogin()) {
|
|
|
|
|
-// token = EdenManager.getInstance().getBeiUser().token;
|
|
|
|
|
-// email = EdenManager.getInstance().getBeiUser().email;
|
|
|
|
|
-// }
|
|
|
|
|
|
|
+ if (UserInfoManager.getInstance().isLogin()) {
|
|
|
|
|
+ token = UserInfoManager.getInstance().getBeiUser().token;
|
|
|
|
|
+ email = UserInfoManager.getInstance().getBeiUser().email;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
Request.Builder builder = chain.request().newBuilder();
|
|
Request.Builder builder = chain.request().newBuilder();
|
|
|
if (!TextUtils.isEmpty(token)) {
|
|
if (!TextUtils.isEmpty(token)) {
|