From 2ee9e9c7261af4b5aabade4426a59666e29a279e Mon Sep 17 00:00:00 2001 From: ningwenqiang Date: Mon, 14 Oct 2024 13:09:17 +0800 Subject: [PATCH] =?UTF-8?q?1=E8=8E=B7=E5=8F=96=E5=85=85=E5=80=BC=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E5=A2=9E=E5=8A=A0=E5=AD=97=E6=AE=B5=20=E4=BC=A0?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E5=AD=97=E6=AE=B5key1=20=20=E5=80=BC?= =?UTF-8?q?=EF=BC=9A6tnym1br6lhu7=202.=E5=8F=96=E6=B6=88=E9=98=B2=E6=8A=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yunbao/common/manager/IMLoginManager.java | 1 + .../utils/JavascriptInterfaceUtils.java | 2 + .../live/dialog/LiveGiftDialogFragment.java | 2 + .../com/yunbao/live/dialog/LiveGiftPopup.java | 2 + .../yunbao/main/activity/LoginActivity.java | 49 ++++++++++++------- .../com/yunbao/main/http/MainHttpUtil.java | 5 +- 6 files changed, 42 insertions(+), 19 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/manager/IMLoginManager.java b/common/src/main/java/com/yunbao/common/manager/IMLoginManager.java index 23b380294..3428bce7c 100644 --- a/common/src/main/java/com/yunbao/common/manager/IMLoginManager.java +++ b/common/src/main/java/com/yunbao/common/manager/IMLoginManager.java @@ -536,6 +536,7 @@ public class IMLoginManager extends BaseCacheManager { HttpClient.getInstance().get("User.getBaseInfos", "getBaseInfo") .params("uid", uid) .params("token", token) + .params("key1", RongcloudIMManager.RONG_IM_KEY) .execute(new HttpCallback() { @Override public void onSuccess(int code, String msg, String[] info) { diff --git a/common/src/main/java/com/yunbao/common/utils/JavascriptInterfaceUtils.java b/common/src/main/java/com/yunbao/common/utils/JavascriptInterfaceUtils.java index 4660abed4..50327bbf3 100644 --- a/common/src/main/java/com/yunbao/common/utils/JavascriptInterfaceUtils.java +++ b/common/src/main/java/com/yunbao/common/utils/JavascriptInterfaceUtils.java @@ -38,6 +38,7 @@ import com.yunbao.common.http.HttpClient; import com.yunbao.common.http.LiveHttpUtil; import com.yunbao.common.interfaces.CommonCallback; import com.yunbao.common.manager.IMLoginManager; +import com.yunbao.common.manager.imrongcloud.RongcloudIMManager; import org.greenrobot.eventbus.EventBus; @@ -659,6 +660,7 @@ public class JavascriptInterfaceUtils { HttpClient.getInstance().get("User.getBaseInfos", "getBaseInfo") .params("uid", IMLoginManager.get(mContext).getUserInfo().getId()) .params("token", IMLoginManager.get(mContext).getUserInfo().getToken()) + .params("key1", RongcloudIMManager.RONG_IM_KEY) .execute(new HttpCallback() { @Override public void onSuccess(int code, String msg, String[] info) { diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveGiftDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveGiftDialogFragment.java index 12783029f..5877aba25 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveGiftDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveGiftDialogFragment.java @@ -60,6 +60,7 @@ import com.yunbao.common.http.HttpClient; import com.yunbao.common.http.live.LiveNetManager; import com.yunbao.common.interfaces.OnItemClickListener; import com.yunbao.common.manager.IMLoginManager; +import com.yunbao.common.manager.imrongcloud.RongcloudIMManager; import com.yunbao.common.utils.AppManager; import com.yunbao.common.utils.Bus; import com.yunbao.common.utils.DebugUtils; @@ -413,6 +414,7 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On HttpClient.getInstance().get("User.getBaseInfos", "getBaseInfo") .params("uid", IMLoginManager.get(mContext).getUserInfo().getId()) .params("token", IMLoginManager.get(mContext).getUserInfo().getToken()) + .params("key1", RongcloudIMManager.RONG_IM_KEY) .execute(new HttpCallback() { @Override public void onSuccess(int code, String msg, String[] info) { diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveGiftPopup.java b/live/src/main/java/com/yunbao/live/dialog/LiveGiftPopup.java index f2d2868ab..6d542117b 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveGiftPopup.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveGiftPopup.java @@ -44,6 +44,7 @@ import com.opensource.svgaplayer.SVGADrawable; import com.opensource.svgaplayer.SVGAImageView; import com.opensource.svgaplayer.SVGAParser; import com.opensource.svgaplayer.SVGAVideoEntity; +import com.yunbao.common.manager.imrongcloud.RongcloudIMManager; import com.yunbao.common.utils.DebugUtils; import com.yunbao.common.utils.L; import com.yunbao.common.utils.MobclickAgent; @@ -516,6 +517,7 @@ public class LiveGiftPopup extends AbsDialogFragment { HttpClient.getInstance().get("User.getBaseInfos", "getBaseInfo") .params("uid", IMLoginManager.get(mContext).getUserInfo().getId()) .params("token", IMLoginManager.get(mContext).getUserInfo().getToken()) + .params("key1", RongcloudIMManager.RONG_IM_KEY) .execute(new HttpCallback() { @Override public void onSuccess(int code, String msg, String[] info) { diff --git a/main/src/main/java/com/yunbao/main/activity/LoginActivity.java b/main/src/main/java/com/yunbao/main/activity/LoginActivity.java index 1ad1c7c07..1885bc327 100644 --- a/main/src/main/java/com/yunbao/main/activity/LoginActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/LoginActivity.java @@ -167,26 +167,39 @@ public class LoginActivity extends AbsActivity { } + //去掉防止抖动 public void loginClick(View v) { - ViewClicksAntiShake.clicksAntiShake(v, new ViewClicksAntiShake.ViewClicksCallBack() { - @Override - public void onViewClicks() { - int i = v.getId(); - if (i == R.id.btn_login) { - //Intent intent = new Intent(LoginActivity.this, NewLiveActivity.class); - //startActivity(intent); - login(); + int i = v.getId(); + if (i == R.id.btn_login) { + //Intent intent = new Intent(LoginActivity.this, NewLiveActivity.class); + //startActivity(intent); + login(); + } else if (i == R.id.btn_register) { + register(); + } else if (i == R.id.btn_forget_pwd) { + forgetPwd(); - } else if (i == R.id.btn_register) { - register(); - } else if (i == R.id.btn_forget_pwd) { - forgetPwd(); - - } else if (i == R.id.btn_tip) { - forwardTip(); - } - } - }); + } else if (i == R.id.btn_tip) { + forwardTip(); + } +// ViewClicksAntiShake.clicksAntiShake(v, new ViewClicksAntiShake.ViewClicksCallBack() { +// @Override +// public void onViewClicks() { +// int i = v.getId(); +// if (i == R.id.btn_login) { +// //Intent intent = new Intent(LoginActivity.this, NewLiveActivity.class); +// //startActivity(intent); +// login(); +// } else if (i == R.id.btn_register) { +// register(); +// } else if (i == R.id.btn_forget_pwd) { +// forgetPwd(); +// +// } else if (i == R.id.btn_tip) { +// forwardTip(); +// } +// } +// }); } diff --git a/main/src/main/java/com/yunbao/main/http/MainHttpUtil.java b/main/src/main/java/com/yunbao/main/http/MainHttpUtil.java index 60ec39d19..885e1da6f 100644 --- a/main/src/main/java/com/yunbao/main/http/MainHttpUtil.java +++ b/main/src/main/java/com/yunbao/main/http/MainHttpUtil.java @@ -15,6 +15,7 @@ import com.yunbao.common.http.HttpCallback; import com.yunbao.common.http.HttpClient; import com.yunbao.common.interfaces.CommonCallback; import com.yunbao.common.manager.IMLoginManager; +import com.yunbao.common.manager.imrongcloud.RongcloudIMManager; import com.yunbao.common.utils.MD5Util; import com.yunbao.common.utils.SpUtil; import com.yunbao.common.utils.VersionUtil; @@ -49,7 +50,7 @@ public class MainHttpUtil { .params("user_login", phoneNum) .params("user_pass", pwd) .params("pushid", "") - .params("key1", "6tnym1br6lhu7") + .params("key1", RongcloudIMManager.RONG_IM_KEY) .params("lastlogindevice", "Android") .params("uuid_Device", uuid) .params("langue", WordUtil.isNewZh()?"chinese":"english") @@ -256,6 +257,7 @@ public class MainHttpUtil { */ public static void getBaseInfo(String uid, String token, final CommonCallback commonCallback) { HttpClient.getInstance().get("User.getBaseInfos", MainHttpConsts.GET_BASE_INFO) + .params("key1", RongcloudIMManager.RONG_IM_KEY) .execute(new HttpCallback() { @Override public void onSuccess(int code, String msg, String[] info) { @@ -290,6 +292,7 @@ public class MainHttpUtil { public static void getBaseInfos(String uid, String token, HttpCallback callback) { HttpClient.getInstance().get("User.getBaseInfos", MainHttpConsts.GET_BASE_INFO) + .params("key1", RongcloudIMManager.RONG_IM_KEY) .execute(callback); }