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
42806dbc
Commit
42806dbc
authored
Oct 16, 2020
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
邀请好友任务,排行榜金币添加
parent
5b700b08
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
72 additions
and
69 deletions
+72
-69
Constant.kt
.../app/src/main/java/com/mints/goodmoney/common/Constant.kt
+8
-0
FriendsTaskBean.java
...n/java/com/mints/goodmoney/mvp/model/FriendsTaskBean.java
+27
-35
MyPresenter.kt
...in/java/com/mints/goodmoney/mvp/presenters/MyPresenter.kt
+8
-10
InvitedAdapter.kt
...ain/java/com/mints/goodmoney/ui/adapter/InvitedAdapter.kt
+1
-1
FriendsFragment.kt
...n/java/com/mints/goodmoney/ui/fragment/FriendsFragment.kt
+21
-12
MyFragment.kt
...c/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
+6
-10
SignView.java
...rc/main/java/com/mints/goodmoney/ui/widgets/SignView.java
+1
-1
No files found.
GoodMoney/app/src/main/java/com/mints/goodmoney/common/Constant.kt
View file @
42806dbc
...
...
@@ -98,6 +98,14 @@ object Constant {
const
val
CARRIER_NEW_USER
=
"CARRIER_NEW_USER"
//新用户红包
const
val
CARRIER_FRIENDS
=
"CARRIER_FRIENDS"
//邀请好友
const
val
SHAREFRIEND_COMPLETE_1
=
"SHAREFRIEND_COMPLETE_1"
//邀请任务1
const
val
SHAREFRIEND_COMPLETE_2
=
"SHAREFRIEND_COMPLETE_2"
//邀请任务2
const
val
SHAREFRIEND_COMPLETE_3
=
"SHAREFRIEND_COMPLETE_3"
//邀请任务3
const
val
SHAREFRIEND_COMPLETE_4
=
"SHAREFRIEND_COMPLETE_4"
//邀请任务4
const
val
SHAREFRIEND_COMPLETE_5
=
"SHAREFRIEND_COMPLETE_5"
//邀请任务5
const
val
SHAREFRIEND_COMPLETE_6
=
"SHAREFRIEND_COMPLETE_6"
//邀请任务6
// 新邀请好友
const
val
CHALLENGE_SHAREFRIEND
=
"CHALLENGE_SHAREFRIEND"
//邀请好友
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/model/FriendsTaskBean.java
View file @
42806dbc
...
...
@@ -67,6 +67,15 @@ public class FriendsTaskBean {
private
String
title
;
private
String
remarks
;
private
int
status
;
private
String
carrierType
;
public
String
getCarrierType
()
{
return
carrierType
;
}
public
void
setCarrierType
(
String
carrierType
)
{
this
.
carrierType
=
carrierType
;
}
public
String
getButton
()
{
return
button
;
...
...
@@ -147,27 +156,33 @@ public class FriendsTaskBean {
*/
private
String
head
;
private
int
rc
oin
;
private
int
sumC
oin
;
private
String
nickName
;
private
String
mobile
;
private
long
ruid
;
private
String
time
;
private
int
cashout
;
private
String
idcode
;
public
String
getHead
()
{
return
head
;
public
int
getSumCoin
()
{
return
sumCoin
;
}
public
void
set
Head
(
String
head
)
{
this
.
head
=
head
;
public
void
set
SumCoin
(
int
sumCoin
)
{
this
.
sumCoin
=
sumCoin
;
}
public
int
getRcoin
()
{
return
rcoin
;
public
String
getIdcode
()
{
return
idcode
;
}
public
void
setRcoin
(
int
rcoin
)
{
this
.
rcoin
=
rcoin
;
public
void
setIdcode
(
String
idcode
)
{
this
.
idcode
=
idcode
;
}
public
String
getHead
()
{
return
head
;
}
public
void
setHead
(
String
head
)
{
this
.
head
=
head
;
}
public
String
getNickName
()
{
...
...
@@ -186,29 +201,6 @@ public class FriendsTaskBean {
this
.
mobile
=
mobile
;
}
public
long
getRuid
()
{
return
ruid
;
}
public
void
setRuid
(
long
ruid
)
{
this
.
ruid
=
ruid
;
}
public
String
getTime
()
{
return
time
;
}
public
void
setTime
(
String
time
)
{
this
.
time
=
time
;
}
public
int
getCashout
()
{
return
cashout
;
}
public
void
setCashout
(
int
cashout
)
{
this
.
cashout
=
cashout
;
}
}
}
}
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/presenters/MyPresenter.kt
View file @
42806dbc
package
com.mints.goodmoney.mvp.presenters
import
android.text.TextUtils
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.common.DeviceInfo
import
com.mints.goodmoney.manager.AppHttpManager
...
...
@@ -9,7 +8,6 @@ import com.mints.goodmoney.manager.UserManager
import
com.mints.goodmoney.mvp.model.*
import
com.mints.goodmoney.mvp.views.MyView
import
com.mints.goodmoney.utils.DeviceUuidFactory
import
com.mints.goodmoney.utils.LogUtil
import
com.mints.library.net.neterror.BaseSubscriber
import
com.mints.library.net.neterror.Throwable
import
net.grandcentrix.tray.AppPreferences
...
...
@@ -96,12 +94,12 @@ class MyPresenter : BasePresenter<MyView>() {
override
fun
onNext
(
baseResponse
:
BaseResponse
<
MyInfo
>)
{
if
(
isLinkView
)
return
val
code
:
Int
=
baseResponse
.
getStatus
()
val
message
:
String
=
baseResponse
.
getMessage
()
val
code
:
Int
=
baseResponse
.
status
val
message
:
String
=
baseResponse
.
message
when
(
code
)
{
200
->
{
view
.
getUserTaskMsgSuc
(
baseResponse
.
getData
()
)
myHotActivity
()
view
.
getUserTaskMsgSuc
(
baseResponse
.
data
)
//
myHotActivity()
}
401
->
view
.
getUserTaskMsgFail
()
else
->
{
...
...
@@ -167,9 +165,9 @@ class MyPresenter : BasePresenter<MyView>() {
}
override
fun
onNext
(
baseResponse
:
BaseResponse
<
UserBean
>)
{
val
code
=
baseResponse
.
getStatus
()
val
message
=
baseResponse
.
getMessage
()
val
data
:
UserBean
?
=
baseResponse
.
getData
()
val
code
=
baseResponse
.
status
val
message
=
baseResponse
.
message
val
data
:
UserBean
?
=
baseResponse
.
data
when
(
code
)
{
200
->
if
(
data
!=
null
)
{
UserManager
.
getInstance
().
saveUserInfo
(
data
)
...
...
@@ -201,7 +199,7 @@ class MyPresenter : BasePresenter<MyView>() {
vo
[
"uuid"
]
=
DeviceUuidFactory
().
deviceUuid
vo
[
"osversion"
]
=
deviceInfo
.
oSVersion
vo
[
"appversion"
]
=
deviceInfo
.
versionName
vo
[
"shumeiId"
]
=
ShumeiManager
.
getInstance
().
getShumeiDeviceId
()
vo
[
"shumeiId"
]
=
ShumeiManager
.
getInstance
().
shumeiDeviceId
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
saveTerminalInfo
(
vo
),
object
:
BaseSubscriber
<
BaseResponse
<
Any
>>()
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/adapter/InvitedAdapter.kt
View file @
42806dbc
...
...
@@ -85,7 +85,7 @@ class InvitedAdapter(context: Context, invitedData: MutableList<FriendsTaskBean.
holder
.
tvName
.
text
=
data
.
mobile
}
holder
.
tvCoin
.
text
=
""
+
data
.
rc
oin
holder
.
tvCoin
.
text
=
""
+
data
.
sumC
oin
holder
.
ivAvatar
holder
.
itemView
.
setOnClickListener
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/FriendsFragment.kt
View file @
42806dbc
...
...
@@ -120,11 +120,15 @@ class FriendsFragment : BaseFragment(), FriendsView, OnRefreshListener, Platform
private
fun
initBanner
()
{
bannerTaskAdapter
=
BannerTaskAdapter
(
mContext
)
bannerTaskAdapter
?.
let
{
it
.
setOnPageTouchListener
(
object
:
BannerBaseAdapter
.
OnPageTouchListener
<
FriendsTaskBean
.
ChallengeBean
.
ListBean
>
{
override
fun
onPageClick
(
position
:
Int
,
t
:
FriendsTaskBean
.
ChallengeBean
.
ListBean
?)
{
if
(
t
?.
status
==
0
)
{
bannerTaskAdapter
?.
setOnPageTouchListener
(
object
:
BannerBaseAdapter
.
OnPageTouchListener
<
FriendsTaskBean
.
ChallengeBean
.
ListBean
>
{
override
fun
onPageClick
(
position
:
Int
,
t
:
FriendsTaskBean
.
ChallengeBean
.
ListBean
)
{
if
(
t
.
status
==
0
)
{
invitedFriends
()
}
else
{
val
bundle
=
Bundle
()
bundle
.
putInt
(
Constant
.
MAIN_CUR_COIN
,
t
.
rewardCoin
)
bundle
.
putString
(
Constant
.
MAIN_CARRIER_TYPE
,
t
.
carrierType
)
readyGo
(
AwardActivity
::
class
.
java
,
bundle
)
}
}
...
...
@@ -137,7 +141,6 @@ class FriendsFragment : BaseFragment(), FriendsView, OnRefreshListener, Platform
}
})
}
bv_friends_task
.
setAdapter
(
bannerTaskAdapter
)
}
...
...
@@ -216,6 +219,12 @@ class FriendsFragment : BaseFragment(), FriendsView, OnRefreshListener, Platform
override
fun
getFriendsRankSuc
(
data
:
FriendsTaskBean
)
{
srl_my
.
finishRefresh
(
true
)
// var currentPostion: Int
// for (i in 0..data.challenge.list.size) {
// if (data.challenge.list[i].status == 1 && data.challenge.list[i + 1].status == 0) {
// currentPostion = i
// }
// }
bvTaskData
=
data
.
challenge
.
list
bannerTaskAdapter
?.
setData
(
bvTaskData
)
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
View file @
42806dbc
...
...
@@ -80,15 +80,6 @@ class MyFragment : BaseFragment(), MyView, MainMyAdapter.OnItemChildClickListene
initView
()
initRecy
()
if
(!
TextUtils
.
isEmpty
(
userManager
.
userID
))
{
myPresenter
.
getUserHallBaseMsg
()
}
else
{
// 游客登录
myPresenter
.
userLogin
(
ps
)
}
}
private
fun
initView
()
{
...
...
@@ -130,7 +121,12 @@ class MyFragment : BaseFragment(), MyView, MainMyAdapter.OnItemChildClickListene
override
fun
onResume
()
{
super
.
onResume
()
if
(
AppConfig
.
fragmentClickFlag
==
Constant
.
FRAGMENT_CLICK_MY
)
{
if
(!
TextUtils
.
isEmpty
(
userManager
.
userID
))
{
myPresenter
.
getUserHallBaseMsg
()
}
else
{
// 游客登录
myPresenter
.
userLogin
(
ps
)
}
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/widgets/SignView.java
View file @
42806dbc
...
...
@@ -10,7 +10,6 @@ import android.widget.TextView;
import
androidx.annotation.Nullable
;
import
com.mints.goodmoney.R
;
import
com.mints.goodmoney.manager.UserManager
;
import
com.mints.goodmoney.mvp.model.SignViewBean
;
import
com.mints.library.utils.nodoubleclick.AntiShake
;
...
...
@@ -187,6 +186,7 @@ public class SignView extends LinearLayout implements View.OnClickListener {
tvContent
.
setBackground
(
resources
.
getDrawable
(
R
.
mipmap
.
ic_sign_newgift_close
));
}
else
{
tvDay
.
setText
(
days
+
"天"
);
tvContent
.
setTextColor
(
resources
.
getColor
(
R
.
color
.
my_color_orange2
));
tvContent
.
setBackground
(
resources
.
getDrawable
(
R
.
mipmap
.
ic_sign_nofinish
));
}
...
...
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