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
5db1a1dc
Commit
5db1a1dc
authored
Nov 02, 2020
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加掌阅
parent
d1d60c39
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
23 additions
and
24 deletions
+23
-24
Constant.kt
.../app/src/main/java/com/mints/goodmoney/common/Constant.kt
+1
-0
BookPresenter.kt
.../java/com/mints/goodmoney/mvp/presenters/BookPresenter.kt
+9
-17
LoanService.java
...pp/src/main/java/com/mints/goodmoney/net/LoanService.java
+1
-1
AwardActivity.kt
...in/java/com/mints/goodmoney/ui/activitys/AwardActivity.kt
+3
-0
ZhangyueFragment.kt
.../java/com/mints/goodmoney/ui/fragment/ZhangyueFragment.kt
+1
-0
PowerDialog.kt
...c/main/java/com/mints/goodmoney/ui/widgets/PowerDialog.kt
+4
-4
dialog_power.xml
GoodMoney/app/src/main/res/layout/dialog_power.xml
+4
-2
No files found.
GoodMoney/app/src/main/java/com/mints/goodmoney/common/Constant.kt
View file @
5db1a1dc
...
@@ -92,6 +92,7 @@ object Constant {
...
@@ -92,6 +92,7 @@ object Constant {
const
val
CARRIER_WALK_BUBBLE
=
"WALK_BUBBLE"
//走路汽泡
const
val
CARRIER_WALK_BUBBLE
=
"WALK_BUBBLE"
//走路汽泡
const
val
CARRIER_NEW_USER
=
"CARRIER_NEW_USER"
//新用户红包
const
val
CARRIER_NEW_USER
=
"CARRIER_NEW_USER"
//新用户红包
const
val
CARRIER_GAME_ONLINE
=
"GAME_ONLINE"
//跳转猎豹
const
val
CARRIER_GAME_ONLINE
=
"GAME_ONLINE"
//跳转猎豹
const
val
CARRIER_ZHANGYUE
=
"ZHANGYUE"
//跳转猎豹
const
val
CARRIER_CHALLENGE_SHAREFRIEND_DOUBLE
=
"CHALLENGE_SHAREFRIEND_DOUBLE"
//邀请好友翻倍
const
val
CARRIER_CHALLENGE_SHAREFRIEND_DOUBLE
=
"CHALLENGE_SHAREFRIEND_DOUBLE"
//邀请好友翻倍
const
val
SHAREFRIEND_COMPLETE_1
=
"SHAREFRIEND_COMPLETE_1"
//邀请任务1
const
val
SHAREFRIEND_COMPLETE_1
=
"SHAREFRIEND_COMPLETE_1"
//邀请任务1
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/presenters/BookPresenter.kt
View file @
5db1a1dc
package
com.mints.goodmoney.mvp.presenters
package
com.mints.goodmoney.mvp.presenters
import
com.mints.goodmoney.MintsApplication
import
com.google.gson.JsonObject
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.common.DeviceInfo
import
com.mints.goodmoney.manager.AppHttpManager
import
com.mints.goodmoney.manager.AppHttpManager
import
com.mints.goodmoney.manager.ShumeiManager
import
com.mints.goodmoney.manager.UserManager
import
com.mints.goodmoney.mvp.model.BaseResponse
import
com.mints.goodmoney.mvp.model.BaseResponse
import
com.mints.goodmoney.mvp.model.MainVedioMsgBean
import
com.mints.goodmoney.mvp.model.UserBean
import
com.mints.goodmoney.mvp.model.UserTaskMsgBean
import
com.mints.goodmoney.mvp.views.BookView
import
com.mints.goodmoney.mvp.views.BookView
import
com.mints.goodmoney.mvp.views.HomeView
import
com.mints.goodmoney.utils.DeviceUuidFactory
import
com.mints.library.net.neterror.BaseSubscriber
import
com.mints.library.net.neterror.BaseSubscriber
import
com.mints.library.net.neterror.Throwable
import
com.mints.library.net.neterror.Throwable
import
net.grandcentrix.tray.AppPreferences
import
java.util.*
import
java.util.*
class
BookPresenter
:
BasePresenter
<
BookView
>()
{
class
BookPresenter
:
BasePresenter
<
BookView
>()
{
...
@@ -25,22 +15,24 @@ class BookPresenter : BasePresenter<BookView>() {
...
@@ -25,22 +15,24 @@ class BookPresenter : BasePresenter<BookView>() {
vo
[
"seconds"
]
=
seconds
vo
[
"seconds"
]
=
seconds
AppHttpManager
.
getInstance
(
loanApplication
)
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
addReadSeconds
(
vo
),
.
call
(
loanService
.
addReadSeconds
(
vo
),
object
:
BaseSubscriber
<
BaseResponse
<
UserBean
>>()
{
object
:
BaseSubscriber
<
BaseResponse
<
JsonObject
>>()
{
override
fun
onCompleted
()
{
override
fun
onCompleted
()
{
}
}
override
fun
onError
(
e
:
Throwable
)
{
override
fun
onError
(
e
:
Throwable
)
{
}
}
override
fun
onNext
(
baseResponse
:
BaseResponse
<
UserBean
>)
{
override
fun
onNext
(
baseResponse
:
BaseResponse
<
JsonObject
>)
{
val
code
=
baseResponse
.
getStatus
()
val
code
=
baseResponse
.
getStatus
()
val
message
=
baseResponse
.
getMessage
()
val
data
=
baseResponse
.
data
val
data
:
UserBean
?
=
baseResponse
.
getData
()
when
(
code
)
{
when
(
code
)
{
200
->
{
200
->
{
view
.
readSecondsSuc
(
12
)
if
(
data
!=
null
)
{
val
coin
=
data
[
"coin"
].
asInt
view
.
readSecondsSuc
(
coin
)
}
}
}
else
->
view
.
showToast
(
message
)
else
->
view
.
showToast
(
baseResponse
.
getMessage
()
)
}
}
}
}
})
})
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/net/LoanService.java
View file @
5db1a1dc
...
@@ -326,7 +326,7 @@ public interface LoanService {
...
@@ -326,7 +326,7 @@ public interface LoanService {
* @return
* @return
*/
*/
@POST
(
"api/addReadSeconds"
)
@POST
(
"api/addReadSeconds"
)
Observable
<
BaseResponse
<
Object
>>
addReadSeconds
(
@Body
Map
<
String
,
Object
>
vo
);
Observable
<
BaseResponse
<
Json
Object
>>
addReadSeconds
(
@Body
Map
<
String
,
Object
>
vo
);
/**
/**
* 默认http工厂
* 默认http工厂
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/AwardActivity.kt
View file @
5db1a1dc
...
@@ -98,6 +98,9 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
...
@@ -98,6 +98,9 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
Constant
.
CARRIER_OFFLINE_DOUBLE
->
{
Constant
.
CARRIER_OFFLINE_DOUBLE
->
{
tvAwardContent
.
setText
(
"离线收益奖励"
+
curCoin
+
"金币"
)
tvAwardContent
.
setText
(
"离线收益奖励"
+
curCoin
+
"金币"
)
}
}
Constant
.
CARRIER_ZHANGYUE
->
{
tvAwardContent
.
setText
(
"阅读奖励"
+
curCoin
+
"金币"
)
}
Constant
.
CARRIER_SIGNIN_HOMEPAGE_AWARD
->
{
Constant
.
CARRIER_SIGNIN_HOMEPAGE_AWARD
->
{
tvAwardContent
.
setText
(
"签到奖励"
+
curCoin
+
"金币"
)
tvAwardContent
.
setText
(
"签到奖励"
+
curCoin
+
"金币"
)
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/ZhangyueFragment.kt
View file @
5db1a1dc
...
@@ -73,6 +73,7 @@ class ZhangyueFragment : LazyLoadBaseFragment(), BookView, IreaderApi.OnReadChan
...
@@ -73,6 +73,7 @@ class ZhangyueFragment : LazyLoadBaseFragment(), BookView, IreaderApi.OnReadChan
override
fun
readSecondsSuc
(
coin
:
Int
)
{
override
fun
readSecondsSuc
(
coin
:
Int
)
{
if
(
coin
>
0
)
{
if
(
coin
>
0
)
{
val
bundle
=
Bundle
()
val
bundle
=
Bundle
()
bundle
.
putString
(
Constant
.
MAIN_CARRIER_TYPE
,
Constant
.
CARRIER_ZHANGYUE
)
bundle
.
putInt
(
Constant
.
MAIN_CUR_COIN
,
coin
)
bundle
.
putInt
(
Constant
.
MAIN_CUR_COIN
,
coin
)
readyGo
(
AwardActivity
::
class
.
java
,
bundle
)
readyGo
(
AwardActivity
::
class
.
java
,
bundle
)
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/widgets/PowerDialog.kt
View file @
5db1a1dc
...
@@ -18,8 +18,8 @@ class PowerDialog(context: Context, private val listener: DialogListener) :
...
@@ -18,8 +18,8 @@ class PowerDialog(context: Context, private val listener: DialogListener) :
private
val
lp
:
WindowManager
.
LayoutParams
private
val
lp
:
WindowManager
.
LayoutParams
private
val
tv_dialogper_agreement
:
TextView
private
val
tv_dialogper_agreement
:
TextView
private
val
tv_dialogper_policy
:
TextView
private
val
tv_dialogper_policy
:
TextView
private
val
btn_dialogper_back
:
AppCompatButton
private
val
btn_dialogper_back
:
TextView
private
val
btn_dialogper_next
:
AppCompatButton
private
val
btn_dialogper_next
:
TextView
init
{
init
{
setContentView
(
R
.
layout
.
dialog_power
)
setContentView
(
R
.
layout
.
dialog_power
)
...
@@ -45,9 +45,9 @@ class PowerDialog(context: Context, private val listener: DialogListener) :
...
@@ -45,9 +45,9 @@ class PowerDialog(context: Context, private val listener: DialogListener) :
tv_dialogper_policy
=
tv_dialogper_policy
=
findViewById
<
View
>(
R
.
id
.
tv_dialogper_policy
)
as
TextView
findViewById
<
View
>(
R
.
id
.
tv_dialogper_policy
)
as
TextView
btn_dialogper_back
=
btn_dialogper_back
=
findViewById
<
View
>(
R
.
id
.
btn_dialogper_back
)
as
AppCompatButton
findViewById
<
View
>(
R
.
id
.
btn_dialogper_back
)
as
TextView
btn_dialogper_next
=
btn_dialogper_next
=
findViewById
<
View
>(
R
.
id
.
btn_dialogper_next
)
as
AppCompatButton
findViewById
<
View
>(
R
.
id
.
btn_dialogper_next
)
as
TextView
tv_dialogper_policy
.
setOnClickListener
(
listener
)
tv_dialogper_policy
.
setOnClickListener
(
listener
)
tv_dialogper_agreement
.
setOnClickListener
(
listener
)
tv_dialogper_agreement
.
setOnClickListener
(
listener
)
btn_dialogper_back
.
setOnClickListener
(
listener
)
btn_dialogper_back
.
setOnClickListener
(
listener
)
...
...
GoodMoney/app/src/main/res/layout/dialog_power.xml
View file @
5db1a1dc
...
@@ -177,13 +177,14 @@
...
@@ -177,13 +177,14 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
>
<
androidx.appcompat.widget.AppCompatButton
<
TextView
android:id=
"@+id/btn_dialogper_back"
android:id=
"@+id/btn_dialogper_back"
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"36dp"
android:layout_height=
"36dp"
android:layout_gravity=
"center_horizontal"
android:layout_gravity=
"center_horizontal"
android:layout_marginLeft=
"20dp"
android:layout_marginLeft=
"20dp"
android:layout_marginTop=
"10dp"
android:layout_marginTop=
"10dp"
android:gravity=
"center"
android:layout_marginRight=
"20dp"
android:layout_marginRight=
"20dp"
android:layout_marginBottom=
"10dp"
android:layout_marginBottom=
"10dp"
android:layout_weight=
"1"
android:layout_weight=
"1"
...
@@ -191,13 +192,14 @@
...
@@ -191,13 +192,14 @@
android:text=
"不同意"
android:text=
"不同意"
android:textColor=
"@color/white"
/>
android:textColor=
"@color/white"
/>
<
androidx.appcompat.widget.AppCompatButton
<
TextView
android:id=
"@+id/btn_dialogper_next"
android:id=
"@+id/btn_dialogper_next"
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"36dp"
android:layout_height=
"36dp"
android:layout_gravity=
"center_horizontal"
android:layout_gravity=
"center_horizontal"
android:layout_marginLeft=
"20dp"
android:layout_marginLeft=
"20dp"
android:layout_marginTop=
"10dp"
android:layout_marginTop=
"10dp"
android:gravity=
"center"
android:layout_marginRight=
"20dp"
android:layout_marginRight=
"20dp"
android:layout_marginBottom=
"10dp"
android:layout_marginBottom=
"10dp"
android:layout_weight=
"1"
android:layout_weight=
"1"
...
...
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