Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_youyou
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_youyou
Commits
59c8427b
Commit
59c8427b
authored
Mar 31, 2021
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
cd6e5f16
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
31 additions
and
71 deletions
+31
-71
build.gradle
app/build.gradle
+0
-1
YwhzManager.kt
app/src/main/java/com/wenshu/youyou/manager/YwhzManager.kt
+0
-48
CpdBean.kt
app/src/main/java/com/wenshu/youyou/mvp/model/CpdBean.kt
+12
-0
FriendsPresenter.kt
...java/com/wenshu/youyou/mvp/presenters/FriendsPresenter.kt
+2
-1
TaskPresenter.kt
...in/java/com/wenshu/youyou/mvp/presenters/TaskPresenter.kt
+4
-9
TaskView.kt
app/src/main/java/com/wenshu/youyou/mvp/views/TaskView.kt
+2
-1
LoanService.java
app/src/main/java/com/wenshu/youyou/net/LoanService.java
+2
-1
FriendsFragment.kt
...ain/java/com/wenshu/youyou/ui/fragment/FriendsFragment.kt
+0
-2
TaskCpdFragment.kt
...ain/java/com/wenshu/youyou/ui/fragment/TaskCpdFragment.kt
+9
-8
No files found.
app/build.gradle
View file @
59c8427b
...
...
@@ -65,7 +65,6 @@ android {
buildConfigField
"boolean"
,
"LOG_DEBUG"
,
"true"
buildConfigField
"String"
,
"AppKeyPre"
,
"\"abcd\""
buildConfigField
"String"
,
"MainIp"
,
DEBUG_URL
// buildConfigField "String", "MainIp", RELEASE_URL
//混淆
minifyEnabled
false
...
...
app/src/main/java/com/wenshu/youyou/manager/YwhzManager.kt
deleted
100644 → 0
View file @
cd6e5f16
//package com.wenshu.youyou.manager
//
//import android.app.Application
//import android.os.Build
//import android.text.TextUtils
//import com.component.dly.xzzq_ywsdk.YwSDK.Companion.setDebugMode
//import com.wenshu.youyou.BuildConfig
//import com.wenshu.youyou.WenshuApplication
//
///**
// * 描述:鱼丸盒子游戏
// * 作者:孟崔广
// */
//object YwhzManager {
//
// private const val APPID_DEBUG = ""
// private const val APPSECRET_DEBUG = ""
//
// private const val APPID_RELEASE = ""
// private const val APPSECRET_RELEASE = ""
//
// fun init(application: Application) {
// val userManager = UserManager.getInstance()
// var userID = userManager.userID
// if (!userManager.userIsLogin() || TextUtils.isEmpty(userID)) {
// // 用户id为空 或 未登录 = 游客
// userID = "0"
// }
//
// val appid: String
// val appSecret: String
// if (BuildConfig.DEBUG) {
// appid = APPID_DEBUG
// appSecret = APPSECRET_DEBUG
// } else {
// appid = APPID_RELEASE
// appSecret = APPSECRET_RELEASE
// }
// var oaid: String = ""
// if (Build.VERSION.SDK_INT > 28) {
// if (!TextUtils.isEmpty(WenshuApplication.OAID)) {
// oaid = WenshuApplication.OAID
// }
// }
// setDebugMode()
// init(application, appSecret, appid, userID, "1", oaid)
// }
//}
\ No newline at end of file
app/src/main/java/com/wenshu/youyou/mvp/model/CpdBean.kt
0 → 100644
View file @
59c8427b
package
com.wenshu.youyou.mvp.model
import
java.io.Serializable
data class
CpdBean
(
val
needSeconds
:
Int
=
0
,
val
coin
:
Int
=
0
,
val
CPD
:
Int
=
0
,
val
CPD_SYD
:
Int
=
0
,
val
cpdOrder
:
String
=
""
,
val
coinSh
:
Int
=
0
,
val
coinSyd
:
Int
=
0
)
:
Serializable
\ No newline at end of file
app/src/main/java/com/wenshu/youyou/mvp/presenters/FriendsPresenter.kt
View file @
59c8427b
...
...
@@ -35,6 +35,7 @@ class FriendsPresenter : BasePresenter<FriendsView>() {
when
(
baseResponse
.
status
)
{
200
->
{
sonCashoutChallengeMsg
()
view
.
getFriendsHallMsgSuc
(
baseResponse
.
data
)
}
else
->
{
...
...
@@ -185,7 +186,7 @@ class FriendsPresenter : BasePresenter<FriendsView>() {
/**
* 新版分红逻辑
*/
fun
sonCashoutChallengeMsg
()
{
private
fun
sonCashoutChallengeMsg
()
{
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
sonCashoutChallengeMsg
(),
...
...
app/src/main/java/com/wenshu/youyou/mvp/presenters/TaskPresenter.kt
View file @
59c8427b
...
...
@@ -16,6 +16,7 @@ import com.wenshu.youyou.utils.LogUtil
import
com.wenshu.library.net.neterror.BaseSubscriber
import
com.wenshu.library.net.neterror.Throwable
import
com.wenshu.library.utils.json.JsonUtil
import
com.wenshu.youyou.mvp.model.CpdBean
class
TaskPresenter
:
BasePresenter
<
TaskView
>()
{
fun
getShCpdTime
()
{
...
...
@@ -25,7 +26,7 @@ class TaskPresenter : BasePresenter<TaskView>() {
view
.
showLoading
(
"加载中..."
)
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
getShCpdTime
(
vo
),
object
:
BaseSubscriber
<
BaseResponse
<
JsonObject
>>()
{
object
:
BaseSubscriber
<
BaseResponse
<
CpdBean
>>()
{
override
fun
onCompleted
()
{
}
...
...
@@ -35,20 +36,14 @@ class TaskPresenter : BasePresenter<TaskView>() {
view
.
hideLoading
()
}
override
fun
onNext
(
baseResponse
:
BaseResponse
<
JsonObject
>)
{
override
fun
onNext
(
baseResponse
:
BaseResponse
<
CpdBean
>)
{
if
(
isLinkView
)
return
val
code
=
baseResponse
.
status
val
data
=
baseResponse
.
data
when
(
code
)
{
200
->
{
if
(
data
!=
null
)
{
view
.
getShCpdTimeSuc
(
data
.
get
(
"needSeconds"
).
asInt
,
data
.
get
(
"coin"
).
asInt
,
data
.
get
(
"CPD"
).
asInt
,
data
.
get
(
"CPD_SYD"
).
asInt
,
data
.
get
(
"cpdOrder"
).
asString
)
view
.
getShCpdTimeSuc
(
baseResponse
.
data
)
}
}
}
...
...
app/src/main/java/com/wenshu/youyou/mvp/views/TaskView.kt
View file @
59c8427b
package
com.wenshu.youyou.mvp.views
import
com.wenshu.youyou.mvp.model.CpdBean
import
com.wenshu.youyou.mvp.model.CpdModelBean
import
com.wenshu.youyou.mvp.model.SydCpdListBean
interface
TaskView
:
BaseView
{
fun
getShCpdTimeSuc
(
time
:
Int
,
coin
:
Int
,
CPD
:
Int
,
CPD_SYD
:
Int
,
CPD_ORDER
:
String
?
)
fun
getShCpdTimeSuc
(
data
:
CpdBean
)
fun
getCpdModelSuc
(
dataBean
:
CpdModelBean
.
DataBean
)
...
...
app/src/main/java/com/wenshu/youyou/net/LoanService.java
View file @
59c8427b
...
...
@@ -10,6 +10,7 @@ import com.wenshu.youyou.mvp.model.BaseResponse;
import
com.wenshu.youyou.mvp.model.CashoutChallengeBean
;
import
com.wenshu.youyou.mvp.model.ClickTurnBean
;
import
com.wenshu.youyou.mvp.model.CommonParamBean
;
import
com.wenshu.youyou.mvp.model.CpdBean
;
import
com.wenshu.youyou.mvp.model.DrawcashBean
;
import
com.wenshu.youyou.mvp.model.DrawcashRecordBean
;
import
com.wenshu.youyou.mvp.model.FriendHallMsgBean
;
...
...
@@ -538,7 +539,7 @@ public interface LoanService {
* @return
*/
@POST
(
"api/114/getCPDBaseMsg"
)
Observable
<
BaseResponse
<
JsonObject
>>
getShCpdTime
(
@Body
Map
<
String
,
Object
>
vo
);
Observable
<
BaseResponse
<
CpdBean
>>
getShCpdTime
(
@Body
Map
<
String
,
Object
>
vo
);
/**
* 获取用户配置信息
...
...
app/src/main/java/com/wenshu/youyou/ui/fragment/FriendsFragment.kt
View file @
59c8427b
...
...
@@ -182,8 +182,6 @@ class FriendsFragment(private var isResume: Boolean = false) : BaseFragment(), F
// 刷新分红数据
friendsPresenter
.
getFriendHallMsg
()
friendsPresenter
.
sonCashoutChallengeMsg
()
when
(
view_pager_friends
.
currentItem
)
{
0
->
{
friendsPresenter
.
getContributionBigLeaders
()
...
...
app/src/main/java/com/wenshu/youyou/ui/fragment/TaskCpdFragment.kt
View file @
59c8427b
...
...
@@ -38,6 +38,7 @@ import com.scwang.smartrefresh.layout.api.RefreshLayout
import
com.scwang.smartrefresh.layout.listener.OnRefreshListener
import
com.tz.sdk.coral.ad.CoralAD
import
com.tz.sdk.coral.callback.h5.DownloadProcess
import
com.wenshu.youyou.mvp.model.CpdBean
import
kotlinx.android.synthetic.main.fragment_task_cpd.*
private
val
TAG
=
TaskCpdFragment
::
class
.
java
.
simpleName
...
...
@@ -139,12 +140,12 @@ class TaskCpdFragment : BaseFragment(), TaskView,
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_task
override
fun
getShCpdTimeSuc
(
time
:
Int
,
coin
:
Int
,
CPD
:
Int
,
CPD_SYD
:
Int
,
CPD_ORDER
:
String
?
)
{
needUseTime
=
time
shCoin
=
coin
sydCoin
=
coin
shMax
=
CPD
cpdMax
=
CPD_SYD
override
fun
getShCpdTimeSuc
(
data
:
CpdBean
)
{
needUseTime
=
data
.
needSeconds
shCoin
=
data
.
coinSh
sydCoin
=
data
.
coinSyd
shMax
=
data
.
CPD
cpdMax
=
data
.
CPD_SYD
if
((
shMax
+
cpdMax
)
<=
0
)
{
hideLoading
()
...
...
@@ -164,13 +165,13 @@ class TaskCpdFragment : BaseFragment(), TaskView,
cpdLoadCountTime
=
0
mFakeTaskList
.
clear
()
if
(
TextUtils
.
isEmpty
(
CPD_ORDER
))
{
if
(
TextUtils
.
isEmpty
(
data
.
cpdOrder
))
{
notifyDataAndShowAd
()
return
}
// 珊瑚和CPD展示顺序
when
(
CPD_ORDER
)
{
when
(
data
.
cpdOrder
)
{
"CPD_SYD"
->
{
when
{
cpdMax
>
0
->
{
...
...
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