小礼物逻辑上传

This commit is contained in:
18401019693
2023-11-30 10:45:45 +08:00
parent 71a7b47d42
commit 1f8025599b
14 changed files with 199 additions and 22 deletions

View File

@@ -6,6 +6,37 @@ public class QuickGiftingEvent extends BaseModel {
private int index;
private String svgaName;
private boolean show =false;
private boolean reminder = false;
private String giftRemainingQuantity;
private String hotNum;
public String getHotNum() {
return hotNum;
}
public QuickGiftingEvent setHotNum(String hotNum) {
this.hotNum = hotNum;
return this;
}
public String getGiftRemainingQuantity() {
return giftRemainingQuantity;
}
public QuickGiftingEvent setGiftRemainingQuantity(String giftRemainingQuantity) {
this.giftRemainingQuantity = giftRemainingQuantity;
return this;
}
public boolean isReminder() {
return reminder;
}
public QuickGiftingEvent setReminder(boolean reminder) {
this.reminder = reminder;
return this;
}
public boolean isShow() {
return show;

View File

@@ -60,6 +60,13 @@ public class IMLoginManager extends BaseCacheManager {
public boolean getRedPoint() {
return !TextUtils.isEmpty(getString("RedPoint")) && !TextUtils.equals(getString("RedPoint"), "1");
}
public void setQuickGiftIfFirst() {
put("quick_gift_if_first", "1");
}
public boolean getQuickGiftIfFirst() {
return TextUtils.isEmpty(getString("quick_gift_if_first")) || !TextUtils.equals(getString("quick_gift_if_first"), "1");
}
public void setSudGameMin() {
put("SudGameMin", "0");

View File

@@ -2,6 +2,7 @@ package com.yunbao.common.utils;
import static com.yunbao.common.CommonAppConfig.isGetNewWrap;
import static com.yunbao.common.utils.RouteUtil.PATH_COIN;
import static com.yunbao.common.utils.RouteUtil.PATH_REWARD;
import android.app.Activity;
import android.app.Dialog;
@@ -25,6 +26,7 @@ import com.yunbao.common.bean.VideoBean;
import com.yunbao.common.bean.VideoListBean;
import com.yunbao.common.event.JavascriptInterfaceEvent;
import com.yunbao.common.event.LiveRoomChangeEvent;
import com.yunbao.common.event.QuickGiftingEvent;
import com.yunbao.common.http.HttpCallback;
import com.yunbao.common.http.HttpClient;
import com.yunbao.common.http.LiveHttpUtil;
@@ -124,10 +126,10 @@ public class JavascriptInterfaceUtils {
url = CommonAppConfig.HOST + url;
if (url.contains("?")) {
url += "&uid=" + CommonAppConfig.getInstance().getUid() + "&token="
+ CommonAppConfig.getInstance().getToken()+ "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
+ CommonAppConfig.getInstance().getToken() + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
} else {
url += "?uid=" + CommonAppConfig.getInstance().getUid() + "&token="
+ CommonAppConfig.getInstance().getToken()+ "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
+ CommonAppConfig.getInstance().getToken() + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
}
if (LiveZhuangBana) {
RouteUtil.forwardLiveZhuangBanActivity(url, false);
@@ -147,10 +149,10 @@ public class JavascriptInterfaceUtils {
url = CommonAppConfig.HOST + url;
if (url.contains("?")) {
url += "&uid=" + CommonAppConfig.getInstance().getUid() + "&token="
+ CommonAppConfig.getInstance().getToken()+ "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
+ CommonAppConfig.getInstance().getToken() + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
} else {
url += "?uid=" + CommonAppConfig.getInstance().getUid() + "&token="
+ CommonAppConfig.getInstance().getToken()+ "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
+ CommonAppConfig.getInstance().getToken() + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
}
if (LiveZhuangBana) {
RouteUtil.forwardLiveZhuangBanActivity(url, title);
@@ -259,11 +261,12 @@ public class JavascriptInterfaceUtils {
/**
* 跳转直播并打开礼物栏选中礼物
*
* @param liveId 直播间id
* @param giftId 礼物id
*/
@JavascriptInterface
public void androidMethodLookToLiveGift(String liveId,String giftId){
public void androidMethodLookToLiveGift(String liveId, String giftId) {
LiveHttpUtil.getLiveInfo(liveId, new HttpCallback() {
@Override
public void onSuccess(int code, String msg, String[] info) {
@@ -300,6 +303,7 @@ public class JavascriptInterfaceUtils {
}
});
}
@JavascriptInterface
public void androidMethodLookToLive(String liveId) {
Bus.get().post(new JavascriptInterfaceEvent()
@@ -598,6 +602,18 @@ public class JavascriptInterfaceUtils {
.setMethod("clickLogOffAccount"));
}
@JavascriptInterface
public void androidClickToTaskPage() {
ARouter.getInstance().build(PATH_REWARD).withString("url",
CommonAppConfig.HOST + "/index.php?g=Appapi&m=task&a=index" + "&uid=" + CommonAppConfig.getInstance().getUid()
+ "&token=" + CommonAppConfig.getInstance().getToken() + "&tabIndex=1"+ "&isZh=" + (WordUtil.isNewZh() ? "1" : "0")).navigation();
}
@JavascriptInterface
public void androidQuickGiftRemainingQuantity(int giftRemainingQuantity) {
Bus.get().post(new QuickGiftingEvent().setGiftRemainingQuantity(String.valueOf(giftRemainingQuantity)));
}
@JavascriptInterface
public void androidFansGroupBuy(String id) {
Bus.get().post(new JavascriptInterfaceEvent()
@@ -644,8 +660,9 @@ public class JavascriptInterfaceUtils {
Bus.get().post(new JavascriptInterfaceEvent()
.setMethod("androidCancelAnchorAttention"));
}
@JavascriptInterface
public void androidLnsufficientBalanceClick(String msg){
public void androidLnsufficientBalanceClick(String msg) {
DialogUitl.showSimpleDialog(mContext, msg, new DialogUitl.SimpleCallback2() {
@Override
public void onCancelClick() {

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB