Merge remote-tracking branch 'origin/新潘多拉_6.8.2' into 新潘多拉_6.8.2

This commit is contained in:
ningwenqiang 2024-09-06 14:09:56 +08:00
commit 1357eaaac9
13 changed files with 60 additions and 77 deletions

View File

@ -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), data.getFanGroupNum() + ""));
list.add(new LiveDataInfoNowModel(getContext().getString(R.string.live_data_fan_group_rate), data.getFanGroupNumRate() + "")); list.add(new LiveDataInfoNowModel(getContext().getString(R.string.live_data_fan_group_rate), data.getFanGroupNumRate() + ""));
adapter.setList(list); adapter.setList(list);
if(onDataResult!=null){
onDataResult.Result(data.getTotalCoin() + "",data.getAcceptNum() + "");
}
} }
@Override @Override

View File

@ -40,6 +40,7 @@ public interface PDLiveApi {
@Field("user_pass") String passWord, @Field("user_pass") String passWord,
@Field("uuid_Device") String uuidDevice, @Field("uuid_Device") String uuidDevice,
@Field("pushid") String pushid, @Field("pushid") String pushid,
@Field("app_from") String PDL,
@Field("lastlogindevice") String lastlogindevice, @Field("lastlogindevice") String lastlogindevice,
@Field("langue") String langue @Field("langue") String langue
); );

View File

@ -55,7 +55,7 @@ public class MainNetManager {
* @param callback 网络请求回调 * @param callback 网络请求回调
*/ */
public void login(String phoneNum, String pwd, String uuid, HttpCallback<IMLoginModel> callback) { public void login(String phoneNum, String pwd, String uuid, HttpCallback<IMLoginModel> 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()) .subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread()) .observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<IMLoginModel>>() { .subscribe(new Consumer<ResponseModel<IMLoginModel>>() {

View File

@ -45,7 +45,7 @@ public class DateFormatUtil {
public static String getTimeLiveEndString(long time) { public static String getTimeLiveEndString(long time) {
Date date = new Date(time); // 创建Date对象并传入时间戳参数 Date date = new Date(time); // 创建Date对象并传入时间戳参数
SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss"); // 设置日期格式 SimpleDateFormat sdf = new SimpleDateFormat("HH:mm"); // 设置日期格式
String formattedDate = sdf.format(date); // 格式化日期字符串 String formattedDate = sdf.format(date); // 格式化日期字符串
return formattedDate; return formattedDate;
} }

View File

@ -1054,10 +1054,10 @@
<string name="anchor_agreement_hint">請閱讀並同意《PDLIVE主播協議》</string> <string name="anchor_agreement_hint">請閱讀並同意《PDLIVE主播協議》</string>
<string name="anchor_hint">《PDLIVE主播協議》</string> <string name="anchor_hint">《PDLIVE主播協議》</string>
<string name="live_task_new_user_timer">新秀主播時效截止至 </string> <string name="live_task_new_user_timer">新秀主播時效截止至 </string>
<string name="live_data_coin">鑽石收禮</string> <string name="live_data_coin">收穫鑽石</string>
<string name="live_data_gold">金豆收禮</string> <string name="live_data_gold">收穫金豆</string>
<string name="live_data_accept">收禮人數</string> <string name="live_data_accept">打賞人數</string>
<string name="live_data_enter">進場人數</string> <string name="live_data_enter">觀看人數</string>
<string name="live_data_attention">新增關注</string> <string name="live_data_attention">新增關注</string>
<string name="live_data_attention_rate">關注轉化率</string> <string name="live_data_attention_rate">關注轉化率</string>
<string name="live_data_fan_group">新增粉絲團</string> <string name="live_data_fan_group">新增粉絲團</string>

View File

@ -834,7 +834,7 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl
mLiveRoomViewHolder.setLiveInfo(mLiveUid, mStream, obj.getIntValue("userlist_time") * 1000); mLiveRoomViewHolder.setLiveInfo(mLiveUid, mStream, obj.getIntValue("userlist_time") * 1000);
mLiveRoomViewHolder.setVotes(obj.getString("votestotal")); mLiveRoomViewHolder.setVotes(obj.getString("votestotal"));
mLiveRoomViewHolder.setMedaRankNum(obj.getString("medalRankNum")); 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(); mLiveRoomViewHolder.startFace();
UserBean u = CommonAppConfig.getInstance().getUserBean(); UserBean u = CommonAppConfig.getInstance().getUserBean();
if (u != null) { if (u != null) {

View File

@ -570,18 +570,18 @@ public class LiveChatAdapter extends RecyclerView.Adapter {
mTextView.setText(Html.fromHtml(stringBuffer.toString())); mTextView.setText(Html.fromHtml(stringBuffer.toString()));
new LoadDian9TuUtil().loadDian9TuAssets(mContext, mBg, 1); new LoadDian9TuUtil().loadDian9TuAssets(mContext, mBg, 1);
} else if(bean.getType() == TYPE_TO_TASK_INLET){ } else if(bean.getType() == TYPE_TO_TASK_INLET){
String str = "發送彈幕與主播進行互動吧!參與新人觀播活动,完成任務領取超多新人豪華禮物!"; 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_en = "Complete the barrage interaction and like tasks, and you can also receive many new luxury gifts! Event entrance";
if(WordUtil.isNewZh()){ if(WordUtil.isNewZh()){
SpannableString spannableString = new SpannableString(str); SpannableString spannableString = new SpannableString(str);
int start = str.indexOf("新人觀播活动"); int start = str.indexOf("活动入口");
int end = start + "新人觀播活动".length(); int end = start + "活动入口".length();
spannableString.setSpan(new ForegroundColorSpan(mContext.getColor(R.color.chat_event_entrance)), start, end, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); spannableString.setSpan(new ForegroundColorSpan(mContext.getColor(R.color.chat_event_entrance)), start, end, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
mTextView.setText(spannableString); mTextView.setText(spannableString);
}else{ }else{
SpannableString spannableString = new SpannableString(str_en); SpannableString spannableString = new SpannableString(str_en);
int start = str_en.indexOf("newbie event"); int start = str_en.indexOf("Event entrance");
int end = start + "newbie event".length(); int end = start + "Event entrance".length();
spannableString.setSpan(new ForegroundColorSpan(mContext.getColor(R.color.chat_event_entrance)), start, end, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); spannableString.setSpan(new ForegroundColorSpan(mContext.getColor(R.color.chat_event_entrance)), start, end, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
mTextView.setText(spannableString); mTextView.setText(spannableString);
} }

View File

@ -3,6 +3,7 @@ package com.yunbao.live.dialog;
import android.content.Context; import android.content.Context;
import android.graphics.Color; import android.graphics.Color;
import android.view.View; import android.view.View;
import android.widget.TextView;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment; import androidx.fragment.app.Fragment;
@ -39,6 +40,9 @@ public class LiveDataInfoDialog extends AbsDialogPopupWindow {
private MagicIndicator mIndicator; private MagicIndicator mIndicator;
private List<Fragment> fragmentList = new ArrayList<>(); private List<Fragment> fragmentList = new ArrayList<>();
private TextView countZsTextView;
private TextView countPersonTextView;
public LiveDataInfoDialog(@NonNull Context context) { public LiveDataInfoDialog(@NonNull Context context) {
super(context); super(context);
} }
@ -61,11 +65,16 @@ public class LiveDataInfoDialog extends AbsDialogPopupWindow {
@Override @Override
protected void onCreate() { protected void onCreate() {
super.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)}; 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() { fragmentList.add(new LiveDataNowFragment(mContext, mLiveUid, mStream,new LiveDataNowFragment.onDataResult() {
@Override @Override
public void Result(String countZs, String countPerson) { public void Result(String countZs, String countPerson) {
countZsTextView.setText(countZs);
countPersonTextView.setText(countPerson);
} }
})); }));
fragmentList.add(new LiveDataHistoryFragment( mContext,mStream)); fragmentList.add(new LiveDataHistoryFragment( mContext,mStream));

View File

@ -308,7 +308,7 @@ public class LiveEndViewHolder extends AbsViewHolder implements View.OnClickList
@Override @Override
public void onClick(View v) { public void onClick(View v) {
String url = CommonAppConfig.HOST + "/h5/Grade/index.html?" + "token=" + CommonAppConfig.getInstance().getToken() + "&uid=" + CommonAppConfig.getInstance().getUid() + "&for"; 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() { 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){ if(anchor_level!=null){
long levelExp = Long.parseLong(next_level_exp); long levelExp = Long.parseLong(next_level_exp);
String tips;
if(Integer.parseInt(level_up)==0){ 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); anchor_level.setText(tips);
} }
if(!StringUtil.isEmpty(hot_strategy)){ if(!StringUtil.isEmpty(hot_strategy)){

View File

@ -486,8 +486,6 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
private TextView new_task_send_gift_details; private TextView new_task_send_gift_details;
private ImageView close_task_send_gift_close; private ImageView close_task_send_gift_close;
private ImageView newPersonTask;
public LiveRoomViewHolder setGuardType(int guardType) { public LiveRoomViewHolder setGuardType(int guardType) {
this.guardType = guardType; this.guardType = guardType;
return this; 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); 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); 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) { private long getNextTime(int time) {
long now = SystemClock.uptimeMillis(); long now = SystemClock.uptimeMillis();
if (time < 1000) { if (time < 1000) {
@ -5531,34 +5513,33 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
@Override @Override
public void onBannerClick(List datas, int p) { 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(); showH5Dialog();
return;
}
if (TextUtils.equals("特惠首冲", mBannerList4.get(p).getName())) {
Map<String, String> map_ekv = new HashMap<String, String>();
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 { } else {
if (mBannerList4.get(p).getLink().equals("BattlePass") || mBannerList4.get(p).getType() == 888) { LiveGameDialogFragment fragment = new LiveGameDialogFragment("1".equals(bean.getShow_type()));
RouteUtil.forwardBattlePass(); fragment.setActivityId(bean.getActivityId());
return; fragment.setRoomId(mLiveUid);
} fragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveGameDialogFragment");
if (TextUtils.equals("特惠首冲", mBannerList4.get(p).getName())) {
Map<String, String> map_ekv = new HashMap<String, String>();
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");
}
} }
} }

View File

@ -920,10 +920,6 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
} }
//观看200秒之后推送活动入口im消息 //观看200秒之后推送活动入口im消息
mLiveRoomViewHolder.firstTaskInlet1Notify(); mLiveRoomViewHolder.firstTaskInlet1Notify();
//新人观播礼-判断是否是新用户
if(data.getEnterRoomInfo().getIsNewUser().equals("1")){
mLiveRoomViewHolder.setNewPersonTask();
}
} }
@Override @Override

View File

@ -2755,17 +2755,6 @@
android:layout_marginBottom="5dp" android:layout_marginBottom="5dp"
android:visibility="gone" /> android:visibility="gone" />
<ImageView
android:id="@+id/newPersonTask"
android:layout_width="44dp"
android:layout_height="44dp"
android:layout_gravity="end"
tools:visibility="visible"
android:layout_marginEnd="16dp"
android:visibility="gone"
android:layout_marginBottom="5dp"
android:src="@mipmap/live_room_new_task_gift" />
<ImageView <ImageView
android:id="@+id/prank_group_turntable_icon" android:id="@+id/prank_group_turntable_icon"
android:layout_width="44dp" android:layout_width="44dp"

View File

@ -49,6 +49,7 @@ public class MainHttpUtil {
.params("user_login", phoneNum) .params("user_login", phoneNum)
.params("user_pass", pwd) .params("user_pass", pwd)
.params("pushid", "") .params("pushid", "")
.params("app_from", "PDL")
.params("lastlogindevice", "Android") .params("lastlogindevice", "Android")
.params("uuid_Device", uuid) .params("uuid_Device", uuid)
.params("langue", WordUtil.isNewZh()?"chinese":"english") .params("langue", WordUtil.isNewZh()?"chinese":"english")