Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_highgold
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_highgold
Commits
938fbeec
Commit
938fbeec
authored
Apr 16, 2020
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
cbf1b22f
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
56 additions
and
114 deletions
+56
-114
MintsApplication.java
...pp/src/main/java/com/mints/highgold/MintsApplication.java
+3
-3
UserTaskMsgBean.java
...in/java/com/mints/highgold/mvp/model/UserTaskMsgBean.java
+5
-0
LoanPresenter.java
...java/com/mints/highgold/mvp/presenters/LoanPresenter.java
+0
-36
LoanService.java
...app/src/main/java/com/mints/highgold/net/LoanService.java
+25
-57
AboutasActivity.java
...java/com/mints/highgold/ui/activitys/AboutasActivity.java
+1
-1
DrawcashActivity.java
...ava/com/mints/highgold/ui/activitys/DrawcashActivity.java
+10
-10
LoginActivity.java
...n/java/com/mints/highgold/ui/activitys/LoginActivity.java
+1
-1
WxLoginActivity.java
...java/com/mints/highgold/ui/activitys/WxLoginActivity.java
+1
-1
MainFragment.java
...ain/java/com/mints/highgold/ui/fragment/MainFragment.java
+10
-5
No files found.
highgold/app/src/main/java/com/mints/highgold/MintsApplication.java
View file @
938fbeec
...
...
@@ -88,7 +88,7 @@ public class MintsApplication extends MultiDexApplication {
private
MiitHelper
.
AppIdsUpdater
appIdsUpdater
=
new
MiitHelper
.
AppIdsUpdater
()
{
@Override
public
void
OnIdsAvalid
(
@NonNull
String
ids
)
{
System
.
out
.
println
(
"mcg __ ++++++ids: "
+
ids
);
//
System.out.println("mcg __ ++++++ids: " + ids);
oaid
=
ids
;
}
};
...
...
@@ -233,13 +233,13 @@ public class MintsApplication extends MultiDexApplication {
@Override
public
void
onSuccess
()
{
AppConfig
.
lyAdSdkInitState
=
true
;
System
.
out
.
println
(
"lyAd success"
);
//
System.out.println("lyAd success");
}
@Override
public
void
onFailed
(
int
code
)
{
AppConfig
.
lyAdSdkInitState
=
false
;
System
.
out
.
println
(
"lyAd fail"
+
code
);
//
System.out.println("lyAd fail" + code);
}
});
}
...
...
highgold/app/src/main/java/com/mints/highgold/mvp/model/UserTaskMsgBean.java
View file @
938fbeec
...
...
@@ -22,6 +22,7 @@ public class UserTaskMsgBean implements Serializable {
private
boolean
cashOut2yuan
;
// true-提现过2元
private
boolean
cashOut5yuan
;
// true-提现过5元
private
int
downLoadTaskOrder
;
//0-立言前穿山甲后
private
int
firstGiveFriendCoin
;
//新人金币
private
boolean
wxDrawFlag
;
//true可用 false无法使用
private
boolean
showAdView
;
//true显示 false隐藏
...
...
@@ -308,4 +309,8 @@ public class UserTaskMsgBean implements Serializable {
public
int
getRedPacketSecond
()
{
return
redPacketSecond
;
}
public
int
getFirstGiveFriendCoin
()
{
return
firstGiveFriendCoin
;
}
}
highgold/app/src/main/java/com/mints/highgold/mvp/presenters/LoanPresenter.java
View file @
938fbeec
...
...
@@ -134,42 +134,6 @@ public class LoanPresenter extends BasePresenter<LoanView> {
});
}
/**
* 获取红包状态
*/
public
void
getRedboxEnter
()
{
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
getFallCount
(),
new
BaseSubscriber
<
BaseResponse
<
Object
>>()
{
@Override
public
void
onCompleted
()
{
}
@Override
public
void
onError
(
Throwable
e
)
{
if
(
isLinkView
())
return
;
view
.
showToast
(
e
.
getMessage
());
}
@Override
public
void
onNext
(
BaseResponse
<
Object
>
baseResponse
)
{
if
(
isLinkView
())
return
;
int
code
=
baseResponse
.
getStatus
();
String
message
=
baseResponse
.
getMessage
();
switch
(
code
)
{
case
200
:
//成功
view
.
getRedboxEnterSuc
();
break
;
default
:
view
.
showToast
(
message
);
break
;
}
}
});
}
/**
* 获取首页喝水信息
*/
...
...
highgold/app/src/main/java/com/mints/highgold/net/LoanService.java
View file @
938fbeec
...
...
@@ -116,14 +116,6 @@ public interface LoanService {
@POST
(
"api/getAllFriends"
)
Observable
<
BaseResponse
<
FriendsRecordBean
>>
getAllFriends
();
/**
* 金币/积分兑换
*
* @return
*/
@POST
(
"api/changeCoin"
)
Observable
<
BaseResponse
<
Object
>>
changeCoin
(
@Body
Map
<
String
,
Object
>
vo
);
/**
* 获取用户配置信息
*
...
...
@@ -388,22 +380,6 @@ public interface LoanService {
@POST
(
"api/getPayAccoutMsg"
)
Observable
<
BaseResponse
<
AlipayBindBean
>>
getPayAccoutMsg
();
/**
* 获取小区疫情信息
*
* @return
*/
@POST
(
"common/queryIllMsg"
)
Observable
<
BaseResponse
<
FallBean
>>
getFallMsg
();
/**
* 小区疫情统计
*
* @return
*/
@POST
(
"common/queryIll/add"
)
Observable
<
BaseResponse
<
Object
>>
getFallCount
();
/**
* 绑定邀请码
*
...
...
@@ -420,14 +396,6 @@ public interface LoanService {
@POST
(
"api/v116/getChallageHallMsg"
)
Observable
<
BaseResponse
<
UserVersusBean
>>
getChallageHallMsg
();
/**
* 获取邀请码
*
* @return
*/
@POST
(
"api/v116/baseUserMsg"
)
Observable
<
BaseResponse
<
JsonObject
>>
getBaseUserMsg
();
/**
* 提交分享状态
*
...
...
@@ -508,32 +476,32 @@ public interface LoanService {
builder
.
interceptors
().
add
(
okHttpInterceptor
);
Retrofit
retrofit
;
if
(
BuildConfig
.
DEBUG
)
{
SPUtil
spUtil
=
SPUtil
.
getInstance
(
context
);
if
(
TextUtils
.
isEmpty
(
spUtil
.
getString
(
Constant
.
LOCAL_IP
)))
{
spUtil
.
putString
(
Constant
.
LOCAL_IP
,
"http://39.106.5.102:9082/gs-api/"
);
}
retrofit
=
new
Retrofit
.
Builder
()
.
client
(
builder
.
build
())
.
baseUrl
(
spUtil
.
getString
(
Constant
.
LOCAL_IP
))
.
addConverterFactory
(
GsonConverterFactory
.
create
())
.
addCallAdapterFactory
(
RxJavaCallAdapterFactory
.
create
())
.
build
();
}
else
{
retrofit
=
new
Retrofit
.
Builder
()
.
client
(
builder
.
build
())
.
baseUrl
(
BuildConfig
.
MainIp
)
.
addConverterFactory
(
GsonConverterFactory
.
create
())
.
addCallAdapterFactory
(
RxJavaCallAdapterFactory
.
create
())
.
build
();
}
//
if (BuildConfig.DEBUG) {
//
SPUtil spUtil = SPUtil.getInstance(context);
//
if (TextUtils.isEmpty(spUtil.getString(Constant.LOCAL_IP))) {
//
spUtil.putString(Constant.LOCAL_IP, "http://39.106.5.102:9082/gs-api/");
//
}
//
retrofit = new Retrofit.Builder()
//
.client(builder.build())
//
.baseUrl(spUtil.getString(Constant.LOCAL_IP))
//
.addConverterFactory(GsonConverterFactory.create())
//
.addCallAdapterFactory(RxJavaCallAdapterFactory.create())
//
.build();
//
} else {
//
retrofit = new Retrofit.Builder()
//
.client(builder.build())
//
.baseUrl(BuildConfig.MainIp)
//
.addConverterFactory(GsonConverterFactory.create())
//
.addCallAdapterFactory(RxJavaCallAdapterFactory.create())
//
.build();
//
}
//
retrofit = new Retrofit.Builder()
//
.client(builder.build())
//
.baseUrl(BuildConfig.MainIp)
//
.addConverterFactory(GsonConverterFactory.create())
//
.addCallAdapterFactory(RxJavaCallAdapterFactory.create())
//
.build();
retrofit
=
new
Retrofit
.
Builder
()
.
client
(
builder
.
build
())
.
baseUrl
(
BuildConfig
.
MainIp
)
.
addConverterFactory
(
GsonConverterFactory
.
create
())
.
addCallAdapterFactory
(
RxJavaCallAdapterFactory
.
create
())
.
build
();
return
retrofit
.
create
(
LoanService
.
class
);
...
...
highgold/app/src/main/java/com/mints/highgold/ui/activitys/AboutasActivity.java
View file @
938fbeec
...
...
@@ -63,7 +63,7 @@ public class AboutasActivity extends BaseActivity {
case
R
.
id
.
tv_aboutas_service
:
bundle
=
new
Bundle
();
bundle
.
putString
(
BaseWebActivity
.
BUNDLE_KEY_TITLE
,
"服务协议"
);
bundle
.
putString
(
BaseWebActivity
.
BUNDLE_KEY_URL
,
BuildConfig
.
MainIp
+
"register.html"
);
bundle
.
putString
(
BaseWebActivity
.
BUNDLE_KEY_URL
,
BuildConfig
.
MainIp
+
"
high/
register.html"
);
readyGo
(
BaseWebActivity
.
class
,
bundle
);
break
;
case
R
.
id
.
tv_aboutas_policy
:
...
...
highgold/app/src/main/java/com/mints/highgold/ui/activitys/DrawcashActivity.java
View file @
938fbeec
...
...
@@ -159,6 +159,8 @@ public class DrawcashActivity extends BaseActivity implements DrawcashView, OnLo
if
(
llDrawcashBottom
!=
null
)
{
if
(
AntiShake
.
check
(
llDrawcashBottom
.
getId
()))
return
;
}
System
.
out
.
println
(
"mcg __ drawcash onresume"
);
drawcashPresenter
.
getUserTaskMsg
();
}
...
...
@@ -218,7 +220,6 @@ public class DrawcashActivity extends BaseActivity implements DrawcashView, OnLo
btnDrawcashOne
.
setEnabled
(
false
);
}
}
else
{
btnDrawcashThree
.
setEnabled
(
false
);
btnDrawcashTwo
.
setEnabled
(
false
);
btnDrawcashOne
.
setEnabled
(
false
);
...
...
@@ -486,8 +487,8 @@ public class DrawcashActivity extends BaseActivity implements DrawcashView, OnLo
llDrawcashTop
.
setVisibility
(
View
.
VISIBLE
);
llDrawcashBottom
.
setVisibility
(
View
.
GONE
);
tvDrawcashHintTop
.
setText
(
"
每新邀请"
+
moneyArrBean
.
getNeedFs
()
+
"位有效好友即可提现,提现成功立返"
+
moneyArrBean
.
getFsGiveCoin
()
+
"金币
"
);
tvDrawcashFriendsTop
.
setText
(
"可用有效好友数:
"
+
moneyArrBean
.
getNowFriend
s
());
tvDrawcashHintTop
.
setText
(
"
邀请"
+
moneyArrBean
.
getNeedFs
()
+
"位好友且每位好友获得"
+
moneyArrBean
.
getFsGiveCoin
()
+
"金币即可提现
"
);
tvDrawcashFriendsTop
.
setText
(
"可用有效好友数:
"
+
moneyArrBean
.
getNowFriends
()
+
" / "
+
moneyArrBean
.
getNeedF
s
());
}
}
else
if
(
cash
==
150
&&
coin
>=
1500000
)
{
...
...
@@ -497,8 +498,8 @@ public class DrawcashActivity extends BaseActivity implements DrawcashView, OnLo
llDrawcashTop
.
setVisibility
(
View
.
VISIBLE
);
llDrawcashBottom
.
setVisibility
(
View
.
GONE
);
tvDrawcashHintTop
.
setText
(
"
每新邀请"
+
moneyArrBean
.
getNeedFs
()
+
"位有效好友即可提现,提现成功立返"
+
moneyArrBean
.
getFsGiveCoin
()
+
"金币
"
);
tvDrawcashFriendsTop
.
setText
(
"可用有效好友数:
"
+
moneyArrBean
.
getNowFriend
s
());
tvDrawcashHintTop
.
setText
(
"
邀请"
+
moneyArrBean
.
getNeedFs
()
+
"位好友且每位好友获得"
+
moneyArrBean
.
getFsGiveCoin
()
+
"金币即可提现
"
);
tvDrawcashFriendsTop
.
setText
(
"可用有效好友数:
"
+
moneyArrBean
.
getNowFriends
()
+
" / "
+
moneyArrBean
.
getNeedF
s
());
}
}
else
if
(
cash
==
200
&&
coin
>=
2000000
)
{
if
(
outMoneyArr
!=
null
&&
outMoneyArr
.
size
()
>=
3
)
{
...
...
@@ -506,8 +507,8 @@ public class DrawcashActivity extends BaseActivity implements DrawcashView, OnLo
llDrawcashTop
.
setVisibility
(
View
.
GONE
);
llDrawcashBottom
.
setVisibility
(
View
.
VISIBLE
);
tvDrawcashHintBottom
.
setText
(
"
每新邀请"
+
moneyArrBean
.
getNeedFs
()
+
"位有效好友即可提现,提现成功立返"
+
moneyArrBean
.
getFsGiveCoin
()
+
"金币
"
);
tvDrawcashFriendsBottom
.
setText
(
"可用有效好友数:
"
+
moneyArrBean
.
getNowFriend
s
());
tvDrawcashHintBottom
.
setText
(
"
邀请"
+
moneyArrBean
.
getNeedFs
()
+
"位好友且每位好友获得"
+
moneyArrBean
.
getFsGiveCoin
()
+
"金币即可提现
"
);
tvDrawcashFriendsBottom
.
setText
(
"可用有效好友数:
"
+
moneyArrBean
.
getNowFriends
()
+
" / "
+
moneyArrBean
.
getNeedF
s
());
}
}
else
if
(
cash
==
500
&&
coin
>=
5000000
)
{
...
...
@@ -515,9 +516,8 @@ public class DrawcashActivity extends BaseActivity implements DrawcashView, OnLo
DrawcashBean
.
CashOutMoneyArrBean
moneyArrBean
=
outMoneyArr
.
get
(
4
);
llDrawcashTop
.
setVisibility
(
View
.
GONE
);
llDrawcashBottom
.
setVisibility
(
View
.
VISIBLE
);
tvDrawcashHintBottom
.
setText
(
"每新邀请"
+
moneyArrBean
.
getNeedFs
()
+
"位有效好友即可提现,提现成功立返"
+
moneyArrBean
.
getFsGiveCoin
()
+
"金币"
);
tvDrawcashFriendsBottom
.
setText
(
"可用有效好友数:"
+
moneyArrBean
.
getNowFriends
());
tvDrawcashHintBottom
.
setText
(
"邀请"
+
moneyArrBean
.
getNeedFs
()
+
"位好友且每位好友获得"
+
moneyArrBean
.
getFsGiveCoin
()
+
"金币即可提现"
);
tvDrawcashFriendsBottom
.
setText
(
"可用有效好友数: "
+
moneyArrBean
.
getNowFriends
()
+
" / "
+
moneyArrBean
.
getNeedFs
());
}
}
else
{
llDrawcashTop
.
setVisibility
(
View
.
GONE
);
...
...
highgold/app/src/main/java/com/mints/highgold/ui/activitys/LoginActivity.java
View file @
938fbeec
...
...
@@ -323,7 +323,7 @@ public class LoginActivity extends BaseActivity implements LoginView {
case
R
.
id
.
tv_login_agreement
:
bundle
=
new
Bundle
();
bundle
.
putString
(
BaseWebActivity
.
BUNDLE_KEY_TITLE
,
"用户注册协议"
);
bundle
.
putString
(
BaseWebActivity
.
BUNDLE_KEY_URL
,
BuildConfig
.
MainIp
+
"register.html"
);
bundle
.
putString
(
BaseWebActivity
.
BUNDLE_KEY_URL
,
BuildConfig
.
MainIp
+
"
high/
register.html"
);
readyGo
(
BaseWebActivity
.
class
,
bundle
);
break
;
case
R
.
id
.
tv_login_policy
:
...
...
highgold/app/src/main/java/com/mints/highgold/ui/activitys/WxLoginActivity.java
View file @
938fbeec
...
...
@@ -212,7 +212,7 @@ public class WxLoginActivity extends BaseActivity implements WxLoginView, OnLogi
case
R
.
id
.
tv_wxlogin_agreement
:
bundle
=
new
Bundle
();
bundle
.
putString
(
BaseWebActivity
.
BUNDLE_KEY_TITLE
,
"用户注册协议"
);
bundle
.
putString
(
BaseWebActivity
.
BUNDLE_KEY_URL
,
BuildConfig
.
MainIp
+
"register.html"
);
bundle
.
putString
(
BaseWebActivity
.
BUNDLE_KEY_URL
,
BuildConfig
.
MainIp
+
"
high/
register.html"
);
readyGo
(
BaseWebActivity
.
class
,
bundle
);
break
;
case
R
.
id
.
tv_wxlogin_policy
:
...
...
highgold/app/src/main/java/com/mints/highgold/ui/fragment/MainFragment.java
View file @
938fbeec
...
...
@@ -405,9 +405,9 @@ public class MainFragment extends BaseFragment
Bundle
bundle
;
switch
(
view
.
getId
())
{
case
R
.
id
.
tv_fragment_main_whatgold
:
// 如何赚金币
System
.
out
.
println
(
"mcg __ getPesudoUniqueID:"
+
DevicesUtil
.
getPesudoUniqueID
());
System
.
out
.
println
(
"mcg __ getUUID:"
+
DevicesUtil
.
getUUID
());
System
.
out
.
println
(
"mcg __ googld device UUID:"
+
new
DeviceUuidFactory
(
getContext
()).
getDeviceUuid
().
toString
());
//
System.out.println("mcg __ getPesudoUniqueID:"+ DevicesUtil.getPesudoUniqueID());
//
System.out.println("mcg __ getUUID:"+ DevicesUtil.getUUID());
//
System.out.println("mcg __ googld device UUID:"+ new DeviceUuidFactory(getContext()).getDeviceUuid().toString());
readyGo
(
WhatGoldActivity
.
class
);
break
;
...
...
@@ -586,6 +586,11 @@ public class MainFragment extends BaseFragment
userManager
.
setAdShowFlag
(
data
.
isAdFlag
());
// 显示游戏文字
tvFragmentMainFriendHint
.
setText
(
new
SpanUtils
().
append
(
"每邀一位得"
)
.
append
(
data
.
getFirstGiveFriendCoin
()
+
""
).
setForegroundColor
(
getResources
().
getColor
(
R
.
color
.
main_mints
))
.
create
());
// 游戏赚按钮
boolean
main
=
getActivity
()
instanceof
MainActivity
;
if
(
data
.
isAdFlag
())
{
...
...
@@ -1308,7 +1313,7 @@ public class MainFragment extends BaseFragment
// 显示游戏文字
tvFragmentMainFriendHint
.
setText
(
new
SpanUtils
().
append
(
"每邀一位得"
)
.
append
(
"
3
000"
).
setForegroundColor
(
getResources
().
getColor
(
R
.
color
.
main_mints
))
.
append
(
"
1
000"
).
setForegroundColor
(
getResources
().
getColor
(
R
.
color
.
main_mints
))
.
create
());
// 显示红包动画
...
...
@@ -1370,7 +1375,7 @@ public class MainFragment extends BaseFragment
if
(
dialog
!=
null
&&
dialog
.
isShowing
())
{
Bundle
bundle
=
new
Bundle
();
bundle
.
putString
(
BaseWebActivity
.
BUNDLE_KEY_TITLE
,
"用户协议"
);
bundle
.
putString
(
BaseWebActivity
.
BUNDLE_KEY_URL
,
BuildConfig
.
MainIp
+
"register.html"
);
bundle
.
putString
(
BaseWebActivity
.
BUNDLE_KEY_URL
,
BuildConfig
.
MainIp
+
"
high/
register.html"
);
readyGo
(
BaseWebActivity
.
class
,
bundle
);
}
...
...
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