diff --git a/common/src/main/java/com/yunbao/common/http/PDLiveApi.java b/common/src/main/java/com/yunbao/common/http/PDLiveApi.java index e9b4f99b3..da3e5976b 100644 --- a/common/src/main/java/com/yunbao/common/http/PDLiveApi.java +++ b/common/src/main/java/com/yunbao/common/http/PDLiveApi.java @@ -92,6 +92,7 @@ import com.yunbao.common.bean.WishListGiftConfModel; import com.yunbao.common.bean.WishListModel; import com.yunbao.common.bean.sendMoneyLongListModel; import com.yunbao.common.event.CheckCurrencyModel; +import com.yunbao.common.manager.imrongcloud.RongcloudIMManager; import java.util.List; import java.util.Map; @@ -129,7 +130,8 @@ public interface PDLiveApi { @Field("uuid_Device") String uuidDevice, @Field("pushid") String pushid, @Field("lastlogindevice") String lastlogindevice, - @Field("langue") String langue + @Field("langue") String langue, + @Field("key1") String key1 ); /** diff --git a/common/src/main/java/com/yunbao/common/http/main/MainNetManager.java b/common/src/main/java/com/yunbao/common/http/main/MainNetManager.java index 00dd5a6bc..ebb627e1c 100644 --- a/common/src/main/java/com/yunbao/common/http/main/MainNetManager.java +++ b/common/src/main/java/com/yunbao/common/http/main/MainNetManager.java @@ -13,6 +13,7 @@ import com.yunbao.common.http.API; import com.yunbao.common.http.ResponseData; import com.yunbao.common.http.ResponseModel; import com.yunbao.common.http.base.HttpCallback; +import com.yunbao.common.manager.imrongcloud.RongcloudIMManager; import com.yunbao.common.utils.WordUtil; import java.util.HashMap; @@ -55,7 +56,7 @@ public class MainNetManager { * @param callback 网络请求回调 */ public void login(String phoneNum, String pwd, String uuid, HttpCallback callback) { - API.get().pdLiveApi(mContext).loginByManager(phoneNum, pwd, uuid, "", "Android", WordUtil.isNewZh()?"chinese":"english") + API.get().pdLiveApi(mContext).loginByManager(phoneNum, pwd, uuid, "", "Android", WordUtil.isNewZh()?"chinese":"english", RongcloudIMManager.RONG_IM_KEY) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(new Consumer>() { 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 33d301a1a..30f189352 100644 --- a/common/src/main/java/com/yunbao/common/manager/IMLoginManager.java +++ b/common/src/main/java/com/yunbao/common/manager/IMLoginManager.java @@ -519,6 +519,7 @@ public class IMLoginManager extends BaseCacheManager { String token = uidAndToken[1]; if (TextUtils.isEmpty(token)) return; HttpClient.getInstance().get("huoquyonghujibenxinxiv2", "getBaseInfo") + .params("key1", RongcloudIMManager.RONG_IM_KEY) .params("uid", uid) .params("token", token) .execute(new HttpCallback() { diff --git a/common/src/main/java/com/yunbao/common/manager/imrongcloud/RongcloudIMManager.java b/common/src/main/java/com/yunbao/common/manager/imrongcloud/RongcloudIMManager.java index c9c2878c5..2c9a59c00 100644 --- a/common/src/main/java/com/yunbao/common/manager/imrongcloud/RongcloudIMManager.java +++ b/common/src/main/java/com/yunbao/common/manager/imrongcloud/RongcloudIMManager.java @@ -43,7 +43,7 @@ public class RongcloudIMManager { //融云开发者平台注册app唯一识别符 // public static final String RONG_IM_KEY = "uwd1c0sxu1p71"; //测试环境 - public static String RONG_IM_KEY = "pvxdm17jpd3hr"; + public static String RONG_IM_KEY = "6tnym1br6lhu7"; private static final String CLASSNAME = "RongcloudIMManager"; 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 bd49633ef..59a40e0dd 100644 --- a/common/src/main/java/com/yunbao/common/utils/JavascriptInterfaceUtils.java +++ b/common/src/main/java/com/yunbao/common/utils/JavascriptInterfaceUtils.java @@ -40,6 +40,7 @@ import com.yunbao.common.http.LiveHttpUtil; import com.yunbao.common.interfaces.CommonCallback; import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.manager.RandomSudGameManager; +import com.yunbao.common.manager.imrongcloud.RongcloudIMManager; import org.greenrobot.eventbus.EventBus; @@ -659,6 +660,7 @@ public class JavascriptInterfaceUtils { @JavascriptInterface public void wearOrCancelFanMedal() { HttpClient.getInstance().get("huoquyonghujibenxinxiv2", "getBaseInfo") + .params("key1", RongcloudIMManager.RONG_IM_KEY) .params("uid", IMLoginManager.get(mContext).getUserInfo().getId()) .params("token", IMLoginManager.get(mContext).getUserInfo().getToken()) .execute(new HttpCallback() { 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 a1e3d2ce4..1f1bbdd1d 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; @@ -411,6 +412,7 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On */ private void loadUserVip() { HttpClient.getInstance().get("huoquyonghujibenxinxiv2", "getBaseInfo") + .params("key1", RongcloudIMManager.RONG_IM_KEY) .params("uid", IMLoginManager.get(mContext).getUserInfo().getId()) .params("token", IMLoginManager.get(mContext).getUserInfo().getToken()) .execute(new HttpCallback() { 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 381d0ccc6..2ce0b6398 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; @@ -514,6 +515,7 @@ public class LiveGiftPopup extends AbsDialogFragment { */ private void loadUserVip() { HttpClient.getInstance().get("huoquyonghujibenxinxiv2", "getBaseInfo") + .params("key1", RongcloudIMManager.RONG_IM_KEY) .params("uid", IMLoginManager.get(mContext).getUserInfo().getId()) .params("token", IMLoginManager.get(mContext).getUserInfo().getToken()) .execute(new HttpCallback() { 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 bc70a3b58..5f2babb22 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.ToastUtil; @@ -50,6 +51,7 @@ public class MainHttpUtil { .params("user_login", phoneNum) .params("user_pass", pwd) .params("pushid", "") + .params("key1", RongcloudIMManager.RONG_IM_KEY) .params("lastlogindevice", "Android") .params("uuid_Device", uuid) .params("langue", WordUtil.isNewZh()?"chinese":"english") @@ -240,6 +242,7 @@ public class MainHttpUtil { */ public static void getBaseInfo(String uid, String token, final CommonCallback commonCallback) { HttpClient.getInstance().get("huoquyonghujibenxinxiv2", MainHttpConsts.GET_BASE_INFO) + .params("key1", RongcloudIMManager.RONG_IM_KEY) .execute(new HttpCallback() { @Override public void onSuccess(int code, String msg, String[] info) { @@ -275,6 +278,7 @@ public class MainHttpUtil { public static void getBaseInfos(String uid, String token, HttpCallback callback) { HttpClient.getInstance().get("huoquyonghujibenxinxiv2", MainHttpConsts.GET_BASE_INFO) + .params("key1", RongcloudIMManager.RONG_IM_KEY) .execute(callback); }