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
b29a856a
Commit
b29a856a
authored
Jan 20, 2021
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
3d682bf3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
59 additions
and
18 deletions
+59
-18
AwardPresenter.java
...va/com/mints/goodmoney/mvp/presenters/AwardPresenter.java
+38
-5
MyPresenter.kt
...in/java/com/mints/goodmoney/mvp/presenters/MyPresenter.kt
+0
-1
AwardActivity.kt
...in/java/com/mints/goodmoney/ui/activitys/AwardActivity.kt
+19
-11
activity_award.xml
GoodMoney/app/src/main/res/layout/activity_award.xml
+2
-1
No files found.
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/presenters/AwardPresenter.java
View file @
b29a856a
...
@@ -58,12 +58,12 @@ public class AwardPresenter extends BasePresenter<AwardView> {
...
@@ -58,12 +58,12 @@ public class AwardPresenter extends BasePresenter<AwardView> {
riskFlag
=
data
.
get
(
"riskinfoRate"
).
getAsBoolean
();
riskFlag
=
data
.
get
(
"riskinfoRate"
).
getAsBoolean
();
}
}
boolean
hideSomeodular
=
false
;
boolean
showHigh
=
false
;
JsonElement
hideSomeodularElement
=
data
.
get
(
"hideSomeodular
"
);
JsonElement
showHighElement
=
data
.
get
(
"showHigh
"
);
if
(
hideSomeodular
Element
!=
null
)
{
if
(
showHigh
Element
!=
null
)
{
hideSomeodular
=
data
.
get
(
"hideSomeodular
"
).
getAsBoolean
();
showHigh
=
data
.
get
(
"showHigh
"
).
getAsBoolean
();
}
}
view
.
getUserTaskMsgSuc
(
data
.
get
(
"coin"
).
getAsInt
(),
riskFlag
,
hideSomeodular
);
view
.
getUserTaskMsgSuc
(
data
.
get
(
"coin"
).
getAsInt
(),
riskFlag
,
showHigh
);
}
}
break
;
break
;
default
:
default
:
...
@@ -160,6 +160,39 @@ public class AwardPresenter extends BasePresenter<AwardView> {
...
@@ -160,6 +160,39 @@ public class AwardPresenter extends BasePresenter<AwardView> {
});
});
}
}
/**
* 设置高额任务状态
* <p>
* value
*/
public
void
setHighTaskType
(
String
value
)
{
HashMap
<
String
,
Object
>
vo
=
new
HashMap
<>();
vo
.
put
(
"carrierType"
,
Constant
.
CARRIER_HIGH_ACTIVITY
);
vo
.
put
(
"value"
,
value
);
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
setStatusInOneDayByCarrierType
(
vo
),
new
BaseSubscriber
<
BaseResponse
<
Object
>>()
{
@Override
public
void
onError
(
Throwable
e
)
{
}
@Override
public
void
onCompleted
()
{
super
.
onCompleted
();
}
@Override
public
void
onNext
(
BaseResponse
<
Object
>
objectBaseResponse
)
{
if
(
isLinkView
())
return
;
switch
(
objectBaseResponse
.
getStatus
())
{
// if (!TextUtils.equals(value, "3")) {
//// getAutoUserHallBaseMsg()
// }
}
}
});
}
public
void
riskinfo
()
{
public
void
riskinfo
()
{
DeviceInfo
deviceInfo
=
DeviceInfo
.
Companion
.
getInstance
();
DeviceInfo
deviceInfo
=
DeviceInfo
.
Companion
.
getInstance
();
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/presenters/MyPresenter.kt
View file @
b29a856a
...
@@ -275,7 +275,6 @@ open class MyPresenter : BasePresenter<MyView>() {
...
@@ -275,7 +275,6 @@ open class MyPresenter : BasePresenter<MyView>() {
})
})
}
}
fun
getHallBaseMsg
()
{
fun
getHallBaseMsg
()
{
AppHttpManager
.
getInstance
(
loanApplication
)
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
hallBaseMsg
,
.
call
(
loanService
.
hallBaseMsg
,
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/AwardActivity.kt
View file @
b29a856a
...
@@ -25,10 +25,7 @@ import com.mints.goodmoney.service.AppInstallService
...
@@ -25,10 +25,7 @@ import com.mints.goodmoney.service.AppInstallService
import
com.mints.goodmoney.ui.activitys.base.BaseActivity
import
com.mints.goodmoney.ui.activitys.base.BaseActivity
import
com.mints.goodmoney.ui.widgets.countdowntimer.CountDownTimerSupport
import
com.mints.goodmoney.ui.widgets.countdowntimer.CountDownTimerSupport
import
com.mints.goodmoney.ui.widgets.countdowntimer.OnCountDownTimerListener
import
com.mints.goodmoney.ui.widgets.countdowntimer.OnCountDownTimerListener
import
com.mints.goodmoney.utils.AppUtil
import
com.mints.goodmoney.utils.*
import
com.mints.goodmoney.utils.SoundPoolUtil
import
com.mints.goodmoney.utils.SpanUtils
import
com.mints.goodmoney.utils.Utils
import
com.mints.goodmoney.utils.rxutil.CommonRxTask
import
com.mints.goodmoney.utils.rxutil.CommonRxTask
import
com.mints.goodmoney.utils.rxutil.RxjavaUtil
import
com.mints.goodmoney.utils.rxutil.RxjavaUtil
import
com.umeng.analytics.MobclickAgent
import
com.umeng.analytics.MobclickAgent
...
@@ -412,6 +409,8 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
...
@@ -412,6 +409,8 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
1
->
{
1
->
{
if
(
mCurrentPkg
==
null
)
{
if
(
mCurrentPkg
==
null
)
{
showToast
(
"任务异常,请重试~"
)
showToast
(
"任务异常,请重试~"
)
awardPresenter
.
setHighTaskType
(
"0"
)
}
else
{
}
else
{
if
(
AppUtil
.
checkPackInfo
(
mContext
,
mCurrentPkg
!!
))
{
if
(
AppUtil
.
checkPackInfo
(
mContext
,
mCurrentPkg
!!
))
{
AppTryPlayManager
.
toTryPlay
(
mCurrentPkg
!!
)
AppTryPlayManager
.
toTryPlay
(
mCurrentPkg
!!
)
...
@@ -424,6 +423,7 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
...
@@ -424,6 +423,7 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
2
->
{
2
->
{
if
(
mCurrentPkg
==
null
)
{
if
(
mCurrentPkg
==
null
)
{
showToast
(
"任务异常,请重试~"
)
showToast
(
"任务异常,请重试~"
)
awardPresenter
.
setHighTaskType
(
"0"
)
}
else
{
}
else
{
if
(
AppUtil
.
checkPackInfo
(
mContext
,
mCurrentPkg
!!
))
{
if
(
AppUtil
.
checkPackInfo
(
mContext
,
mCurrentPkg
!!
))
{
AppTryPlayManager
.
toTryPlay
(
mCurrentPkg
!!
)
AppTryPlayManager
.
toTryPlay
(
mCurrentPkg
!!
)
...
@@ -434,9 +434,9 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
...
@@ -434,9 +434,9 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
}
}
// 试玩完成,领取奖励
// 试玩完成,领取奖励
3
->
{
3
->
{
//
val vo = HashMap<String, Any>()
val
vo
=
HashMap
<
String
,
Any
>()
// vo["carrierType"] = Constant.CHALLENGE_SHAREFRIEND
vo
[
"carrierType"
]
=
Constant
.
CARRIER_HIGH_ACTIVITY
//
awardPresenter.reportAddCoinMsg(vo)
awardPresenter
.
reportAddCoinMsg
(
vo
)
readyGoThenKill
(
DrawcashActivity
::
class
.
java
)
readyGoThenKill
(
DrawcashActivity
::
class
.
java
)
}
}
...
@@ -551,12 +551,14 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
...
@@ -551,12 +551,14 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
mTimer
?.
start
()
mTimer
?.
start
()
}
}
override
fun
getUserTaskMsgSuc
(
coin
:
Int
,
riskFlag
:
Boolean
,
hideSomeodular
:
Boolean
)
{
override
fun
getUserTaskMsgSuc
(
coin
:
Int
,
riskFlag
:
Boolean
,
showHigh
:
Boolean
)
{
if
(
carrierType
==
Constant
.
CARRIER_CHALLENGE_TURN
||
// 大转盘
if
(
carrierType
==
Constant
.
CARRIER_CHALLENGE_TURN
||
// 大转盘
carrierType
==
Constant
.
CARRIER_BLESSINGBAG
||
// 首页福袋
carrierType
==
Constant
.
CARRIER_BLESSINGBAG_DOUBLE
||
// 首页福袋
carrierType
==
Constant
.
CARRIER_HOMEVEDIO
||
// 首页红包
carrierType
==
Constant
.
CARRIER_SMALLHOMEVEDIO
||
// 短视频红包
carrierType
==
Constant
.
CARRIER_SMALLHOMEVEDIO
||
// 短视频红包
carrierType
==
Constant
.
CARRIER_HOMEVEDIO
)
{
// 小视频红包
carrierType
==
Constant
.
CARRIER_SMALLHOMEVEDIO_DOUBLE
||
// 短视频红包翻倍
isSuperTask
=
hideSomeodular
carrierType
==
Constant
.
CARRIER_HOMEVEDIO_DOUBLE
)
{
// 小视频红包翻倍
isSuperTask
=
true
if
(
isSuperTask
)
{
if
(
isSuperTask
)
{
refreshHighTask
()
refreshHighTask
()
}
}
...
@@ -619,6 +621,8 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
...
@@ -619,6 +621,8 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
// 用户点击激励视频但并未下载安装
// 用户点击激励视频但并未下载安装
if
((
mReceiverBroadcastReceiver
!=
null
&&
superTaskStatus
==
0
)
||
if
((
mReceiverBroadcastReceiver
!=
null
&&
superTaskStatus
==
0
)
||
(
mReceiverBroadcastReceiver
==
null
&&
superTaskStatus
==
4
))
{
(
mReceiverBroadcastReceiver
==
null
&&
superTaskStatus
==
4
))
{
awardPresenter
.
setHighTaskType
(
"0"
)
tvAwardHighContent
.
visibility
=
View
.
VISIBLE
tvAwardHighContent
.
visibility
=
View
.
VISIBLE
tvAwardHighInfo
.
visibility
=
View
.
GONE
tvAwardHighInfo
.
visibility
=
View
.
GONE
tvAwardHighInfo2
.
visibility
=
View
.
GONE
tvAwardHighInfo2
.
visibility
=
View
.
GONE
...
@@ -654,6 +658,8 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
...
@@ -654,6 +658,8 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
// 用户开启
// 用户开启
if
(
AppTryPlayManager
.
getTryPlayIsOK
(
mCurrentPkg
!!
,
5
))
{
if
(
AppTryPlayManager
.
getTryPlayIsOK
(
mCurrentPkg
!!
,
5
))
{
awardPresenter
.
setHighTaskType
(
"1"
)
tvAwardHighContent
.
visibility
=
View
.
VISIBLE
tvAwardHighContent
.
visibility
=
View
.
VISIBLE
tvAwardHighInfo
.
visibility
=
View
.
VISIBLE
tvAwardHighInfo
.
visibility
=
View
.
VISIBLE
tvAwardHigh
.
visibility
=
View
.
VISIBLE
tvAwardHigh
.
visibility
=
View
.
VISIBLE
...
@@ -696,6 +702,8 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
...
@@ -696,6 +702,8 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
val
pkg
=
intent
.
getStringExtra
(
"pkg"
)
val
pkg
=
intent
.
getStringExtra
(
"pkg"
)
mCurrentPkg
=
pkg
mCurrentPkg
=
pkg
awardPresenter
.
setHighTaskType
(
"3"
)
}
catch
(
e
:
Exception
)
{
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
e
.
printStackTrace
()
}
}
...
...
GoodMoney/app/src/main/res/layout/activity_award.xml
View file @
b29a856a
...
@@ -105,12 +105,13 @@
...
@@ -105,12 +105,13 @@
<TextView
<TextView
android:id=
"@+id/tvAwardHigh"
android:id=
"@+id/tvAwardHigh"
android:layout_width=
"
160dp
"
android:layout_width=
"
wrap_content
"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:layout_gravity=
"center_horizontal"
android:background=
"@drawable/shape_btn_gold_right"
android:background=
"@drawable/shape_btn_gold_right"
android:drawablePadding=
"4dp"
android:drawablePadding=
"4dp"
android:paddingStart=
"20dp"
android:paddingStart=
"20dp"
android:paddingEnd=
"20dp"
android:paddingTop=
"10dp"
android:paddingTop=
"10dp"
android:paddingBottom=
"10dp"
android:paddingBottom=
"10dp"
android:text=
"超级加倍领取"
android:text=
"超级加倍领取"
...
...
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