Commit b0978b62 authored by jyx's avatar jyx

超级加倍领取配置试玩时间

parent 6f5a8fbb
......@@ -63,7 +63,12 @@ public class AwardPresenter extends BasePresenter<AwardView> {
if (showHighElement != null) {
showHigh = data.get("showHigh").getAsBoolean();
}
view.getUserTaskMsgSuc(data.get("coin").getAsInt(), riskFlag, showHigh);
int highCoin = 3000;
JsonElement highCoinElement = data.get("highCoin");
if (highCoinElement != null) {
highCoin = data.get("highCoin").getAsInt();
}
view.getUserTaskMsgSuc(data.get("coin").getAsInt(), riskFlag, showHigh, highCoin);
}
break;
default:
......
......@@ -5,5 +5,5 @@ interface AwardView : BaseView {
/**
* 获取用户配置信息成功
*/
fun getUserTaskMsgSuc(coin: Int, riskFlag: Boolean, hideSomeodular: Boolean)
fun getUserTaskMsgSuc(coin: Int, riskFlag: Boolean, showHigh: Boolean, highCoin: Int)
}
\ No newline at end of file
......@@ -358,6 +358,8 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
override fun onDestroy() {
super.onDestroy()
awardPresenter.setHighTaskType("0")
mTimer?.stop()
mTimer = null
......@@ -551,16 +553,16 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
mTimer?.start()
}
override fun getUserTaskMsgSuc(coin: Int, riskFlag: Boolean, showHigh: Boolean) {
override fun getUserTaskMsgSuc(coin: Int, riskFlag: Boolean, showHigh: Boolean, highCoin: Int) {
if (carrierType == Constant.CARRIER_CHALLENGE_TURN || // 大转盘
carrierType == Constant.CARRIER_BLESSINGBAG_DOUBLE || // 首页福袋
carrierType == Constant.CARRIER_BLESSINGBAG || // 首页福袋
carrierType == Constant.CARRIER_HOMEVEDIO || // 首页红包
carrierType == Constant.CARRIER_SMALLHOMEVEDIO || // 短视频红包
carrierType == Constant.CARRIER_BLESSINGBAG_DOUBLE || // 首页福袋翻倍
carrierType == Constant.CARRIER_SMALLHOMEVEDIO_DOUBLE || // 短视频红包翻倍
carrierType == Constant.CARRIER_HOMEVEDIO_DOUBLE) { // 小视频红包翻倍
isSuperTask = true
if (isSuperTask) {
refreshHighTask()
refreshHighTask(highCoin)
}
}
......@@ -616,12 +618,11 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
/**
* 刷新高额任务
*/
private fun refreshHighTask() {
private fun refreshHighTask(highCoin: Int) {
if (mCurrentPkg == null) {
// 用户点击激励视频但并未下载安装
if ((mReceiverBroadcastReceiver != null && superTaskStatus == 0) ||
(mReceiverBroadcastReceiver == null && superTaskStatus == 4)) {
awardPresenter.setHighTaskType("0")
tvAwardHighContent.visibility = View.VISIBLE
tvAwardHighInfo.visibility = View.GONE
......@@ -635,8 +636,8 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
tvAwardHigh.visibility = View.VISIBLE
tvAwardHighInfo2.visibility = View.VISIBLE
tvAwardHighContent.text = "超级加倍即可领取3000金币,3000金币=0.3元,可立即到账"
tvAwardHighInfo.text = "下载安装打开领取3000金币"
tvAwardHighContent.text = "超级加倍即可领取" + highCoin + "金币," + highCoin + "金币=" + ToolUtil.formatNumCNY(highCoin) + "元,可立即到账"
tvAwardHighInfo.text = "下载安装打开领取" + highCoin + "金币"
tvAwardHighInfo2.text = "获得少量金币"
tvAwardHigh.text = "超级加倍领取"
}
......@@ -648,11 +649,11 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
tvAwardHighInfo.visibility = View.VISIBLE
tvAwardHigh.visibility = View.VISIBLE
tvAwardContent.text = "超级加倍 领取3000金币"
tvAwardHighContent.text = "打开APP,试玩5秒钟,提现0.3元,可立即到账"
tvAwardContent.text = "超级加倍 领取" + highCoin + "金币"
tvAwardHighContent.text = "打开APP,试玩30秒钟,提现" + ToolUtil.formatNumCNY(highCoin) + "元,可立即到账"
tvAwardHighInfo.visibility = View.GONE
tvAwardHighInfo2.visibility = View.GONE
tvAwardHigh.text = "打开APP领取3000金币"
tvAwardHigh.text = "打开APP领取" + highCoin + "金币"
return
}
......@@ -665,19 +666,19 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
tvAwardHigh.visibility = View.VISIBLE
superTaskStatus = 3
tvAwardContent.text = "超级加倍 领取3000金币"
tvAwardHighContent.text = "超级加倍即可领取3000金币,3000金币=0.3元,可立即到账"
tvAwardContent.text = "超级加倍 领取" + highCoin + "金币"
tvAwardHighContent.text = "超级加倍即可领取" + highCoin + "金币," + highCoin + "金币=" + ToolUtil.formatNumCNY(highCoin) + "元,可立即到账"
tvAwardHighInfo.visibility = View.GONE
tvAwardHighInfo2.visibility = View.GONE
tvAwardHigh.text = "领取3000金币提现0.3元"
tvAwardHigh.text = "领取" + highCoin + "金币提现" + ToolUtil.formatNumCNY(highCoin) + "元"
} else {
tvAwardHighContent.visibility = View.VISIBLE
tvAwardHighInfo.visibility = View.VISIBLE
tvAwardHigh.visibility = View.VISIBLE
superTaskStatus = 2
tvAwardContent.text = "超级加倍 领取3000金币"
tvAwardHighContent.text = "打开APP,试玩5秒钟,提现0.3元,可立即到账"
tvAwardContent.text = "超级加倍 领取" + highCoin + "金币"
tvAwardHighContent.text = "打开APP,试玩30秒钟,提现" + ToolUtil.formatNumCNY(highCoin) + "元,可立即到账"
tvAwardHighInfo.visibility = View.GONE
tvAwardHighInfo2.visibility = View.GONE
tvAwardHigh.text = "时间不足,打开继续体验"
......
......@@ -172,6 +172,10 @@ public class ToolUtil {
return -2;
}
public static float formatNumCNY(int num) {
return ((float) num) / 1000f;
}
/**
* <pre>
* 数字格式化显示
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment