diff --git a/live/src/main/java/com/yunbao/live/bean/LiveChatBean.java b/live/src/main/java/com/yunbao/live/bean/LiveChatBean.java index f830fb020..b1763c556 100644 --- a/live/src/main/java/com/yunbao/live/bean/LiveChatBean.java +++ b/live/src/main/java/com/yunbao/live/bean/LiveChatBean.java @@ -1,6 +1,7 @@ package com.yunbao.live.bean; import com.alibaba.fastjson.annotation.JSONField; +import com.google.gson.annotations.SerializedName; import com.yunbao.common.bean.MsgModel; /** @@ -40,6 +41,41 @@ public class LiveChatBean { private String prankIcon; private String hot_card; private MsgModel msgModel = new MsgModel();//自定义消息体 + @SerializedName("noble_id") + private String nobleId = ""; + + @SerializedName("noble_icon") + private String nobleIcon = ""; + + @SerializedName("bubbleSrc") + private String bubbleSrc = ""; + + public String getNobleId() { + return nobleId; + } + + public LiveChatBean setNobleId(String nobleId) { + this.nobleId = nobleId; + return this; + } + + public String getNobleIcon() { + return nobleIcon; + } + + public LiveChatBean setNobleIcon(String nobleIcon) { + this.nobleIcon = nobleIcon; + return this; + } + + public String getBubbleSrc() { + return bubbleSrc; + } + + public LiveChatBean setBubbleSrc(String bubbleSrc) { + this.bubbleSrc = bubbleSrc; + return this; + } public MsgModel getMsgModel() { return msgModel; @@ -179,7 +215,7 @@ public class LiveChatBean { @JSONField(name = "liangname") public void setLiangName(String liangName) { - if(!"0".equals(liangName)){ + if (!"0".equals(liangName)) { this.liangName = liangName; } } @@ -221,7 +257,6 @@ public class LiveChatBean { } - @JSONField(name = "medal_name") public String getMedalNmae() { return medalNmae; diff --git a/live/src/main/java/com/yunbao/live/socket/SocketRyClient.java b/live/src/main/java/com/yunbao/live/socket/SocketRyClient.java index db72eecf5..d2754005a 100644 --- a/live/src/main/java/com/yunbao/live/socket/SocketRyClient.java +++ b/live/src/main/java/com/yunbao/live/socket/SocketRyClient.java @@ -659,6 +659,9 @@ public class SocketRyClient { chatBean.setManager(obj.getIntValue("usertype") == Constants.SOCKET_USER_TYPE_ADMIN); chatBean.setContent(WordUtil.getString(R.string.live_enter_room)); chatBean.setGuardType(obj.getIntValue("guard_type")); + chatBean.setNobleId(obj.getString("noble_id"));//貴族ID + chatBean.setNobleIcon(obj.getString("noble_icon"));//貴族圖標 + chatBean.setBubbleSrc(obj.getString("bubbleSrc"));//氣泡 //增加粉丝徽章信息 chatBean.setMedalNmae(obj.getString("medal_name")); FansMedalBean fansMedalBean = CommonAppConfig.getInstance().getAnchorFansMedal(obj.getIntValue("medal_level")); diff --git a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java index 71e59795b..a4f57025c 100644 --- a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java +++ b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java @@ -1043,8 +1043,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe .setmChatLevel(mChatLevel) .setmDanMuLevel(mDanMuLevel) .setLiveBg(liveBg))); - EventBus.getDefault().post("close_login"); - EventBus.getDefault().post("oneUesrOver"); + //进入直播间 AdjustEvent adjustEvent1 = new AdjustEvent("hiepcu"); diff --git a/main/src/main/java/com/yunbao/main/activity/MainActivity.java b/main/src/main/java/com/yunbao/main/activity/MainActivity.java index 9ec62d697..bba02cb74 100644 --- a/main/src/main/java/com/yunbao/main/activity/MainActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/MainActivity.java @@ -274,36 +274,6 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene }; -// private void getToken() { -// // 创建一个新线程 -// new Thread() { -// @Override -// public void run() { -// try { -// // 从agconnect-service.json文件中读取appId -// String appId = "106936673"; -// -// // 输入token标识"HCM" -// String tokenScope = "HCM"; -// String token = HmsInstanceId.getInstance(MainActivity.this).getToken(appId, tokenScope); -// Log.i("hw", "get token: " + token); -// -// // 判断token是否为空 -// if(!TextUtils.isEmpty(token)) { -// sendRegTokenToServer(token); -// } -// } catch (Exception e) { -// Log.e("hw","get token failed, " + e); -// } -// } -// }.start(); -// } -// private void sendRegTokenToServer(String token) { -// PushManager.getInstance() -// .onReceiveToken(MainActivity.this, PushType.HUAWEI, token); -// Log.i("hw", "sending token to server. token:" + token); -// } - @Override protected void main() { diff --git a/main/src/main/java/com/yunbao/main/activity/RewardActivity.java b/main/src/main/java/com/yunbao/main/activity/RewardActivity.java index 309d7564b..03ad42728 100644 --- a/main/src/main/java/com/yunbao/main/activity/RewardActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/RewardActivity.java @@ -160,6 +160,39 @@ public class RewardActivity extends AbsActivity { //js调用原生 public class JsInteration { + + @JavascriptInterface + public void androidClickToNewH5PageView(String url) { + url = CommonAppConfig.HOST + url; + url += "?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + + CommonAppConfig.getInstance().getToken(); + Log.i("tag", url); + Intent intent = new Intent(mContext, ZhuangBanActivity.class); + intent.putExtra("url", url); + intent.putExtra("isFull", false); + mContext.startActivity(intent); + + } + + /** + * 新跳转 + * + * @param url 跳转的url + * @param title 有标题的展示标题 + */ + @JavascriptInterface + public void androidClickToNewH5PageView(String url, String title) { + url = CommonAppConfig.HOST + url; + url += "?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + + CommonAppConfig.getInstance().getToken(); + Log.i("tag", url); + Intent intent = new Intent(mContext, ZhuangBanActivity.class); + intent.putExtra("url", url); + intent.putExtra("isFull", false); + intent.putExtra("title", title); + mContext.startActivity(intent); + + } @JavascriptInterface public void androidZBan(String svg) { String[] arr = svg.split("/"); diff --git a/main/src/main/res/mipmap-xxhdpi/img_news_instructor_bg.png b/main/src/main/res/mipmap-xxhdpi/img_news_instructor_bg.png index 4674fe610..88fe186d1 100644 Binary files a/main/src/main/res/mipmap-xxhdpi/img_news_instructor_bg.png and b/main/src/main/res/mipmap-xxhdpi/img_news_instructor_bg.png differ