Merge remote-tracking branch 'origin/dev_6.6.4_战令' into dev_6.6.4_战令

This commit is contained in:
zlzw 2023-12-12 17:59:09 +08:00
commit b10312118b
9 changed files with 167 additions and 62 deletions

View File

@ -0,0 +1,27 @@
package com.yunbao.common.dialog;
import android.content.Context;
import androidx.annotation.NonNull;
import com.lxj.xpopup.core.CenterPopupView;
import com.yunbao.common.R;
/**
* 升級精英/尊享戰令
*/
public class PromotionElitePopupWindow extends CenterPopupView {
public PromotionElitePopupWindow(@NonNull Context context) {
super(context);
}
@Override
protected int getImplLayoutId() {
return R.layout.promotion_elite_popup;
}
// 执行初始化操作比如findView设置点击或者任何你弹窗内的业务逻辑
@Override
protected void onCreate() {
super.onCreate();
}
}

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<bitmap
android:gravity="fill_vertical|fill_horizontal"
android:src="@drawable/background_order_dialog_out_layout" />
</item>
<item
android:bottom="3dp"
android:left="3dp"
android:right="4dp"
android:top="4dp">
<shape>
<solid android:color="#F5F5FF" />
<corners android:radius="10dp" />
<stroke
android:width="3dp"
android:color="#657FE4" />
</shape>
</item>
</layer-list>

Binary file not shown.

After

Width:  |  Height:  |  Size: 873 KiB

View File

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="219dp"
android:layout_marginStart="22dp"
android:layout_marginEnd="22dp"
android:background="@drawable/background_order_dialog"
android:orientation="vertical">
<ImageView
android:layout_width="19dp"
android:layout_height="19dp"
android:layout_gravity="end"
android:layout_marginTop="14dp"
android:layout_marginEnd="14dp"
android:src="@mipmap/icon_sud_rule_close" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="18dp"
android:gravity="center"
android:text="@string/upgrade_elite"
android:textColor="#0D21B2"
android:textSize="23sp"
android:textStyle="bold" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="28dp"
android:gravity="center"
android:text="@string/upgrade_elite2"
android:textColor="#0D21B2"
android:textSize="16sp" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="30dp">
<Button
android:layout_width="116dp"
android:layout_height="38dp"
android:layout_marginStart="34dp"
android:background="@mipmap/button_quintessence" />
<Button
android:layout_width="116dp"
android:layout_height="38dp"
android:layout_gravity="end"
android:layout_marginEnd="34dp"
android:background="@mipmap/button_enjoy" />
</FrameLayout>
</LinearLayout>

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

View File

@ -1396,4 +1396,6 @@ Limited ride And limited avatar frame</string>
<string name="conversion_quantity_need_of_use1">1.One star coin can be exchanged for one ticket. You can customize the exchange quantity according to your needs. Once the ticket is exchanged, it cannot be revoked. Please confirm in advance;</string>
<string name="conversion_quantity_need_of_use2">2.One ticket can be used to watch one episode of a short drama. After successful redemption, you can return to the viewing page and use the ticket to continue watching the movie;</string>
<string name="conversion_quantity_need_of_use3">3.Ticket prohibit illegal activities such as offline trading and acquisitions, and PDLIVE will crack down severely on various profit-making trading activities.</string>
<string name="upgrade_elite">升級精英/尊享戰令</string>
<string name="upgrade_elite2">可領取海量積分,兌換更多獎勵</string>
</resources>

View File

