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
ddb9925d
Commit
ddb9925d
authored
Oct 16, 2020
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加提现方式,代码优化
parent
ebb71992
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
245 additions
and
296 deletions
+245
-296
InitAppService.kt
...y/app/src/main/java/com/mints/goodmoney/InitAppService.kt
+0
-29
MintsApplication.java
...p/src/main/java/com/mints/goodmoney/MintsApplication.java
+33
-0
Constant.kt
.../app/src/main/java/com/mints/goodmoney/common/Constant.kt
+2
-2
DrawcashBean.java
...main/java/com/mints/goodmoney/mvp/model/DrawcashBean.java
+10
-177
DrawcashPresenter.java
...com/mints/goodmoney/mvp/presenters/DrawcashPresenter.java
+1
-0
HomePresenter.kt
.../java/com/mints/goodmoney/mvp/presenters/HomePresenter.kt
+9
-3
LoginPresenter.kt
...java/com/mints/goodmoney/mvp/presenters/LoginPresenter.kt
+39
-0
HomeView.kt
...p/src/main/java/com/mints/goodmoney/mvp/views/HomeView.kt
+1
-0
LoanService.java
...pp/src/main/java/com/mints/goodmoney/net/LoanService.java
+9
-1
AwardActivity.kt
...in/java/com/mints/goodmoney/ui/activitys/AwardActivity.kt
+1
-1
DrawcashActivity.kt
...java/com/mints/goodmoney/ui/activitys/DrawcashActivity.kt
+60
-49
LoginActivity.kt
...in/java/com/mints/goodmoney/ui/activitys/LoginActivity.kt
+17
-2
DrawcashAdapter.kt
...in/java/com/mints/goodmoney/ui/adapter/DrawcashAdapter.kt
+44
-14
MainFragment.kt
...main/java/com/mints/goodmoney/ui/fragment/MainFragment.kt
+11
-8
MyFragment.kt
...c/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
+2
-5
BrowserLayout.kt
.../src/main/java/com/mints/library/widgets/BrowserLayout.kt
+1
-1
activity_award.xml
GoodMoney/app/src/main/res/layout/activity_award.xml
+3
-3
activity_drawcash.xml
GoodMoney/app/src/main/res/layout/activity_drawcash.xml
+1
-0
item_rv_drawcash.xml
GoodMoney/app/src/main/res/layout/item_rv_drawcash.xml
+1
-1
ic_award.png
GoodMoney/app/src/main/res/mipmap-xhdpi/ic_award.png
+0
-0
No files found.
GoodMoney/app/src/main/java/com/mints/goodmoney/InitAppService.kt
View file @
ddb9925d
...
...
@@ -75,9 +75,6 @@ class InitAppService : IntentService("InitializeService") {
//logger
initLogger
()
// 一览视频
initYL
()
// 数美
ShumeiManager
.
getInstance
().
initShumei
()
...
...
@@ -142,32 +139,6 @@ class InitAppService : IntentService("InitializeService") {
}
}
/**
* 一览视频
*/
private
fun
initYL
()
{
YLUIInit
.
getInstance
()
.
setCrashOpen
(
false
)
.
setApplication
(
application
)
.
setAccessKey
(
"ylxgszgwjrr8"
)
.
setAccessToken
(
"lmnzhm9yjdlc86xiy74cjgixnqpxe4o2"
)
.
build
()
//页面个性化配置
YLUIConfig
.
getInstance
()
//抖音样式小视频配置
.
littleLikeShow
(
true
)
//是否显示点赞
.
littleShareShow
(
false
)
//是否显示分享
.
littleComment
(
CommentConfig
.
CommentType
.
DISMISS_COMMENT
)
//评论,参数详见文档;
//feed流短视频样式配置
.
videoComment
(
CommentConfig
.
CommentType
.
DISMISS_COMMENT
)
//评论,参数详见文档;
.
videoLikeShow
(
false
)
//是否显示点赞
.
videoShareShow
(
false
)
//是否显示分享
.
followAvailable
(
false
)
//关注功能是否可用
.
feedAvatarClickable
(
true
)
//头像是否支持点击跳转到作者页面
.
feedSwipeRefreshEnable
(
true
)
//feed是否可以下拉刷新
FeedConfig
.
getInstance
().
playerStyle
=
FeedConfig
.
STYLE_NATIVE
//FeedConfig.STYLE_STYLE_FEED_PLAY当前页面播放
}
/**
* 绑定jpush
*/
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/MintsApplication.java
View file @
ddb9925d
...
...
@@ -16,6 +16,10 @@ import com.mints.goodmoney.common.Constant;
import
com.mints.goodmoney.net.LoanService
;
import
com.mints.goodmoney.utils.ForegroundOrBackground
;
import
com.mints.goodmoney.utils.SystemUtils
;
import
com.yilan.sdk.ui.YLUIInit
;
import
com.yilan.sdk.ui.configs.CommentConfig
;
import
com.yilan.sdk.ui.configs.FeedConfig
;
import
com.yilan.sdk.ui.configs.YLUIConfig
;
import
rx.Scheduler
;
import
rx.schedulers.Schedulers
;
...
...
@@ -85,6 +89,9 @@ public class MintsApplication extends MultiDexApplication {
// 穿山甲
// initCsj();
// 一览视频
initYL
();
}
/**
...
...
@@ -101,6 +108,32 @@ public class MintsApplication extends MultiDexApplication {
TtCsjAdManager
.
init
(
this
);
}
/**
* 一览视频
*/
private
void
initYL
()
{
YLUIInit
.
getInstance
()
.
setCrashOpen
(
false
)
.
setApplication
(
this
)
.
setAccessKey
(
"ylxgszgwjrr8"
)
.
setAccessToken
(
"lmnzhm9yjdlc86xiy74cjgixnqpxe4o2"
)
.
build
();
//页面个性化配置
YLUIConfig
.
getInstance
()
//抖音样式小视频配置
.
littleLikeShow
(
true
)
//是否显示点赞
.
littleShareShow
(
false
)
//是否显示分享
.
littleComment
(
CommentConfig
.
CommentType
.
DISMISS_COMMENT
)
//评论,参数详见文档;
//feed流短视频样式配置
.
videoComment
(
CommentConfig
.
CommentType
.
DISMISS_COMMENT
)
//评论,参数详见文档;
.
videoLikeShow
(
false
)
//是否显示点赞
.
videoShareShow
(
false
)
//是否显示分享
.
followAvailable
(
false
)
//关注功能是否可用
.
feedAvatarClickable
(
true
)
//头像是否支持点击跳转到作者页面
.
feedSwipeRefreshEnable
(
true
);
//feed是否可以下拉刷新
FeedConfig
.
getInstance
().
setPlayerStyle
(
FeedConfig
.
STYLE_NATIVE
);
//FeedConfig.STYLE_STYLE_FEED_PLAY当前页面播放
}
/**
* app退出
*/
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/common/Constant.kt
View file @
ddb9925d
...
...
@@ -64,8 +64,8 @@ object Constant {
const
val
FRAGMENT_CLICK_MY
=
3
// 协议地址
var
REGISTER_URL
=
BuildConfig
.
MainIp
+
"
agreement
/register.html"
//服务协议
var
PRIVACY_URL
=
BuildConfig
.
MainIp
+
"
agreement
/privacy.html"
//隐私协议
var
REGISTER_URL
=
BuildConfig
.
MainIp
+
"
gm
/register.html"
//服务协议
var
PRIVACY_URL
=
BuildConfig
.
MainIp
+
"
gm
/privacy.html"
//隐私协议
/**
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/model/DrawcashBean.java
View file @
ddb9925d
...
...
@@ -5,74 +5,10 @@ import java.util.List;
public
class
DrawcashBean
implements
Serializable
{
/**
* msg : 微信账户目前正在维护中,预计3月28日前恢复,请优先用支付宝提现。
* realName : null
* wxDrawFlag : true
* surplus : 0
* openid : null
* lastCashOutType : WEIXIN
* cashOutMoneyArr : [{"money":"1","canUseOnce":true,"needFs":2,"nowFriends":0,"fsGiveCoin":800,"once":true,"canCashOut":false},{"money":"100","canUseOnce":true,"needFs":20,"nowFriends":0,"fsGiveCoin":1800,"once":true,"canCashOut":false},{"money":"150","canUseOnce":null,"needFs":30,"nowFriends":0,"fsGiveCoin":2800,"once":false,"canCashOut":false},{"money":"200","canUseOnce":null,"needFs":40,"nowFriends":0,"fsGiveCoin":3800,"once":false,"canCashOut":false},{"money":"500","canUseOnce":null,"needFs":50,"nowFriends":0,"fsGiveCoin":4800,"once":false,"canCashOut":false}]
* coinRate : 10000
* alipayAccount : null
* coin : 5562
*/
private
String
msg
;
private
String
realName
;
private
boolean
wxDrawFlag
;
private
int
surplus
;
private
String
openid
;
private
String
lastCashOutType
;
private
int
coinRate
;
private
String
alipayAccount
;
private
String
nickName
;
private
int
coin
;
private
int
diamonds
;
private
int
vedioCompleteSum
;
private
int
vedioNeedSum
;
private
double
firstValue
;
private
List
<
CashOutMoneyArrBean
>
cashOutMoneyArr
;
private
List
<
CashOutMoneyArrBean
>
cashOutDiamondsArr
;
public
int
getDiamonds
()
{
return
diamonds
;
}
public
void
setDiamonds
(
int
diamonds
)
{
this
.
diamonds
=
diamonds
;
}
public
String
getMsg
()
{
return
msg
;
}
public
void
setMsg
(
String
msg
)
{
this
.
msg
=
msg
;
}
public
String
getRealName
()
{
return
realName
;
}
public
void
setRealName
(
String
realName
)
{
this
.
realName
=
realName
;
}
public
boolean
isWxDrawFlag
()
{
return
wxDrawFlag
;
}
public
void
setWxDrawFlag
(
boolean
wxDrawFlag
)
{
this
.
wxDrawFlag
=
wxDrawFlag
;
}
public
int
getSurplus
()
{
return
surplus
;
}
public
void
setSurplus
(
int
surplus
)
{
this
.
surplus
=
surplus
;
}
public
String
getOpenid
()
{
return
openid
;
...
...
@@ -82,28 +18,12 @@ public class DrawcashBean implements Serializable {
this
.
openid
=
openid
;
}
public
String
getLastCashOutType
()
{
return
lastCashOutType
;
}
public
void
setLastCashOutType
(
String
lastCashOutType
)
{
this
.
lastCashOutType
=
lastCashOutType
;
}
public
int
getCoinRate
()
{
return
coinRate
;
}
public
void
setCoinRate
(
int
coinRate
)
{
this
.
coinRate
=
coinRate
;
}
public
String
getAlipayAccount
()
{
return
alipayAccount
;
public
String
getNickName
()
{
return
nickName
;
}
public
void
set
AlipayAccount
(
String
alipayAccount
)
{
this
.
alipayAccount
=
alipayAccount
;
public
void
set
NickName
(
String
nickName
)
{
this
.
nickName
=
nickName
;
}
public
int
getCoin
()
{
...
...
@@ -122,105 +42,18 @@ public class DrawcashBean implements Serializable {
this
.
cashOutMoneyArr
=
cashOutMoneyArr
;
}
public
int
getVedioCompleteSum
()
{
return
vedioCompleteSum
;
}
public
void
setVedioCompleteSum
(
int
vedioCompleteSum
)
{
this
.
vedioCompleteSum
=
vedioCompleteSum
;
}
public
int
getVedioNeedSum
()
{
return
vedioNeedSum
;
}
public
void
setVedioNeedSum
(
int
vedioNeedSum
)
{
this
.
vedioNeedSum
=
vedioNeedSum
;
}
public
double
getFirstValue
()
{
return
firstValue
;
}
public
void
setFirstValue
(
double
firstValue
)
{
this
.
firstValue
=
firstValue
;
}
public
List
<
CashOutMoneyArrBean
>
getCashOutDiamondsArr
()
{
return
cashOutDiamondsArr
;
}
public
void
setCashOutDiamondsArr
(
List
<
CashOutMoneyArrBean
>
cashOutDiamondsArr
)
{
this
.
cashOutDiamondsArr
=
cashOutDiamondsArr
;
}
public
class
CashOutMoneyArrBean
implements
Serializable
{
/**
* money : 1
* canUseOnce : true
* needFs : 2
* nowFriends : 0
* fsGiveCoin : 800
* once : true
* canCashOut : false
*/
private
int
money
;
private
boolean
canUseOnce
;
//还有没有新人专享的机会
private
int
needFs
;
//需要多少朋友才能提现
private
int
nowFriends
;
//现在有多少了
private
int
fsGiveCoin
;
//朋友可以返给我多少
private
boolean
once
;
//是否是新人专享
private
boolean
canCashOut
;
//最终能不能提现
public
int
getMoney
()
{
private
double
money
;
private
boolean
canCashOut
;
public
double
getMoney
()
{
return
money
;
}
public
void
setMoney
(
int
money
)
{
public
void
setMoney
(
double
money
)
{
this
.
money
=
money
;
}
public
boolean
isCanUseOnce
()
{
return
canUseOnce
;
}
public
void
setCanUseOnce
(
boolean
canUseOnce
)
{
this
.
canUseOnce
=
canUseOnce
;
}
public
int
getNeedFs
()
{
return
needFs
;
}
public
void
setNeedFs
(
int
needFs
)
{
this
.
needFs
=
needFs
;
}
public
int
getNowFriends
()
{
return
nowFriends
;
}
public
void
setNowFriends
(
int
nowFriends
)
{
this
.
nowFriends
=
nowFriends
;
}
public
int
getFsGiveCoin
()
{
return
fsGiveCoin
;
}
public
void
setFsGiveCoin
(
int
fsGiveCoin
)
{
this
.
fsGiveCoin
=
fsGiveCoin
;
}
public
boolean
isOnce
()
{
return
once
;
}
public
void
setOnce
(
boolean
once
)
{
this
.
once
=
once
;
}
public
boolean
isCanCashOut
()
{
return
canCashOut
;
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/presenters/DrawcashPresenter.java
View file @
ddb9925d
...
...
@@ -213,6 +213,7 @@ public class DrawcashPresenter extends BasePresenter<DrawcashView> {
switch
(
code
)
{
case
200
:
//成功
view
.
showToast
(
"提现成功"
);
getUserTaskMsg
();
break
;
default
:
view
.
showToast
(
message
);
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/presenters/HomePresenter.kt
View file @
ddb9925d
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
import
com.mints.goodmoney.manager.ShumeiManager
import
com.mints.goodmoney.manager.UserManager
import
com.mints.goodmoney.mvp.model.*
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.HomeView
import
com.mints.goodmoney.utils.DeviceUuidFactory
import
com.mints.library.net.neterror.BaseSubscriber
...
...
@@ -71,6 +73,7 @@ class HomePresenter : BasePresenter<HomeView>() {
if
(
isLinkView
)
return
view
.
hideLoading
()
view
.
showToast
(
e
.
message
)
view
.
getHallBaseMsgFail
()
}
override
fun
onNext
(
baseResponse
:
BaseResponse
<
UserTaskMsgBean
>)
{
...
...
@@ -79,7 +82,10 @@ class HomePresenter : BasePresenter<HomeView>() {
val
message
=
baseResponse
.
getMessage
()
when
(
code
)
{
200
->
view
.
getHallBaseMsgSuc
(
baseResponse
.
getData
())
else
->
view
.
showToast
(
message
)
else
->{
view
.
getHallBaseMsgFail
()
view
.
showToast
(
message
)
}
}
}
})
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/presenters/LoginPresenter.kt
View file @
ddb9925d
...
...
@@ -55,6 +55,45 @@ class LoginPresenter : BasePresenter<LoginView>() {
})
}
/**
* 绑定
*/
fun
bindingMobile
(
mobile
:
String
,
smsCode
:
String
)
{
view
.
showLoading
(
"加载中..."
)
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"mobile"
]
=
mobile
vo
[
"smsCode"
]
=
smsCode
vo
[
"device"
]
=
DeviceUuidFactory
().
deviceUuid
.
toString
()
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
bindingMobile
(
vo
),
object
:
BaseSubscriber
<
BaseResponse
<
UserBean
>>()
{
override
fun
onCompleted
()
{
if
(
isLinkView
)
return
view
.
hideLoading
()
}
override
fun
onError
(
e
:
Throwable
)
{
if
(
isLinkView
)
return
view
.
hideLoading
()
view
.
showToast
(
e
.
message
)
}
override
fun
onNext
(
baseResponse
:
BaseResponse
<
UserBean
>)
{
if
(
isLinkView
)
return
val
code
=
baseResponse
.
getStatus
()
val
message
=
baseResponse
.
getMessage
()
val
data
:
UserBean
?
=
baseResponse
.
getData
()
when
(
code
)
{
200
->
if
(
data
!=
null
)
{
UserManager
.
getInstance
().
saveUserInfo
(
data
)
view
.
loginSuc
()
}
else
->
view
.
showToast
(
message
)
}
}
})
}
/**
* 登录
*/
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/views/HomeView.kt
View file @
ddb9925d
...
...
@@ -6,5 +6,6 @@ import com.mints.goodmoney.mvp.model.UserTaskMsgBean
interface
HomeView
:
BaseView
{
fun
getHallBaseMsgSuc
(
data
:
UserTaskMsgBean
)
fun
getHallBaseMsgFail
()
fun
getHomeVedioMsgSuc
(
data
:
MainVedioMsgBean
)
}
GoodMoney/app/src/main/java/com/mints/goodmoney/net/LoanService.java
View file @
ddb9925d
...
...
@@ -150,6 +150,14 @@ public interface LoanService {
@POST
(
"api/wechatlogin"
)
Observable
<
BaseResponse
<
UserBean
>>
wechatlogin
(
@Body
Map
<
String
,
Object
>
vo
);
/**
* 手机号绑定
*
* @return
*/
@POST
(
"api/bindingMobile"
)
Observable
<
BaseResponse
<
UserBean
>>
bindingMobile
(
@Body
Map
<
String
,
Object
>
vo
);
/**
* 提交任务
*
...
...
@@ -203,7 +211,7 @@ public interface LoanService {
*
* @return
*/
@POST
(
"api/
high/
getUserCoinMsg"
)
@POST
(
"api/getUserCoinMsg"
)
Observable
<
BaseResponse
<
DrawcashBean
>>
getDrawcashUserTaskMsg
();
/**
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/AwardActivity.kt
View file @
ddb9925d
...
...
@@ -81,7 +81,7 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
Constant
.
CARRIER_OFFLINE_DOUBLE
->
{
tvAwardContent
.
setText
(
"离线收益奖励"
+
curCoin
+
"金币"
)
}
Constant
.
CARRIER_SIGNIN_HOMEPAGE_
C
ARD
->
{
Constant
.
CARRIER_SIGNIN_HOMEPAGE_
AW
ARD
->
{
tvAwardContent
.
setText
(
"签到奖励"
+
curCoin
+
"金币"
)
}
Constant
.
CARRIER_GAME
->
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/DrawcashActivity.kt
View file @
ddb9925d
...
...
@@ -37,10 +37,11 @@ class DrawcashActivity : BaseActivity(),
private
val
userManager
by
lazy
{
UserManager
.
getInstance
()
}
private
val
loginApi
by
lazy
{
LoginApi
()
}
private
lateinit
var
drawcashAdapter
:
DrawcashAdapter
private
var
priceList
:
MutableList
<
DrawcashBean
.
CashOutMoneyArrBean
>?
=
null
private
var
wxInfo
:
WXInfo
?
=
null
private
var
userConfig
:
DrawcashBean
?
=
null
private
var
isLoadRvItem
:
Boolean
=
true
//是否首次加载rv item
private
var
isLoadRvItem
:
Boolean
=
true
//是否首次加载rv item
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_drawcash
...
...
@@ -50,32 +51,9 @@ class DrawcashActivity : BaseActivity(),
tv_activity_title
.
text
=
"提现"
drawcashPresenter
.
attachView
(
this
)
initText
()
initRvView
()
initListener
()
}
private
fun
initText
()
{
tvDrawcashExplain
.
setText
(
SpanUtils
()
.
append
(
"提现说明:"
)
.
append
(
"\n"
)
.
append
(
"1、所有提现金额【无门槛】直接提现!新用户提现秒到账!"
)
.
append
(
"\n"
)
.
append
(
"2、由于提现需要实名制,非实名用户账号无法支持提现,请务必使用实名认证过的账号提现!"
)
.
append
(
"\n"
)
.
append
(
"3、单笔提现金额最低"
+
0.3
+
"元,最高"
+
1000
+
"元。"
)
.
append
(
"\n"
)
.
append
(
"4、提现申请将在3-5个工作日审核到账,请耐心等待。"
)
.
append
(
"\n"
)
.
append
(
"5、每日可申请提现一次,若当日限额已满,请次日申请。"
)
.
append
(
"\n"
)
.
append
(
"6、"
+
0.3
+
"元-"
+
50
+
"元,是新人专享福利,每个账号仅可享受一次。"
)
.
create
())
tvDrawcashHint
.
text
=
"* 如您或好友通过刷机等违规操作获取非法收益,平台将视情况扣除违规所得或冻结账号。"
+
"\n* 最终解释权归本公司所有。"
}
override
fun
onResume
()
{
super
.
onResume
()
...
...
@@ -95,6 +73,10 @@ class DrawcashActivity : BaseActivity(),
when
(
v
?.
id
)
{
R
.
id
.
tv_activity_back
->
finish
()
R
.
id
.
tvDrawcashWx
->
{
if
(!
TextUtils
.
isEmpty
(
userConfig
?.
openid
))
{
return
}
val
wechat
=
ShareSDK
.
getPlatform
(
Wechat
.
NAME
)
if
(!
wechat
.
isClientValid
)
{
showToast
(
"请先安装微信"
)
...
...
@@ -106,30 +88,35 @@ class DrawcashActivity : BaseActivity(),
loginApi
.
login
(
this
)
}
R
.
id
.
tvDrawcashNext
->
{
// 校验当前金币< 选择金币 =提示 去做任务
// if(userConfig?.coin<)
// 是否登录
if
(!
userManager
.
userIsLogin
())
{
readyGo
(
LoginActivity
::
class
.
java
)
return
}
// 是否绑定手机号
if
(
TextUtils
.
isEmpty
(
userManager
.
mobile
))
{
val
bundle
=
Bundle
()
bundle
.
putBoolean
(
Constant
.
LOGIN_FLAG
,
true
)
readyGo
(
LoginActivity
::
class
.
java
,
bundle
)
return
if
(
priceList
!=
null
&&
priceList
!!
.
size
>
0
)
{
// 校验当前金币< 选择金币 =提示 去做任务
if
(
userConfig
?.
coin
!!
<
priceList
!!
[
drawcashAdapter
?.
getPosition
()].
money
*
10000
)
{
showToast
(
"金币不足,快去做任务吧"
)
return
}
// 是否登录
if
(!
userManager
.
userIsLogin
())
{
readyGo
(
LoginActivity
::
class
.
java
)
return
}
// 是否绑定手机号
if
(
TextUtils
.
isEmpty
(
userManager
.
mobile
))
{
val
bundle
=
Bundle
()
bundle
.
putBoolean
(
Constant
.
LOGIN_FLAG
,
true
)
readyGo
(
LoginActivity
::
class
.
java
,
bundle
)
return
}
// 授权判断
if
(
TextUtils
.
isEmpty
(
userConfig
?.
openid
))
{
showToast
(
"微信未授权"
)
return
}
drawcashPresenter
.
saveTerminalInfo
(
ps
,
priceList
!!
[
drawcashAdapter
?.
getPosition
()].
money
)
}
// 授权判断
if
(
TextUtils
.
isEmpty
(
userConfig
?.
openid
))
{
showToast
(
"微信未授权"
)
return
}
drawcashPresenter
.
saveTerminalInfo
(
ps
,
0.0
)
}
}
}
...
...
@@ -140,11 +127,14 @@ class DrawcashActivity : BaseActivity(),
tvDrawcashGold
.
text
=
"${data.getCoin()}"
if
(
TextUtils
.
isEmpty
(
data
.
openid
))
{
tvDrawcashWx
.
setText
(
"去授权"
)
tvDrawcashName
.
setText
(
"微信昵称"
)
}
else
{
tvDrawcashWx
.
setText
(
"已授权"
)
tvDrawcashName
.
setText
(
data
.
nickName
)
}
if
(
isLoadRvItem
)
{
priceList
=
data
.
cashOutMoneyArr
initRvView
()
}
}
...
...
@@ -178,11 +168,32 @@ class DrawcashActivity : BaseActivity(),
return
false
}
private
fun
initText
()
{
tvDrawcashExplain
.
setText
(
SpanUtils
()
.
append
(
"提现说明:"
)
.
append
(
"\n"
)
.
append
(
"1、所有提现金额【无门槛】直接提现!新用户提现秒到账!"
)
.
append
(
"\n"
)
.
append
(
"2、由于提现需要实名制,非实名用户账号无法支持提现,请务必使用实名认证过的账号提现!"
)
.
append
(
"\n"
)
.
append
(
"3、单笔提现金额最低"
+
0.3
+
"元,最高"
+
1000
+
"元。"
)
.
append
(
"\n"
)
.
append
(
"4、提现申请将在3-5个工作日审核到账,请耐心等待。"
)
.
append
(
"\n"
)
.
append
(
"5、每日可申请提现一次,若当日限额已满,请次日申请。"
)
.
append
(
"\n"
)
.
append
(
"6、"
+
0.3
+
"元-"
+
50
+
"元,是新人专享福利,每个账号仅可享受一次。"
)
.
create
())
tvDrawcashHint
.
text
=
"* 如您或好友通过刷机等违规操作获取非法收益,平台将视情况扣除违规所得或冻结账号。"
+
"\n* 最终解释权归本公司所有。"
}
private
fun
initRvView
()
{
val
gridLayoutManager
=
GridLayoutManager
(
this
,
3
)
rvCash
.
layoutManager
=
gridLayoutManager
// vipAdapter = vipList?.let { VipAdapter(it) }!!
drawcashAdapter
=
DrawcashAdapter
(
null
)
drawcashAdapter
=
priceList
?.
let
{
DrawcashAdapter
(
it
)
}
!!
rvCash
.
adapter
=
drawcashAdapter
drawcashAdapter
.
setOnItemClickListener
(
this
)
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/LoginActivity.kt
View file @
ddb9925d
...
...
@@ -109,9 +109,14 @@ class LoginActivity : BaseActivity()
.
request
(
Manifest
.
permission
.
READ_PHONE_STATE
)
.
subscribe
{
granted
:
Boolean
->
if
(
granted
)
{
// 登录
mobile
=
mobile
.
replace
(
" "
.
toRegex
(),
""
)
loginPresenter
.
login
(
mobile
,
code
,
ps
)
if
(
loginFlag
)
{
loginPresenter
.
bindingMobile
(
mobile
,
code
)
}
else
{
// 登录
loginPresenter
.
login
(
mobile
,
code
,
ps
)
}
}
else
{
showMissingPermissionDialog
(
"设备"
)
}
...
...
@@ -152,10 +157,19 @@ class LoginActivity : BaseActivity()
}
override
fun
loginSuc
()
{
// false-登录 true-绑定手机号
if
(
loginFlag
)
{
showToast
(
"绑定成功"
)
}
else
{
showToast
(
"登录成功"
)
}
if
(
progressDialog
!=
null
)
{
progressDialog
.
dismiss
()
}
finish
()
}
...
...
@@ -185,6 +199,7 @@ class LoginActivity : BaseActivity()
private
fun
initView
()
{
// false-登录 true-绑定手机号
if
(
loginFlag
)
{
tvLoginWx
.
visibility
=
View
.
GONE
tvLoginNext
.
text
=
"绑定手机号"
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/adapter/DrawcashAdapter.kt
View file @
ddb9925d
...
...
@@ -9,8 +9,10 @@ import android.widget.TextView
import
androidx.core.content.ContextCompat
import
androidx.recyclerview.widget.RecyclerView
import
com.mints.goodmoney.R
import
com.mints.goodmoney.mvp.model.DrawcashBean
import
java.lang.String
class
DrawcashAdapter
(
val
drawcashList
:
MutableList
<
String
>?
)
:
class
DrawcashAdapter
(
val
priceList
:
MutableList
<
DrawcashBean
.
CashOutMoneyArrBean
>
)
:
RecyclerView
.
Adapter
<
DrawcashAdapter
.
ViewHolder
>()
{
var
myPos
:
Int
=
0
...
...
@@ -18,6 +20,17 @@ class DrawcashAdapter(val drawcashList: MutableList<String>?) :
lateinit
var
mOnItemClickListener
:
OnItemClickListener
init
{
if
(
priceList
!=
null
&&
priceList
.
size
>
0
)
{
for
(
i
in
0
..
priceList
.
size
-
1
)
{
if
(
priceList
[
i
].
isCanCashOut
)
{
myPos
=
i
break
}
}
}
}
inner
class
ViewHolder
(
view
:
View
)
:
RecyclerView
.
ViewHolder
(
view
)
{
val
llDrawItem
:
LinearLayout
=
view
.
findViewById
(
R
.
id
.
llDrawItem
)
val
tvDrawItemCash
:
TextView
=
view
.
findViewById
(
R
.
id
.
tvDrawItemCash
)
...
...
@@ -32,29 +45,46 @@ class DrawcashAdapter(val drawcashList: MutableList<String>?) :
}
override
fun
onBindViewHolder
(
holder
:
ViewHolder
,
position
:
Int
)
{
// val drawcashBean = drawcashList[position]
val
priceBean
=
priceList
[
position
]
if
(
priceBean
.
money
>=
1
)
{
holder
.
tvDrawItemCash
.
text
=
"${String.format("
%.
0f
", priceBean.money)}元"
}
else
{
holder
.
tvDrawItemCash
.
text
=
"${priceBean.money}元"
}
holder
.
tvDrawItemGold
.
text
=
"约${String.format("
%.
0f
", priceBean.money * 10000)}金币"
holder
.
llDrawItem
.
setOnClickListener
{
mOnItemClickListener
?.
onItemClick
(
position
)
notifyDataSetChanged
()
if
(
priceBean
.
isCanCashOut
)
{
holder
.
llDrawItem
.
setEnabled
(
true
)
mOnItemClickListener
.
onItemClick
(
position
)
notifyDataSetChanged
()
}
else
{
holder
.
llDrawItem
.
setEnabled
(
false
)
}
}
if
(
getPosition
()
==
position
)
{
//当前选中
holder
.
tvDrawItemCash
.
setTextColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
white
))
holder
.
tvDrawItemGold
.
setTextColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
white
))
holder
.
llDrawItem
.
setBackgroundResource
(
R
.
drawable
.
shape_vip_adapter_none
)
}
else
{
holder
.
tvDrawItemCash
.
setTextColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
black
))
holder
.
tvDrawItemGold
.
setTextColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
gray
))
if
(!
priceBean
.
isCanCashOut
)
{
holder
.
tvDrawItemCash
.
setTextColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
grayc
))
holder
.
tvDrawItemGold
.
setTextColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
grayc
))
holder
.
llDrawItem
.
setBackgroundResource
(
R
.
drawable
.
shape_vip_adapter
)
}
else
{
if
(
getPosition
()
==
position
)
{
//当前选中
holder
.
tvDrawItemCash
.
setTextColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
white
))
holder
.
tvDrawItemGold
.
setTextColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
white
))
holder
.
llDrawItem
.
setBackgroundResource
(
R
.
drawable
.
shape_vip_adapter_none
)
}
else
{
holder
.
tvDrawItemCash
.
setTextColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
black
))
holder
.
tvDrawItemGold
.
setTextColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
gray
))
holder
.
llDrawItem
.
setBackgroundResource
(
R
.
drawable
.
shape_vip_adapter
)
}
}
holder
.
itemView
.
setTag
(
position
)
}
// override fun getItemCount() = drawcashList!!.size
override
fun
getItemCount
()
=
15
override
fun
getItemCount
()
=
priceList
.
size
interface
OnItemClickListener
{
fun
onItemClick
(
position
:
Int
)
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MainFragment.kt
View file @
ddb9925d
...
...
@@ -134,18 +134,23 @@ class MainFragment : BaseFragment(), HomeView, AdVideoCallback, View.OnClickList
}
// 离线收益
if
(
data
.
offlineBean
.
offlineIncome
>
0
)
{
val
bundle
=
Bundle
()
bundle
.
putInt
(
Constant
.
MAIN_CUR_COIN
,
data
.
offlineBean
.
offlineIncome
)
bundle
.
putString
(
Constant
.
MAIN_CARRIER_TYPE
,
Constant
.
CARRIER_OFFLINE_DOUBLE
)
readyGo
(
AwardActivity
::
class
.
java
,
bundle
)
}
//
if (data.offlineBean.offlineIncome > 0) {
//
val bundle = Bundle()
//
bundle.putInt(Constant.MAIN_CUR_COIN, data.offlineBean.offlineIncome)
//
bundle.putString(Constant.MAIN_CARRIER_TYPE, Constant.CARRIER_OFFLINE_DOUBLE)
//
readyGo(AwardActivity::class.java, bundle)
//
}
// 调用金币视频信息接口
homePresenter
.
getHomeVedioMsg
()
}
override
fun
getHallBaseMsgFail
()
{
smallRewardCoin
=
0
bigRewardCoin
=
0
}
override
fun
getHomeVedioMsgSuc
(
data
:
MainVedioMsgBean
)
{
smallRewardCoin
=
data
.
smallRewardCoin
bigRewardCoin
=
data
.
bigRewardCoin
...
...
@@ -178,8 +183,6 @@ class MainFragment : BaseFragment(), HomeView, AdVideoCallback, View.OnClickList
bundle
.
putInt
(
Constant
.
MAIN_CUR_COIN
,
smallRewardCoin
)
bundle
.
putString
(
Constant
.
MAIN_CARRIER_TYPE
,
Constant
.
CARRIER_HOMEVEDIO_SMALL
)
readyGo
(
AwardActivity
::
class
.
java
,
bundle
)
smallRewardCoin
=
0
}
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
View file @
ddb9925d
...
...
@@ -24,10 +24,7 @@ import com.mints.goodmoney.manager.UserManager
import
com.mints.goodmoney.mvp.model.*
import
com.mints.goodmoney.mvp.presenters.MyPresenter
import
com.mints.goodmoney.mvp.views.MyView
import
com.mints.goodmoney.ui.activitys.AwardActivity
import
com.mints.goodmoney.ui.activitys.LoginActivity
import
com.mints.goodmoney.ui.activitys.MainActivity
import
com.mints.goodmoney.ui.activitys.SettingsActivity
import
com.mints.goodmoney.ui.activitys.*
import
com.mints.goodmoney.ui.adapter.GvMyAdapter
import
com.mints.goodmoney.ui.adapter.MainMyAdapter
import
com.mints.goodmoney.ui.fragment.base.BaseFragment
...
...
@@ -492,7 +489,7 @@ class MyFragment : BaseFragment(), MyView, MainMyAdapter.OnItemChildClickListene
return
}
// readyGo(GoldTry
Activity::class.java)
readyGo
(
Drawcash
Activity
::
class
.
java
)
}
R
.
id
.
item_title_invitecode
->
{
if
(
userConfig
!=
null
)
{
...
...
GoodMoney/app/src/main/java/com/mints/library/widgets/BrowserLayout.kt
View file @
ddb9925d
...
...
@@ -60,7 +60,7 @@ class BrowserLayout : LinearLayout {
mWebView
!!
.
settings
.
builtInZoomControls
=
true
mWebView
!!
.
settings
.
setSupportMultipleWindows
(
true
)
//将图片调整到适合webview的大小
mWebView
!!
.
settings
.
useWideViewPort
=
tru
e
mWebView
!!
.
settings
.
useWideViewPort
=
fals
e
mWebView
!!
.
settings
.
loadWithOverviewMode
=
true
mWebView
!!
.
settings
.
setSupportZoom
(
true
)
mWebView
!!
.
settings
.
pluginState
=
WebSettings
.
PluginState
.
ON
...
...
GoodMoney/app/src/main/res/layout/activity_award.xml
View file @
ddb9925d
...
...
@@ -44,7 +44,7 @@
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:layout_marginLeft=
"30dp"
android:layout_marginTop=
"2
0
dp"
android:layout_marginTop=
"2
6
dp"
android:layout_marginRight=
"30dp"
android:background=
"@drawable/shape_bg_award"
android:orientation=
"vertical"
>
...
...
@@ -54,7 +54,7 @@
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:layout_marginTop=
"
6
0dp"
android:layout_marginTop=
"
7
0dp"
android:layout_marginBottom=
"10dp"
android:textColor=
"@color/black_text"
android:textSize=
"18sp"
...
...
@@ -102,7 +102,7 @@
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:src=
"@mipmap/ic_
launcher
"
/>
android:src=
"@mipmap/ic_
award
"
/>
</FrameLayout>
...
...
GoodMoney/app/src/main/res/layout/activity_drawcash.xml
View file @
ddb9925d
...
...
@@ -60,6 +60,7 @@
android:layout_margin=
"20dp"
>
<TextView
android:id=
"@+id/tvDrawcashName"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:drawableLeft=
"@mipmap/ic_draw_wx"
...
...
GoodMoney/app/src/main/res/layout/item_rv_drawcash.xml
View file @
ddb9925d
...
...
@@ -31,7 +31,7 @@
android:layout_marginTop=
"4dp"
android:layout_marginBottom=
"8dp"
android:gravity=
"center"
android:textSize=
"1
4
sp"
/>
android:textSize=
"1
2
sp"
/>
</LinearLayout>
\ No newline at end of file
GoodMoney/app/src/main/res/mipmap-xhdpi/ic_award.png
0 → 100755
View file @
ddb9925d
25.3 KB
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