diff --git a/common/src/main/java/com/yunbao/common/fragment/LiveDataNowFragment.java b/common/src/main/java/com/yunbao/common/fragment/LiveDataNowFragment.java index c41198e32..4f8b1d131 100644 --- a/common/src/main/java/com/yunbao/common/fragment/LiveDataNowFragment.java +++ b/common/src/main/java/com/yunbao/common/fragment/LiveDataNowFragment.java @@ -77,6 +77,9 @@ public class LiveDataNowFragment extends Fragment { list.add(new LiveDataInfoNowModel(getContext().getString(R.string.live_data_fan_group), data.getFanGroupNum() + "")); list.add(new LiveDataInfoNowModel(getContext().getString(R.string.live_data_fan_group_rate), data.getFanGroupNumRate() + "")); adapter.setList(list); + if(onDataResult!=null){ + onDataResult.Result(data.getTotalCoin() + "",data.getAcceptNum() + ""); + } } @Override 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 0a804185d..14e3d7499 100644 --- a/common/src/main/java/com/yunbao/common/http/PDLiveApi.java +++ b/common/src/main/java/com/yunbao/common/http/PDLiveApi.java @@ -40,6 +40,7 @@ public interface PDLiveApi { @Field("user_pass") String passWord, @Field("uuid_Device") String uuidDevice, @Field("pushid") String pushid, + @Field("app_from") String PDL, @Field("lastlogindevice") String lastlogindevice, @Field("langue") String langue ); 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..e736e30c6 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 @@ -55,7 +55,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, "", "PDL","Android", WordUtil.isNewZh()?"chinese":"english") .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(new Consumer>() { diff --git a/common/src/main/java/com/yunbao/common/utils/DateFormatUtil.java b/common/src/main/java/com/yunbao/common/utils/DateFormatUtil.java index ffd248caa..1115acae3 100644 --- a/common/src/main/java/com/yunbao/common/utils/DateFormatUtil.java +++ b/common/src/main/java/com/yunbao/common/utils/DateFormatUtil.java @@ -45,7 +45,7 @@ public class DateFormatUtil { public static String getTimeLiveEndString(long time) { Date date = new Date(time); // 创建Date对象并传入时间戳参数 - SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss"); // 设置日期格式 + SimpleDateFormat sdf = new SimpleDateFormat("HH:mm"); // 设置日期格式 String formattedDate = sdf.format(date); // 格式化日期字符串 return formattedDate; } diff --git a/common/src/main/res/values-zh/strings.xml b/common/src/main/res/values-zh/strings.xml index a110e1f5e..6ef45ccde 100644 --- a/common/src/main/res/values-zh/strings.xml +++ b/common/src/main/res/values-zh/strings.xml @@ -1054,10 +1054,10 @@ 請閱讀並同意《PDLIVE主播協議》 《PDLIVE主播協議》 新秀主播時效截止至 - 鑽石收禮 - 金豆收禮 - 收禮人數 - 進場人數 + 收穫鑽石 + 收穫金豆 + 打賞人數 + 觀看人數 新增關注 關注轉化率 新增粉絲團 diff --git a/live/src/main/java/com/yunbao/live/activity/LiveSwAnchorActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveSwAnchorActivity.java index 4dbfe3cf9..9ffffe5c7 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveSwAnchorActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveSwAnchorActivity.java @@ -834,7 +834,7 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl mLiveRoomViewHolder.setLiveInfo(mLiveUid, mStream, obj.getIntValue("userlist_time") * 1000); mLiveRoomViewHolder.setVotes(obj.getString("votestotal")); mLiveRoomViewHolder.setMedaRankNum(obj.getString("medalRankNum")); - //mLiveRoomViewHolder.setShowTask(obj.getString("new_task_url"),obj.getIntValue("is_new_live")==1); + mLiveRoomViewHolder.setShowTask(obj.getString("new_task_url"),obj.getIntValue("is_new_live")==1); mLiveRoomViewHolder.startFace(); UserBean u = CommonAppConfig.getInstance().getUserBean(); if (u != null) { diff --git a/live/src/main/java/com/yunbao/live/adapter/LiveChatAdapter.java b/live/src/main/java/com/yunbao/live/adapter/LiveChatAdapter.java index cc91e258e..7fbdf6c85 100644 --- a/live/src/main/java/com/yunbao/live/adapter/LiveChatAdapter.java +++ b/live/src/main/java/com/yunbao/live/adapter/LiveChatAdapter.java @@ -570,18 +570,18 @@ public class LiveChatAdapter extends RecyclerView.Adapter { mTextView.setText(Html.fromHtml(stringBuffer.toString())); new LoadDian9TuUtil().loadDian9TuAssets(mContext, mBg, 1); } else if(bean.getType() == TYPE_TO_TASK_INLET){ - String str = "發送彈幕與主播進行互動吧!參與新人觀播活动,完成任務領取超多新人豪華禮物!"; - String str_en = "Send bullet comments and interact with the streamer! Join the newbie event, complete tasks, and get luxurious gifts!"; + String str = "發送彈幕與主播進行互動吧!完成弹幕互动和点赞任務,还可以领取超多新人豪華禮物哦!活动入口"; + String str_en = "Complete the barrage interaction and like tasks, and you can also receive many new luxury gifts! Event entrance"; if(WordUtil.isNewZh()){ SpannableString spannableString = new SpannableString(str); - int start = str.indexOf("新人觀播活动"); - int end = start + "新人觀播活动".length(); + int start = str.indexOf("活动入口"); + int end = start + "活动入口".length(); spannableString.setSpan(new ForegroundColorSpan(mContext.getColor(R.color.chat_event_entrance)), start, end, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); mTextView.setText(spannableString); }else{ SpannableString spannableString = new SpannableString(str_en); - int start = str_en.indexOf("newbie event"); - int end = start + "newbie event".length(); + int start = str_en.indexOf("Event entrance"); + int end = start + "Event entrance".length(); spannableString.setSpan(new ForegroundColorSpan(mContext.getColor(R.color.chat_event_entrance)), start, end, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); mTextView.setText(spannableString); } diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveDataInfoDialog.java b/live/src/main/java/com/yunbao/live/dialog/LiveDataInfoDialog.java index e371a13aa..a6b2ccdc2 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveDataInfoDialog.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveDataInfoDialog.java @@ -3,6 +3,7 @@ package com.yunbao.live.dialog; import android.content.Context; import android.graphics.Color; import android.view.View; +import android.widget.TextView; import androidx.annotation.NonNull; import androidx.fragment.app.Fragment; @@ -39,6 +40,9 @@ public class LiveDataInfoDialog extends AbsDialogPopupWindow { private MagicIndicator mIndicator; private List fragmentList = new ArrayList<>(); + private TextView countZsTextView; + private TextView countPersonTextView; + public LiveDataInfoDialog(@NonNull Context context) { super(context); } @@ -61,11 +65,16 @@ public class LiveDataInfoDialog extends AbsDialogPopupWindow { @Override protected void onCreate() { super.onCreate(); + + countZsTextView = findViewById(R.id.countZs); + countPersonTextView = findViewById(R.id.countPerson); + final String[] titles = new String[]{WordUtil.getNewString(R.string.live_data_now_data), WordUtil.getNewString(R.string.live_data_gift_history)}; fragmentList.add(new LiveDataNowFragment(mContext, mLiveUid, mStream,new LiveDataNowFragment.onDataResult() { @Override public void Result(String countZs, String countPerson) { - + countZsTextView.setText(countZs); + countPersonTextView.setText(countPerson); } })); fragmentList.add(new LiveDataHistoryFragment( mContext,mStream)); diff --git a/live/src/main/java/com/yunbao/live/views/LiveEndViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveEndViewHolder.java index 53bf9d2be..2400616eb 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveEndViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveEndViewHolder.java @@ -308,7 +308,7 @@ public class LiveEndViewHolder extends AbsViewHolder implements View.OnClickList @Override public void onClick(View v) { String url = CommonAppConfig.HOST + "/h5/Grade/index.html?" + "token=" + CommonAppConfig.getInstance().getToken() + "&uid=" + CommonAppConfig.getInstance().getUid() + "&for"; - WebViewActivity.forward(mContext, url,true); + RouteUtil.forwardZhuangBanActivity(url); } }); findViewById(R.id.go_anchor_center).setOnClickListener(new View.OnClickListener() { @@ -377,11 +377,14 @@ public class LiveEndViewHolder extends AbsViewHolder implements View.OnClickList } if(anchor_level!=null){ long levelExp = Long.parseLong(next_level_exp); + String tips; if(Integer.parseInt(level_up)==0){ - levelExp = 0; + tips = mContext.getResources().getString(R.string.live_user_level_anchor) + +"Lv."+level; + }else{ + tips = mContext.getResources().getString(R.string.live_user_level_anchor) + +"Lv."+level+" | "+(WordUtil.isNewZh()?"差 "+levelExp+" 經驗升級":levelExp+" experience points to level up"); } - String tips = mContext.getResources().getString(R.string.live_user_level_anchor) - +"Lv."+level+" | "+(WordUtil.isNewZh()?"差 "+levelExp+" 經驗升級":levelExp+" experience points to level up"); anchor_level.setText(tips); } if(!StringUtil.isEmpty(hot_strategy)){ diff --git a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java index 1ec056af6..adb719a8b 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -486,8 +486,6 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis private TextView new_task_send_gift_details; private ImageView close_task_send_gift_close; - private ImageView newPersonTask; - public LiveRoomViewHolder setGuardType(int guardType) { this.guardType = guardType; return this; @@ -2323,14 +2321,6 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis }); new_task_send_gift_details = findViewById(R.id.new_task_send_gift_details); close_task_send_gift_close = findViewById(R.id.close_task_send_gift_close); - - newPersonTask = findViewById(R.id.newPersonTask); - newPersonTask.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - showH5Dialog(); - } - }); } /** @@ -5041,14 +5031,6 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis } } - /** - * 新人观播礼-判断是否是新用户 - */ - public void setNewPersonTask() { - newPersonTask.setVisibility(View.VISIBLE); - - } - private long getNextTime(int time) { long now = SystemClock.uptimeMillis(); if (time < 1000) { @@ -5531,34 +5513,33 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis @Override public void onBannerClick(List datas, int p) { - if (mBannerList4.get(p).getActivityId() == 511) { + if (mBannerList4.get(p).getLink().equals("BattlePass") || mBannerList4.get(p).getType() == 888) { + RouteUtil.forwardBattlePass(); + return; + } + if(mBannerList4.get(p).getLink().equals("NewUser") || mBannerList4.get(p).getType() == 999){ showH5Dialog(); + return; + } + if (TextUtils.equals("特惠首冲", mBannerList4.get(p).getName())) { + Map map_ekv = new HashMap(); + map_ekv.put("link", mBannerList4.get(p).getLink()); + MobclickAgent.onEvent(mContext, "live_room_first_charge", map_ekv); + } + Log.i("debug", "onBannerClick: " + mBannerList4.get(p).toString()); + BannerBean bean = mBannerList4.get(p); + if (showLoadingDialog()) { + return; + } + if (bean.getActivityId() == -1) {//-1写死跳活动弹窗 + Bus.get().post(new LiveAudienceEvent().setActivity(true).setType(LiveAudienceEvent.LiveAudienceType.BOTTOM_COLLECTION)); + } else if (bean.getActivityId() == 0) { + openWebDialog(bean.getLink()); } else { - if (mBannerList4.get(p).getLink().equals("BattlePass") || mBannerList4.get(p).getType() == 888) { - RouteUtil.forwardBattlePass(); - return; - } - if (TextUtils.equals("特惠首冲", mBannerList4.get(p).getName())) { - - Map map_ekv = new HashMap(); - map_ekv.put("link", mBannerList4.get(p).getLink()); - MobclickAgent.onEvent(mContext, "live_room_first_charge", map_ekv); - } - Log.i("debug", "onBannerClick: " + mBannerList4.get(p).toString()); - BannerBean bean = mBannerList4.get(p); - if (showLoadingDialog()) { - return; - } - if (bean.getActivityId() == -1) {//-1写死跳活动弹窗 - Bus.get().post(new LiveAudienceEvent().setActivity(true).setType(LiveAudienceEvent.LiveAudienceType.BOTTOM_COLLECTION)); - } else if (bean.getActivityId() == 0) { - openWebDialog(bean.getLink()); - } else { - LiveGameDialogFragment fragment = new LiveGameDialogFragment("1".equals(bean.getShow_type())); - fragment.setActivityId(bean.getActivityId()); - fragment.setRoomId(mLiveUid); - fragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveGameDialogFragment"); - } + LiveGameDialogFragment fragment = new LiveGameDialogFragment("1".equals(bean.getShow_type())); + fragment.setActivityId(bean.getActivityId()); + fragment.setRoomId(mLiveUid); + fragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveGameDialogFragment"); } } 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 d5f5640c0..d2e572d22 100644 --- a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java +++ b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java @@ -920,10 +920,6 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe } //观看200秒之后,推送活动入口im消息 mLiveRoomViewHolder.firstTaskInlet1Notify(); - //新人观播礼-判断是否是新用户 - if(data.getEnterRoomInfo().getIsNewUser().equals("1")){ - mLiveRoomViewHolder.setNewPersonTask(); - } } @Override diff --git a/live/src/main/res/layout/view_live_room.xml b/live/src/main/res/layout/view_live_room.xml index 0f22f805d..26d9f60b9 100644 --- a/live/src/main/res/layout/view_live_room.xml +++ b/live/src/main/res/layout/view_live_room.xml @@ -2755,17 +2755,6 @@ android:layout_marginBottom="5dp" android:visibility="gone" /> - -