@ -9,9 +9,9 @@ ext {
]
manifestPlaceholders = [
//
serverHost : "https://napi.yaoulive.com",
// serverHost : "https://napi.yaoulive.com",
//
//serverHost : " https://ceshi.yaoulive.com",
serverHost : " https://ceshi.yaoulive.com",
//

View File

@ -3,7 +3,6 @@ package com.yunbao.main.views;
import static android.content.Context.CLIPBOARD_SERVICE;
import android.app.Activity;
import android.app.Dialog;
import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.Context;
@ -31,23 +30,18 @@ import androidx.annotation.RequiresApi;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.lxj.xpopup.XPopup;
import com.momo.mcamera.util.JsonUtil;
import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.Constants;
import com.yunbao.common.HtmlConfig;
import com.yunbao.common.bean.CoolConfig;
import com.yunbao.common.bean.LiveBean;
import com.yunbao.common.bean.NativeCallbackModel;
import com.yunbao.common.dialog.CinemaTicketPopupWindow;
import com.yunbao.common.dialog.PromotionElitePopupWindow;
import com.yunbao.common.event.JavascriptInterfaceEvent;
import com.yunbao.common.http.HttpCallback;
import com.yunbao.common.http.LiveHttpUtil;
import com.yunbao.common.http.live.LiveNetManager;
import com.yunbao.common.interfaces.OnItemClickListener;
import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.common.utils.Bus;
import com.yunbao.common.utils.DeviceUtils;
import com.yunbao.common.utils.DialogUitl;
import com.yunbao.common.utils.DpUtil;
import com.yunbao.common.utils.JavascriptInterfacePlayLetUtils;
import com.yunbao.common.utils.JavascriptInterfaceUtils;
@ -58,7 +52,6 @@ import com.yunbao.common.utils.ToastUtil;
import com.yunbao.live.views.LoadingView;
import com.yunbao.main.R;
import com.yunbao.main.activity.MainActivity;
import com.yunbao.main.activity.MyWalletActivity;
import com.yunbao.main.dialog.EncourageDialog;
import com.yunbao.main.utils.BottomBarUtil;
import com.yunbao.share.ui.SharePopDialog;
@ -393,56 +386,62 @@ public class MainHomeCommunityViewHolder extends AbsMainHomeChildViewHolder impl
.setAnchorAvatar(json.getString("avatar"))
.showDialog();
} else if (TextUtils.equals(event.getMethod(), "postWeakBalance")) {
LiveNetManager.get(mContext).
getCoolConfig(new com.yunbao.common.http.base.HttpCallback<CoolConfig>() {
@Override
public void onSuccess(CoolConfig data) {
new XPopup.Builder(mContext)
.enableDrag(false)
.maxWidth(DeviceUtils.getScreenHeight((Activity) mContext) - DpUtil.dp2px(34))
.asCustom(new CinemaTicketPopupWindow(mContext, data.setTicketCount(event.getCoolConfig().getTicketCount()), new CinemaTicketPopupWindow.CinemaTicketPopupWindowCallBack() {
@Override
public void onCallBack(String data) {
if (TextUtils.equals(data, "2")) {
DialogUitl.showSimpleDialog(mContext, mContext.getString(com.yunbao.live.R.string.live_coin_not_enough), false,
new DialogUitl.SimpleCallback2() {
@Override
public void onConfirmClick(Dialog dialog, String content) {
mContext.startActivity(new Intent(mContext, MyWalletActivity.class).putExtra("p", 1));
}
.asCustom(new PromotionElitePopupWindow(mContext))
.show();
@Override
public void onCancelClick() {
}
});
} else if (TextUtils.equals(data, "1")) {
mWebView.post(new Runnable() {
@Override
public void run() {
NativeCallbackModel model = new NativeCallbackModel();
model.setUid(String.valueOf(IMLoginManager.get(mContext).getUserInfo().getId()));
String nativeJson = new JsonUtil().toJson(model);
mWebView.evaluateJavascript("javascript:nativeCallback('" + nativeJson + "')", new ValueCallback<String>() {
@Override
public void onReceiveValue(String value) {
}
});
}
});
}
}
})).show();
}
@Override
public void onError(String error) {
ToastUtil.show(error);
}
});
// LiveNetManager.get(mContext).
// getCoolConfig(new com.yunbao.common.http.base.HttpCallback<CoolConfig>() {
// @Override
// public void onSuccess(CoolConfig data) {
// new XPopup.Builder(mContext)
// .enableDrag(false)
// .maxWidth(DeviceUtils.getScreenHeight((Activity) mContext) - DpUtil.dp2px(34))
// .asCustom(new CinemaTicketPopupWindow(mContext, data.setTicketCount(event.getCoolConfig().getTicketCount()), new CinemaTicketPopupWindow.CinemaTicketPopupWindowCallBack() {
// @Override
// public void onCallBack(String data) {
// if (TextUtils.equals(data, "2")) {
// DialogUitl.showSimpleDialog(mContext, mContext.getString(com.yunbao.live.R.string.live_coin_not_enough), false,
// new DialogUitl.SimpleCallback2() {
// @Override
// public void onConfirmClick(Dialog dialog, String content) {
// mContext.startActivity(new Intent(mContext, MyWalletActivity.class).putExtra("p", 1));
// }
//
// @Override
// public void onCancelClick() {
//
// }
// });
// } else if (TextUtils.equals(data, "1")) {
// mWebView.post(new Runnable() {
// @Override
// public void run() {
//
// NativeCallbackModel model = new NativeCallbackModel();
// model.setUid(String.valueOf(IMLoginManager.get(mContext).getUserInfo().getId()));
// String nativeJson = new JsonUtil().toJson(model);
// mWebView.evaluateJavascript("javascript:nativeCallback('" + nativeJson + "')", new ValueCallback<String>() {
// @Override
// public void onReceiveValue(String value) {
// }
// });
//
// }
// });
// }
//
// }
// })).show();
// }
//
// @Override
// public void onError (String error){
// ToastUtil.show(error);
// }
// });
}
}