Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_goodmoney
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
android
android_goodmoney
Commits
b0978b62
Commit
b0978b62
authored
Jan 20, 2021
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
超级加倍领取配置试玩时间
parent
6f5a8fbb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
18 deletions
+28
-18
AwardPresenter.java
...va/com/mints/goodmoney/mvp/presenters/AwardPresenter.java
+6
-1
AwardView.kt
.../src/main/java/com/mints/goodmoney/mvp/views/AwardView.kt
+1
-1
AwardActivity.kt
...in/java/com/mints/goodmoney/ui/activitys/AwardActivity.kt
+17
-16
ToolUtil.java
...app/src/main/java/com/mints/goodmoney/utils/ToolUtil.java
+4
-0
No files found.
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/presenters/AwardPresenter.java
View file @
b0978b62
...
...
@@ -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
:
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/views/AwardView.kt
View file @
b0978b62
...
...
@@ -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
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/AwardActivity.kt
View file @
b0978b62
...
...
@@ -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
=
"时间不足,打开继续体验"
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/utils/ToolUtil.java
View file @
b0978b62
...
...
@@ -172,6 +172,10 @@ public class ToolUtil {
return
-
2
;
}
public
static
float
formatNumCNY
(
int
num
)
{
return
((
float
)
num
)
/
1000
f
;
}
/**
* <pre>
* 数字格式化显示
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment