diff --git a/common/src/main/java/com/yunbao/common/bean/AnchorRecommendModel.java b/common/src/main/java/com/yunbao/common/bean/AnchorRecommendModel.java
index 80c69327c..8129692a6 100644
--- a/common/src/main/java/com/yunbao/common/bean/AnchorRecommendModel.java
+++ b/common/src/main/java/com/yunbao/common/bean/AnchorRecommendModel.java
@@ -20,6 +20,12 @@ public class AnchorRecommendModel extends BaseModel {
@SerializedName("red_packet_show")
private int showRedPacket = 0;//是否显示首页红包浮窗
//是否支持换一批0=不支持 1=支持
+
+
+ @SerializedName("live_battle_pass_show_status")
+ private int showWarOrder = 0;//是否显示首页戰令
+ //是否支持换一批0=不支持 1=支持
+
@SerializedName("up_show")
private int upShow = 0;
@SerializedName("list")
@@ -40,6 +46,14 @@ public class AnchorRecommendModel extends BaseModel {
return this;
}
+ public int getShowWarOrder() {
+ return showWarOrder;
+ }
+
+ public void setShowWarOrder(int showWarOrder) {
+ this.showWarOrder = showWarOrder;
+ }
+
public int getListShow() {
return listShow;
}
diff --git a/common/src/main/java/com/yunbao/common/pay/samsung/SamsungUtil.java b/common/src/main/java/com/yunbao/common/pay/samsung/SamsungUtil.java
index ccd9c308b..dcba2f4e4 100644
--- a/common/src/main/java/com/yunbao/common/pay/samsung/SamsungUtil.java
+++ b/common/src/main/java/com/yunbao/common/pay/samsung/SamsungUtil.java
@@ -41,7 +41,7 @@ public class SamsungUtil {
public void init() {
iapHelper = IapHelper.getInstance(mContext);
//设置支付模式 OPERATION_MODE_PRODUCTION 正式模式 OPERATION_MODE_TEST 测试模式
- iapHelper.setOperationMode(HelperDefine.OperationMode.OPERATION_MODE_TEST);
+ iapHelper.setOperationMode(HelperDefine.OperationMode.OPERATION_MODE_PRODUCTION);
}
/**
diff --git a/common/src/main/java/com/yunbao/common/utils/RouteUtil.java b/common/src/main/java/com/yunbao/common/utils/RouteUtil.java
index a1395186e..c0a8de699 100644
--- a/common/src/main/java/com/yunbao/common/utils/RouteUtil.java
+++ b/common/src/main/java/com/yunbao/common/utils/RouteUtil.java
@@ -31,6 +31,7 @@ public class RouteUtil {
public static final String PATH_LIVEREPORT = "/live/LiveReportActivity";
public static final String PATH_MYWEBVIEWACTIVTITY = "/main/MyWebViewActivity";
public static final String PATH_ZHUANGBANACTIVITY = "/main/ZhuangBanActivity";
+ public static final String PATH_COMPENSATE_ACTIVITY = "/live/CompensateActivity";
public static final String PATH_LiveZHUANGBANACTIVITY = "/live/ZhuangBanActivity";
public static final String PATH_FACEBOOKACTIVITY = "/baidu/FacebookLoginActivity";
public static final String PATH_MAIN = "/main/MainActivity";
@@ -46,6 +47,7 @@ public class RouteUtil {
public static final String PATH_RED_PACKET_INFO = "/main/RedPacketInfoActivity";
public static final String PATH_RED_PACKET_USER = "/main/RedPacketUsersActivity";
public static final String PATH_SELECT_AVATAR="/main/UserAvatarSelectActivity";
+ public static final String PATH_BattlePassActivity="/main/BattlePassActivity";
public static void forwardFansActivity(String uid) {
ARouter.getInstance().build(PATH_FANSACTIVITY)
@@ -128,6 +130,23 @@ public class RouteUtil {
.navigation();
}
+
+ /**
+ * 跳转到
+ */
+ public static void forwardLiveCompensateActivity(Context context, String msgid, String banner, String title, String content, String time, String link, boolean receive) {
+ ARouter.getInstance().build(PATH_COMPENSATE_ACTIVITY)
+ .withString("msgid", msgid)
+ .withString("banner", banner)
+ .withString("title", title)
+ .withString("content", content)
+ .withString("time", time)
+ .withString("link", link)
+ .withBoolean("receive", receive)
+ .navigation();
+ }
+
+
/**
* 跳转到装扮
*/
diff --git a/common/src/main/res/values-en-rUS/string.xml b/common/src/main/res/values-en-rUS/string.xml
index 6fe78fa1f..e805c95c8 100644
--- a/common/src/main/res/values-en-rUS/string.xml
+++ b/common/src/main/res/values-en-rUS/string.xml
@@ -1439,4 +1439,6 @@ Limited ride And limited avatar frame
-
-
+
+ BattlePass
diff --git a/common/src/main/res/values-zh-rHK/strings.xml b/common/src/main/res/values-zh-rHK/strings.xml
index de9bd799c..aa40007ff 100644
--- a/common/src/main/res/values-zh-rHK/strings.xml
+++ b/common/src/main/res/values-zh-rHK/strings.xml
@@ -1438,4 +1438,6 @@
月
日
+ 直播通行證
+
diff --git a/common/src/main/res/values-zh-rTW/strings.xml b/common/src/main/res/values-zh-rTW/strings.xml
index 2ff35c956..095f493f6 100644
--- a/common/src/main/res/values-zh-rTW/strings.xml
+++ b/common/src/main/res/values-zh-rTW/strings.xml
@@ -1437,4 +1437,6 @@
月
日
+ 直播通行證
+
diff --git a/common/src/main/res/values-zh/strings.xml b/common/src/main/res/values-zh/strings.xml
index b7c7a90f5..acde5ffef 100644
--- a/common/src/main/res/values-zh/strings.xml
+++ b/common/src/main/res/values-zh/strings.xml
@@ -1434,4 +1434,6 @@
月
日
+ 直播通行證
+
diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml
index 9d488a6bc..560a55abb 100644
--- a/common/src/main/res/values/strings.xml
+++ b/common/src/main/res/values/strings.xml
@@ -1443,4 +1443,6 @@ Limited ride And limited avatar frame
-
+ BattlePass
+
diff --git a/live/src/main/res/drawable/bg_war_order.xml b/live/src/main/res/drawable/bg_war_order.xml
new file mode 100644
index 000000000..0a22f7545
--- /dev/null
+++ b/live/src/main/res/drawable/bg_war_order.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/main/src/main/java/com/yunbao/main/activity/MainActivity.java b/main/src/main/java/com/yunbao/main/activity/MainActivity.java
index 032e75500..d4853a951 100644
--- a/main/src/main/java/com/yunbao/main/activity/MainActivity.java
+++ b/main/src/main/java/com/yunbao/main/activity/MainActivity.java
@@ -189,6 +189,8 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
private boolean isfloatBannernet = true, isFirst = true;
private View floatRedPacket;
+
+ private View floatWarOrder;
private List startListNotifyList = new ArrayList<>();
@@ -244,7 +246,9 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
v_table_redpoint = findViewById(R.id.v_table_redpoint);
v_table_redpoint_me = (View) findViewById(R.id.v_table_redpoint_me);
floatRedPacket = findViewById(R.id.red_packet);
+ floatWarOrder = findViewById(R.id.war_order);
initRedPacket();
+ initWarOrder();
Display mDisplay = getWindowManager().getDefaultDisplay();
Height = mDisplay.getHeight();
@@ -329,25 +333,25 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
case 0:
//点击埋点
MobclickAgent.onEvent(mContext, "home_page", "首页");
- if(mMainHomeCommunityViewHolder!=null) {
+ if (mMainHomeCommunityViewHolder != null) {
mMainHomeCommunityViewHolder.onPauseVideo();
}
break;
case 1:
MobclickAgent.onEvent(mContext, "community", "社区");
- if(mMainHomeCommunityViewHolder!=null) {
+ if (mMainHomeCommunityViewHolder != null) {
mMainHomeCommunityViewHolder.onResumePlay();
}
break;
case 2:
MobclickAgent.onEvent(mContext, "information", "消息");
- if(mMainHomeCommunityViewHolder!=null) {
+ if (mMainHomeCommunityViewHolder != null) {
mMainHomeCommunityViewHolder.onPauseVideo();
}
break;
case 3:
MobclickAgent.onEvent(mContext, "my", "我的");
- if(mMainHomeCommunityViewHolder!=null) {
+ if (mMainHomeCommunityViewHolder != null) {
mMainHomeCommunityViewHolder.onPauseVideo();
}
break;
@@ -513,12 +517,14 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
} else if (index == 2) {
floatBanner.setVisibility(View.GONE);
floatRedPacket.setVisibility(View.GONE);
+ floatWarOrder.setVisibility(View.GONE);
findViewById(R.id.banner_click).setVisibility(View.GONE);
isfloatBannernet = false;
if (mainMessageViewHolder != null) mainMessageViewHolder.onResume();
} else {
floatBanner.setVisibility(View.GONE);
floatRedPacket.setVisibility(View.GONE);
+ floatWarOrder.setVisibility(View.GONE);
findViewById(R.id.banner_click).setVisibility(View.GONE);
isfloatBannernet = false;
}
@@ -528,6 +534,20 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
checkVersion();
}
+ /**
+ * 展示战令
+ */
+ private void initWarOrder() {
+ if (floatWarOrder != null) {
+ floatWarOrder.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ RouteUtil.forwardBattlePass();
+ }
+ });
+ }
+ }
+
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
@@ -594,6 +614,9 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
@Override
public void onSuccess(AnchorRecommendModel data) {
if (isFinishing()) return;
+ if (data.getShowWarOrder() == 0) {
+ floatWarOrder.setVisibility(View.GONE);
+ }
if (data.getListShow() == 1 && data.getList().size() > 2) {
floatBanner.setVisibility(View.VISIBLE);
findViewById(R.id.banner_click).setVisibility(View.VISIBLE);
@@ -610,8 +633,6 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
((ProgressBar) floatRedPacket.findViewById(R.id.progress)).setProgress(data.getRedPacketNum());
((TextView) floatRedPacket.findViewById(R.id.progressText)).setText(data.getRedPacketNum() + "/" + data.getRedPacketTotal());
}
-
-
}
@Override
diff --git a/main/src/main/res/layout/view_float_war_order.xml b/main/src/main/res/layout/view_float_war_order.xml
new file mode 100644
index 000000000..27043564e
--- /dev/null
+++ b/main/src/main/res/layout/view_float_war_order.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/main/src/main/res/layout/view_homemain.xml b/main/src/main/res/layout/view_homemain.xml
index 981e0b6f7..8554ee2ef 100644
--- a/main/src/main/res/layout/view_homemain.xml
+++ b/main/src/main/res/layout/view_homemain.xml
@@ -179,6 +179,17 @@
android:layout_above="@id/rt_main_tab"
android:layout_alignParentRight="true"
android:layout_marginRight="12dp"
+ android:visibility="gone"
+ android:layout_marginBottom="10dp" />
+
+