Merge remote-tracking branch 'origin/master'

This commit is contained in:
hch 2024-04-07 10:05:51 +08:00
commit a0294a8405
11 changed files with 87 additions and 16 deletions

View File

@ -0,0 +1,32 @@
package com.yunbao.common.dialog;
import android.content.Context;
import androidx.annotation.NonNull;
import com.lxj.xpopup.core.CenterPopupView;
import com.yunbao.common.R;
import com.yunbao.common.views.weight.ViewClicksAntiShake;
public class SkitCheckInWasSuccessfulPopup extends CenterPopupView {
public SkitCheckInWasSuccessfulPopup(@NonNull Context context) {
super(context);
}
@Override
protected int getImplLayoutId() {
return R.layout.skit_check_in_was_successful_popup;
}
// 执行初始化操作比如findView设置点击或者任何你弹窗内的业务逻辑
@Override
protected void onCreate() {
super.onCreate();
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.icon_slice_368), new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
dismiss();
}
});
}
}

View File

@ -110,7 +110,8 @@ public interface PDLiveApi {
@Field("user_pass") String passWord,
@Field("uuid_Device") String uuidDevice,
@Field("pushid") String pushid,
@Field("lastlogindevice") String lastlogindevice
@Field("lastlogindevice") String lastlogindevice,
@Field("langue")String langue
);
/**

View File

@ -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.utils.WordUtil;
import java.util.HashMap;
import java.util.List;
@ -54,7 +55,7 @@ public class MainNetManager {
* @param callback 网络请求回调
*/
public void login(String phoneNum, String pwd, String uuid, HttpCallback<IMLoginModel> callback) {
API.get().pdLiveApi(mContext).loginByManager(phoneNum, pwd, uuid, "", "Android")
API.get().pdLiveApi(mContext).loginByManager(phoneNum, pwd, uuid, "", "Android", WordUtil.isNewZh()?"chinese":"english")
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<IMLoginModel>>() {

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="258dp"
android:layout_height="293dp"
android:orientation="vertical">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@mipmap/back_slice_367" />
<ImageView
android:id="@+id/icon_slice_368"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_gravity="end"
android:layout_marginTop="89dp"
android:layout_marginEnd="13dp"
android:src="@mipmap/icon_slice_368" />
</FrameLayout>

Binary file not shown.

After

Width:  |  Height:  |  Size: 536 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@ -225,20 +225,20 @@ public class LiveBuyGuardDialog extends AbsDialogPopupWindow {
MobclickAgent.onEvent(mContext, "star_guardian_people", "星之守护页面观看次数及人数");
bottomPanel.setBackgroundResource(R.drawable.bg_star_guard_bottom_panel);
ImgLoader.display(getContext(), R.mipmap.btn_star_guard, btnGuard);
openTheGuard.setText(dataTipModel.isOpen() ? WordUtil.getNewString(R.string.renewal_guardian)
openTheGuard.setText(dataTipModel.isOpen() ? WordUtil.isNewZh()?"續費星之守護":"Renew Star Guardian"
: WordUtil.getNewString(R.string.open_the_start_guard));
} else if (position == 1) {
MobclickAgent.onEvent(mContext, "king_guardian_people", "王之守护页面观看次数及人数");
bottomPanel.setBackgroundResource(R.drawable.bg_king_guard_bottom_panel);
ImgLoader.display(getContext(), R.mipmap.btn_king_guard, btnGuard);
openTheGuard.setText(dataTipModel.isOpen() ? WordUtil.getNewString(R.string.renewal_guardian)
openTheGuard.setText(dataTipModel.isOpen() ? WordUtil.isNewZh()?"續費王之守護":"Renew King Guardian"
: WordUtil.getNewString(R.string.open_the_kings_guard));
} else if (position == 2) {
MobclickAgent.onEvent(mContext, "god_guardian_people", "神之守护页面观看次数及人数");
bottomPanel.setBackgroundResource(R.drawable.bg_god_guard_bottom_panel);
ImgLoader.display(getContext(), R.mipmap.btn_god_guard, btnGuard);
openTheGuard.setText(dataTipModel.isOpen() ? WordUtil.getNewString(R.string.renewal_guardian)
openTheGuard.setText(dataTipModel.isOpen() ? WordUtil.isNewZh()?"續費神之守護":"Renew God Guardian"
: WordUtil.getNewString(R.string.open_the_god_guard));
}
guardPriceModel = price.get(0);
@ -385,6 +385,7 @@ public class LiveBuyGuardDialog extends AbsDialogPopupWindow {
dismiss();
if (dataTipModel.getGuardType() == 3) {
new XPopup.Builder(mContext)
.dismissOnTouchOutside(false) // 点击外部是否关闭弹窗默认为true
.asCustom(new DragonSendsMoneyPopup(mContext, mLiveUid))
.show();
}

View File

@ -204,37 +204,37 @@ public class LiveGuardDialog extends AbsDialogPopupWindow {
guardianTask.setVisibility(GONE);
myGraudGrade.setVisibility(GONE);
btnGuardOpen.setText(WordUtil.isNewZh() ? "開通守護" : "Open Guard");
guard_hint.setText(WordUtil.isNewZh()?"快為您喜歡的主播開通守護吧!":"Turn on the guard for your favorite anchor!");
guard_hint.setText(WordUtil.isNewZh() ? "快為您喜歡的主播開通守護吧!" : "Turn on the guard for your favorite anchor!");
} else {
if (data.getGuardType() == 0) {
guardianTask.setVisibility(GONE);
myGraudGrade.setVisibility(GONE);
btnGuardOpen.setText(WordUtil.isNewZh() ? "開通守護" : "Open Guard");
guard_hint.setText(WordUtil.isNewZh()?"快為您喜歡的主播開通守護吧!":"Turn on the guard for your favorite anchor!");
guard_hint.setText(WordUtil.isNewZh() ? "快為您喜歡的主播開通守護吧!" : "Turn on the guard for your favorite anchor!");
} else {
guardianTask.setVisibility(VISIBLE);
myGraudGrade.setVisibility(VISIBLE);
btnGuardOpen.setText(WordUtil.isNewZh() ? "續費守護" : "Renewal Guard");
btnGuardOpen.setText(WordUtil.isNewZh() ? "續費守護" : "Renewal");
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append(WordUtil.isNewZh() ? "您是當前主播的" : "You are the ");
switch (data.getGuardType()) {
case 1:
stringBuffer.append(WordUtil.isNewZh() ? "星之守護" : "star guardian")
.append(" of the current streamer");
stringBuffer.append(WordUtil.isNewZh() ? "星之守護" : "star guardian")
.append(WordUtil.isNewZh() ? " " :" of the current streamer");
guard_hint.setText(stringBuffer.toString());
break;
case 2:
stringBuffer.append(WordUtil.isNewZh() ? "王之守護" : "king guardian")
.append(" of the current streamer");
stringBuffer.append(WordUtil.isNewZh() ? "王之守護" : "king guardian")
.append(WordUtil.isNewZh() ? " " :" of the current streamer");
guard_hint.setText(stringBuffer.toString());
break;
case 3:
stringBuffer.append(WordUtil.isNewZh() ? "神之守護" : "god guardian")
.append(" of the current streamer");
stringBuffer.append(WordUtil.isNewZh() ? "神之守護" : "god guardian")
.append(WordUtil.isNewZh() ? " " :" of the current streamer");
guard_hint.setText(stringBuffer.toString());
break;
default:
guard_hint.setText(WordUtil.isNewZh()?"快為您喜歡的主播開通守護吧!":"Turn on the guard for your favorite anchor!");
guard_hint.setText(WordUtil.isNewZh() ? "快為您喜歡的主播開通守護吧!" : "Turn on the guard for your favorite anchor!");
break;
}
}

View File

@ -33,6 +33,7 @@ import com.yunbao.common.Constants;
import com.yunbao.common.bean.CoolConfig;
import com.yunbao.common.bean.NativeCallbackModel;
import com.yunbao.common.dialog.CinemaTicketPopupWindow;
import com.yunbao.common.dialog.SkitCheckInWasSuccessfulPopup;
import com.yunbao.common.event.JavascriptInterfaceEvent;
import com.yunbao.common.fragment.BaseFragment;
import com.yunbao.common.http.HttpCallback;
@ -226,6 +227,15 @@ public class MainHomeCommunityVideoFragment extends BaseFragment {
System.out.println("code = " + code + ", msg = " + msg + ", info = " + Arrays.toString(info));
if (code == 0) {
mWebView.loadUrl(JSONObject.parseObject(info[0]).getString("url"));
String sign_ok = JSONObject.parseObject(info[0]).getString("sign_ok");
if (TextUtils.equals(sign_ok,"1")){
new XPopup.Builder(mContext)
.asCustom(new SkitCheckInWasSuccessfulPopup(mContext))
.show();
}
// new XPopup.Builder(mContext)
// .asCustom(new SkitCheckInWasSuccessfulPopup(mContext))
// .show();
}
}
});

View File

@ -51,6 +51,7 @@ public class MainHttpUtil {
.params("pushid", "")
.params("lastlogindevice", "Android")
.params("uuid_Device", uuid)
.params("langue", WordUtil.isNewZh()?"chinese":"english")
.execute(callback);
}

View File

@ -8,8 +8,10 @@ import android.widget.HorizontalScrollView;
import android.widget.ImageView;
import android.widget.TextView;
import com.lxj.xpopup.XPopup;
import com.umeng.analytics.MobclickAgent;
import com.yunbao.common.activity.AbsActivity;
import com.yunbao.common.dialog.SkitCheckInWasSuccessfulPopup;
import com.yunbao.common.event.FloatWarOrderEvent;
import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.utils.RouteUtil;
@ -59,7 +61,9 @@ public class MainHomeViewHolder extends AbsMainHomeParentViewHolder {
// img_trophy.setOnLongClickListener(new View.OnLongClickListener() {
// @Override
// public boolean onLongClick(View view) {
//
// new XPopup.Builder(mContext)
// .asCustom(new SkitCheckInWasSuccessfulPopup(mContext))
// .show();
// return true;
// }
// });