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
154bb8a9
Commit
154bb8a9
authored
Nov 16, 2020
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加视频逻辑,界面调整,解决冲突
parent
fde0f721
Changes
20
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
305 additions
and
400 deletions
+305
-400
build.gradle
GoodMoney/app/build.gradle
+2
-2
AndroidManifest.xml
GoodMoney/app/src/main/AndroidManifest.xml
+0
-11
MintsApplication.java
...p/src/main/java/com/mints/goodmoney/MintsApplication.java
+7
-6
BaseVideoAd.kt
...src/main/java/com/mints/goodmoney/ad/video/BaseVideoAd.kt
+88
-0
CsjVedioAdManager.java
.../java/com/mints/goodmoney/ad/video/CsjVedioAdManager.java
+13
-102
VedioAdingManager.java
.../java/com/mints/goodmoney/ad/video/VedioAdingManager.java
+6
-4
YlhVedioAdManager.java
.../java/com/mints/goodmoney/ad/video/YlhVedioAdManager.java
+6
-92
Constant.kt
.../app/src/main/java/com/mints/goodmoney/common/Constant.kt
+4
-0
BxmManager.kt
...p/src/main/java/com/mints/goodmoney/manager/BxmManager.kt
+7
-3
MainVedioMsgBean.java
.../java/com/mints/goodmoney/mvp/model/MainVedioMsgBean.java
+6
-6
HomePresenter.kt
.../java/com/mints/goodmoney/mvp/presenters/HomePresenter.kt
+0
-22
VedioAdManagerView.java
...ava/com/mints/goodmoney/mvp/views/VedioAdManagerView.java
+0
-1
LoanService.java
...pp/src/main/java/com/mints/goodmoney/net/LoanService.java
+1
-9
AwardActivity.kt
...in/java/com/mints/goodmoney/ui/activitys/AwardActivity.kt
+32
-16
CoinRecordActivity.kt
...va/com/mints/goodmoney/ui/activitys/CoinRecordActivity.kt
+1
-1
DrawcashActivity.kt
...java/com/mints/goodmoney/ui/activitys/DrawcashActivity.kt
+1
-1
MainFragment.kt
...main/java/com/mints/goodmoney/ui/fragment/MainFragment.kt
+92
-104
MyFragment.kt
...c/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
+10
-0
activity_drawcash.xml
GoodMoney/app/src/main/res/layout/activity_drawcash.xml
+1
-9
item_fragment_main_my_title.xml
...y/app/src/main/res/layout/item_fragment_main_my_title.xml
+28
-11
No files found.
GoodMoney/app/build.gradle
View file @
154bb8a9
...
...
@@ -107,8 +107,8 @@ android {
}
productFlavors
{
//
goodmoneypkg {}
share_goodmoney
{}
goodmoneypkg
{}
//
share_goodmoney {}
}
productFlavors
.
all
{
...
...
GoodMoney/app/src/main/AndroidManifest.xml
View file @
154bb8a9
...
...
@@ -281,17 +281,6 @@
android:name=
"com.qq.e.ads.LandscapeADActivity"
android:configChanges=
"keyboard|keyboardHidden|orientation|screenSize"
android:screenOrientation=
"landscape"
/>
<!-- 变现猫 -->
<!-- <provider-->
<!-- android:name="android.support.v4.content.FileProvider"-->
<!-- android:authorities="${applicationId}.fileprovider"-->
<!-- android:exported="false"-->
<!-- android:grantUriPermissions="true">-->
<!-- <meta-data-->
<!-- android:name="android.support.FILE_PROVIDER_PATHS"-->
<!-- android:resource="@xml/new_app_file_paths" />-->
<!-- </provider>-->
</application>
</manifest>
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/MintsApplication.java
View file @
154bb8a9
...
...
@@ -4,6 +4,7 @@ import android.content.Context;
import
android.content.Intent
;
import
android.os.Build
;
import
android.text.TextUtils
;
import
android.webkit.WebView
;
import
androidx.localbroadcastmanager.content.LocalBroadcastManager
;
import
androidx.multidex.MultiDex
;
...
...
@@ -85,12 +86,12 @@ public class MintsApplication extends MultiDexApplication {
initMiitHelper
();
//Android 9 or above must be set
//
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
//
String processName = getProcessName();
//
if (!getPackageName().equals(processName)) {
//
WebView.setDataDirectorySuffix(processName);
//
}
//
}
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
P
)
{
String
processName
=
getProcessName
();
if
(!
getPackageName
().
equals
(
processName
))
{
WebView
.
setDataDirectorySuffix
(
processName
);
}
}
// 子线程初始化三方SDK
String
processName
=
SystemUtils
.
INSTANCE
.
getProcessName
(
this
,
android
.
os
.
Process
.
myPid
());
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/video/BaseVideoAd.kt
0 → 100644
View file @
154bb8a9
package
com.mints.goodmoney.ad.video
import
android.app.Activity
import
android.content.DialogInterface
import
android.text.TextUtils
import
android.view.KeyEvent
import
com.mints.goodmoney.MintsApplication
import
com.mints.goodmoney.mvp.views.BaseView
import
com.mints.goodmoney.ui.widgets.LoadingDialog
import
com.mints.goodmoney.utils.ToastUtil
open
class
BaseVideoAd
(
activity
:
Activity
)
:
BaseView
{
var
activity
:
Activity
var
progressDialog
:
LoadingDialog
?
=
null
init
{
this
.
activity
=
activity
}
override
fun
getBaseApplication
():
MintsApplication
{
return
activity
.
getApplication
()
as
MintsApplication
}
/**
* 显示加载进度条(自定义message)
*
* @param message
*/
override
fun
showLoading
(
message
:
String
?)
{
if
(
activity
.
getWindow
()
!=
null
&&
!
activity
.
isFinishing
())
{
if
(
progressDialog
==
null
)
{
progressDialog
=
LoadingDialog
(
activity
)
progressDialog
!!
.
setLoadText
(
message
)
}
progressDialog
?.
show
()
setProgressOnTouchOutside
(
false
)
setProgressNoDismiss
()
}
}
/**
* 设置Progress是否手触消失
*
* @param onTouchOutside
*/
open
fun
setProgressOnTouchOutside
(
onTouchOutside
:
Boolean
)
{
if
(
progressDialog
!=
null
)
progressDialog
!!
.
setCanceledOnTouchOutside
(
onTouchOutside
)
}
/**
* 设置点击返回是否消失加载进度条
*/
fun
setProgressNoDismiss
()
{
if
(
progressDialog
!=
null
&&
progressDialog
!!
.
isShowing
())
{
progressDialog
!!
.
setOnKeyListener
(
DialogInterface
.
OnKeyListener
{
dialog
,
keyCode
,
event
->
if
(
keyCode
==
KeyEvent
.
KEYCODE_BACK
)
{
true
}
else
false
})
}
}
/**
* 消失加载进度条
*/
override
fun
hideLoading
()
{
try
{
if
(
activity
.
getWindow
()
!=
null
&&
!
activity
.
isFinishing
())
{
if
(
progressDialog
!=
null
&&
progressDialog
!!
.
isShowing
())
{
progressDialog
!!
.
dismiss
()
progressDialog
=
null
}
}
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
}
finally
{
progressDialog
=
null
}
}
override
fun
showToast
(
msg
:
String
?)
{
if
(!
TextUtils
.
isEmpty
(
msg
))
ToastUtil
.
show
(
MintsApplication
.
getContext
(),
msg
)
}
open
fun
loadAd
(
activity
:
Activity
,
curCoin
:
Int
,
carrierType
:
String
,
extraId
:
String
){}
open
fun
onDestory
(){}
}
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/video/CsjVedioAdManager.java
View file @
154bb8a9
package
com
.
mints
.
goodmoney
.
ad
.
video
;
import
android.app.Activity
;
import
android.content.DialogInterface
;
import
android.text.TextUtils
;
import
android.view.KeyEvent
;
import
com.bytedance.sdk.openadsdk.AdSlot
;
import
com.bytedance.sdk.openadsdk.TTAdConstant
;
import
com.bytedance.sdk.openadsdk.TTAdNative
;
import
com.bytedance.sdk.openadsdk.TTRewardVideoAd
;
import
com.mints.goodmoney.BuildConfig
;
import
com.mints.goodmoney.MintsApplication
;
import
com.mints.goodmoney.common.Constant
;
import
com.mints.goodmoney.manager.TTNativeExpressManager
;
import
com.mints.goodmoney.manager.TrackManager
;
...
...
@@ -18,11 +14,9 @@ import com.mints.goodmoney.manager.TtCsjAdManager;
import
com.mints.goodmoney.manager.UserManager
;
import
com.mints.goodmoney.mvp.presenters.CsjVedioAdPresenter
;
import
com.mints.goodmoney.mvp.views.VedioAdManagerView
;
import
com.mints.goodmoney.ui.widgets.LoadingDialog
;
import
com.mints.goodmoney.utils.LogUtil
;
import
com.mints.goodmoney.utils.MD5
;
import
com.mints.goodmoney.utils.SPUtil
;
import
com.mints.goodmoney.utils.ToastUtil
;
import
com.mints.library.utils.json.JsonUtil
;
import
java.util.HashMap
;
...
...
@@ -30,7 +24,7 @@ import java.util.HashMap;
/**
* 穿山甲激励视频广告
*/
public
class
CsjVedioAdManager
implements
VedioAdManagerView
{
public
class
CsjVedioAdManager
extends
BaseVideoAd
{
private
static
CsjVedioAdManager
_inst
;
private
SPUtil
spUtil
;
...
...
@@ -42,7 +36,6 @@ public class CsjVedioAdManager implements VedioAdManagerView {
Activity
activity
;
private
TTAdNative
ttAdNative
;
private
TTRewardVideoAd
mttRewardVideoAd
;
protected
LoadingDialog
progressDialog
;
private
UserManager
userManager
;
private
boolean
isClickScreen
=
true
;
// 是否点击屏幕跳转广告
...
...
@@ -57,6 +50,7 @@ public class CsjVedioAdManager implements VedioAdManagerView {
}
private
CsjVedioAdManager
(
Activity
activity
)
{
super
(
activity
);
init
(
activity
);
return
;
}
...
...
@@ -69,19 +63,20 @@ public class CsjVedioAdManager implements VedioAdManagerView {
TTNativeExpressManager
ttNativeExpressManager
=
new
TTNativeExpressManager
();
ttAdNative
=
ttNativeExpressManager
.
initTTAd
(
false
);
csjVedioAdPresenter
=
new
CsjVedioAdPresenter
();
csjVedioAdPresenter
.
attachView
(
this
);
//
csjVedioAdPresenter = new CsjVedioAdPresenter();
//
csjVedioAdPresenter.attachView(this);
}
public
void
destory
()
{
@Override
public
void
onDestory
()
{
if
(
mttRewardVideoAd
!=
null
)
{
mttRewardVideoAd
.
setRewardAdInteractionListener
(
null
);
}
if
(
csjVedioAdPresenter
!=
null
)
{
csjVedioAdPresenter
.
dispose
();
csjVedioAdPresenter
.
detachView
();
}
//
if (csjVedioAdPresenter != null) {
//
csjVedioAdPresenter.dispose();
//
csjVedioAdPresenter.detachView();
//
}
activity
=
null
;
}
...
...
@@ -91,7 +86,8 @@ public class CsjVedioAdManager implements VedioAdManagerView {
*
* @param carrierType
*/
public
void
loadCsjAd
(
Activity
activity
,
int
curCoin
,
String
carrierType
,
String
extraId
)
{
@Override
public
void
loadAd
(
Activity
activity
,
int
curCoin
,
String
carrierType
,
String
extraId
)
{
this
.
activity
=
activity
;
isClickScreen
=
true
;
this
.
curCoin
=
curCoin
;
...
...
@@ -145,7 +141,7 @@ public class CsjVedioAdManager implements VedioAdManagerView {
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_CSJ
,
Constant
.
EVENT_TYPE_ONE
,
String
.
valueOf
(
code
),
message
);
LogUtil
.
d
(
"CsjVedioAdManager"
,
"onError "
+
code
+
message
);
LogUtil
.
d
(
"CsjVedioAdManager"
,
"onError "
+
code
+
message
);
if
(
csjVedioAdListener
!=
null
)
{
csjVedioAdListener
.
csjVedioAdFail
();
}
...
...
@@ -225,13 +221,6 @@ public class CsjVedioAdManager implements VedioAdManagerView {
});
}
@Override
public
void
checkSuc
(
boolean
lyCmtFlag
)
{
if
(
csjVedioAdListener
!=
null
)
{
csjVedioAdListener
.
csjVedioAdSuccess
();
}
}
/**
* 封装广告数据,请求服务器
*
...
...
@@ -266,88 +255,10 @@ public class CsjVedioAdManager implements VedioAdManagerView {
return
vo
;
}
@Override
public
MintsApplication
getBaseApplication
()
{
return
(
MintsApplication
)
activity
.
getApplication
();
}
/**
* 显示加载进度条(自定义message)
*
* @param message
*/
@Override
public
void
showLoading
(
String
message
)
{
if
(
activity
.
getWindow
()
!=
null
&&
!
activity
.
isFinishing
())
{
if
(
progressDialog
==
null
)
{
progressDialog
=
new
LoadingDialog
(
activity
);
progressDialog
.
setLoadText
(
message
);
}
progressDialog
.
show
();
setProgressOnTouchOutside
(
false
);
setProgressNoDismiss
();
}
}
/**
* 设置Progress是否手触消失
*
* @param onTouchOutside
*/
public
void
setProgressOnTouchOutside
(
boolean
onTouchOutside
)
{
if
(
progressDialog
!=
null
)
progressDialog
.
setCanceledOnTouchOutside
(
onTouchOutside
);
}
/**
* 设置点击返回是否消失加载进度条
*/
public
final
void
setProgressNoDismiss
()
{
if
(
progressDialog
!=
null
&&
progressDialog
.
isShowing
())
{
progressDialog
.
setOnKeyListener
(
new
DialogInterface
.
OnKeyListener
()
{
@Override
public
boolean
onKey
(
DialogInterface
dialog
,
int
keyCode
,
KeyEvent
event
)
{
if
(
keyCode
==
KeyEvent
.
KEYCODE_BACK
)
{
return
true
;
}
return
false
;
}
});
}
}
/**
* 消失加载进度条
*/
@Override
public
void
hideLoading
()
{
try
{
if
(
activity
.
getWindow
()
!=
null
&&
!
activity
.
isFinishing
())
{
if
(
progressDialog
!=
null
&&
progressDialog
.
isShowing
())
{
progressDialog
.
dismiss
();
progressDialog
=
null
;
}
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
finally
{
progressDialog
=
null
;
}
}
@Override
public
void
showToast
(
String
msg
)
{
if
(!
TextUtils
.
isEmpty
(
msg
))
ToastUtil
.
show
(
MintsApplication
.
getContext
(),
msg
);
}
public
void
setCsjVedioAdListener
(
CsjVedioAdListener
csjVedioAdListener
)
{
this
.
csjVedioAdListener
=
csjVedioAdListener
;
}
public
interface
CsjVedioAdListener
{
void
csjVedioAdFail
();
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/video/VedioAdingManager.java
View file @
154bb8a9
...
...
@@ -189,12 +189,12 @@ public class VedioAdingManager {
public
void
onDestory
()
{
if
(
csjVedioAdManager
!=
null
)
{
csjVedioAdManager
.
setCsjVedioAdListener
(
null
);
csjVedioAdManager
.
d
estory
();
csjVedioAdManager
.
onD
estory
();
csjVedioAdManager
=
null
;
}
if
(
ylhVedioAdManager
!=
null
)
{
ylhVedioAdManager
.
setYlhVedioAdListener
(
null
);
ylhVedioAdManager
.
d
estory
();
ylhVedioAdManager
.
onD
estory
();
ylhVedioAdManager
=
null
;
}
...
...
@@ -210,7 +210,9 @@ public class VedioAdingManager {
*/
public
interface
VedioAdingListener
{
void
vedioAdingListenerError
(
String
adType
);
void
vedioAdingListenerFail
(
String
adType
);
void
vedioAdingListenerSuccess
(
String
adType
);
}
...
...
@@ -255,7 +257,7 @@ public class VedioAdingManager {
isVedioAdDownload
=
true
;
}
});
ylhVedioAdManager
.
loa
nYlh
Ad
(
activity
,
bean
.
getCurCoin
(),
bean
.
getCarrierType
(),
bean
.
getExtraId
());
ylhVedioAdManager
.
loa
d
Ad
(
activity
,
bean
.
getCurCoin
(),
bean
.
getCarrierType
(),
bean
.
getExtraId
());
}
else
if
(
TextUtils
.
equals
(
vedioAdType
,
Constant
.
CSJ_VEDIO_AD
))
{
// 穿山甲激励视频
if
(
csjVedioAdManager
==
null
)
{
...
...
@@ -290,7 +292,7 @@ public class VedioAdingManager {
isVedioAdDownload
=
true
;
}
});
csjVedioAdManager
.
load
Csj
Ad
(
activity
,
bean
.
getCurCoin
(),
bean
.
getCarrierType
(),
bean
.
getExtraId
());
csjVedioAdManager
.
loadAd
(
activity
,
bean
.
getCurCoin
(),
bean
.
getCarrierType
(),
bean
.
getExtraId
());
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/video/YlhVedioAdManager.java
View file @
154bb8a9
package
com
.
mints
.
goodmoney
.
ad
.
video
;
import
android.app.Activity
;
import
android.content.DialogInterface
;
import
android.os.SystemClock
;
import
android.text.TextUtils
;
import
android.view.KeyEvent
;
import
com.mints.goodmoney.MintsApplication
;
import
com.mints.goodmoney.common.Constant
;
import
com.mints.goodmoney.manager.TrackManager
;
import
com.mints.goodmoney.manager.YlhAdManager
;
import
com.mints.goodmoney.mvp.presenters.YlhVedioAdPresenter
;
import
com.mints.goodmoney.mvp.views.VedioAdManagerView
;
import
com.mints.goodmoney.ui.widgets.LoadingDialog
;
import
com.mints.goodmoney.utils.LogUtil
;
import
com.mints.goodmoney.utils.ToastUtil
;
import
com.qq.e.ads.rewardvideo.RewardVideoAD
;
import
com.qq.e.ads.rewardvideo.RewardVideoADListener
;
import
com.qq.e.comm.util.AdError
;
...
...
@@ -24,7 +18,7 @@ import java.util.HashMap;
/**
* 优量汇视频
*/
public
class
YlhVedioAdManager
implements
VedioAdManagerView
{
public
class
YlhVedioAdManager
extends
BaseVideoAd
implements
VedioAdManagerView
{
private
static
YlhVedioAdManager
_inst
;
...
...
@@ -38,8 +32,6 @@ public class YlhVedioAdManager implements VedioAdManagerView {
Activity
activity
;
protected
LoadingDialog
progressDialog
;
private
boolean
isClickScreen
=
true
;
// 是否点击屏幕跳转广告
public
static
YlhVedioAdManager
getInstance
(
Activity
activity
)
{
...
...
@@ -52,6 +44,7 @@ public class YlhVedioAdManager implements VedioAdManagerView {
}
private
YlhVedioAdManager
(
Activity
activity
)
{
super
(
activity
);
init
(
activity
);
return
;
}
...
...
@@ -63,7 +56,8 @@ public class YlhVedioAdManager implements VedioAdManagerView {
ylhVedioAdPresenter
.
attachView
(
this
);
}
public
void
destory
()
{
@Override
public
void
onDestory
()
{
if
(
ylhVedioAdPresenter
!=
null
)
{
ylhVedioAdPresenter
.
dispose
();
ylhVedioAdPresenter
.
detachView
();
...
...
@@ -75,7 +69,8 @@ public class YlhVedioAdManager implements VedioAdManagerView {
/**
* 加载优量汇激励视频
*/
public
void
loanYlhAd
(
Activity
activity
,
int
curCoin
,
String
carrierType
,
String
extraId
)
{
@Override
public
void
loadAd
(
Activity
activity
,
int
curCoin
,
String
carrierType
,
String
extraId
)
{
this
.
activity
=
activity
;
isClickScreen
=
true
;
this
.
curCoin
=
curCoin
;
...
...
@@ -203,10 +198,6 @@ public class YlhVedioAdManager implements VedioAdManagerView {
rewardVideoAD
.
loadAD
();
}
@Override
public
void
checkSuc
(
boolean
lyCmtFlag
)
{
}
/**
* 第四步 封装广告数据,请求服务器
*
...
...
@@ -236,83 +227,6 @@ public class YlhVedioAdManager implements VedioAdManagerView {
return
vo
;
}
@Override
public
MintsApplication
getBaseApplication
()
{
return
(
MintsApplication
)
activity
.
getApplication
();
}
/**
* 显示加载进度条(自定义message)
*
* @param message
*/
@Override
public
void
showLoading
(
String
message
)
{
if
(
activity
.
getWindow
()
!=
null
&&
!
activity
.
isFinishing
())
{
if
(
progressDialog
==
null
)
{
progressDialog
=
new
LoadingDialog
(
activity
);
progressDialog
.
setLoadText
(
message
);
}
progressDialog
.
show
();
setProgressOnTouchOutside
(
false
);
setProgressNoDismiss
();
}
}
/**
* 设置Progress是否手触消失
*
* @param onTouchOutside
*/
public
void
setProgressOnTouchOutside
(
boolean
onTouchOutside
)
{
if
(
progressDialog
!=
null
)
progressDialog
.
setCanceledOnTouchOutside
(
onTouchOutside
);
}
/**
* 设置点击返回是否消失加载进度条
*/
public
final
void
setProgressNoDismiss
()
{
if
(
progressDialog
!=
null
&&
progressDialog
.
isShowing
())
{
progressDialog
.
setOnKeyListener
(
new
DialogInterface
.
OnKeyListener
()
{
@Override
public
boolean
onKey
(
DialogInterface
dialog
,
int
keyCode
,
KeyEvent
event
)
{
if
(
keyCode
==
KeyEvent
.
KEYCODE_BACK
)
{
return
true
;
}
return
false
;
}
});
}
}
/**
* 消失加载进度条
*/
@Override
public
void
hideLoading
()
{
try
{
if
(
activity
.
getWindow
()
!=
null
&&
!
activity
.
isFinishing
())
{
if
(
progressDialog
!=
null
&&
progressDialog
.
isShowing
())
{
progressDialog
.
dismiss
();
progressDialog
=
null
;
}
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
finally
{
progressDialog
=
null
;
}
}
@Override
public
void
showToast
(
String
msg
)
{
if
(!
TextUtils
.
isEmpty
(
msg
))
ToastUtil
.
show
(
MintsApplication
.
getContext
(),
msg
);
}
public
void
setYlhVedioAdListener
(
YlhVedioAdListener
ylhVedioAdListener
)
{
this
.
ylhVedioAdListener
=
ylhVedioAdListener
;
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/common/Constant.kt
View file @
154bb8a9
...
...
@@ -99,6 +99,10 @@ object Constant {
const
val
CARRIER_GAME_ONLINE
=
"GAME_ONLINE"
//跳转猎豹
const
val
CARRIER_ZHANGYUE
=
"ZHANGYUE"
//阅读书城
const
val
CARRIER_CHALLENGE_SHAREFRIEND_DOUBLE
=
"CHALLENGE_SHAREFRIEND_DOUBLE"
//邀请好友翻倍
const
val
CARRIER_HOMEVEDIO
=
"HOMEVEDIO"
//首页红包
const
val
CARRIER_HOMEVEDIO_DOUBLE
=
"HOMEVEDIO_DOUBLE"
//首页红包翻倍
const
val
CARRIER_SMALLHOMEVEDIO
=
"SMALLHOMEVEDIO"
//首页红包
const
val
CARRIER_SMALLHOMEVEDIO_DOUBLE
=
"SMALLHOMEVEDIO_DOUBLE"
//首页红包翻倍
const
val
SHAREFRIEND_COMPLETE_1
=
"SHAREFRIEND_COMPLETE_1"
//邀请任务1
const
val
SHAREFRIEND_COMPLETE_2
=
"SHAREFRIEND_COMPLETE_2"
//邀请任务2
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/manager/BxmManager.kt
View file @
154bb8a9
...
...
@@ -40,10 +40,14 @@ object BxmManager {
fun
loadButtonAd
(
activity
:
Activity
?,
viewGroup
:
ViewGroup
)
{
if
(
activity
==
null
)
return
if
(
bdAdvanceButtonAd
==
null
)
{
bdAdvanceButtonAd
=
BDAdvanceButtonAd
(
activity
,
viewGroup
,
BUTTON_AD_SPOT_ID
)
try
{
if
(
bdAdvanceButtonAd
==
null
)
{
bdAdvanceButtonAd
=
BDAdvanceButtonAd
(
activity
,
viewGroup
,
BUTTON_AD_SPOT_ID
)
}
bdAdvanceButtonAd
?.
loadAd
()
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
}
bdAdvanceButtonAd
?.
loadAd
()
}
fun
onDestory
()
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/model/MainVedioMsgBean.java
View file @
154bb8a9
...
...
@@ -5,20 +5,20 @@ import java.io.Serializable;
public
class
MainVedioMsgBean
implements
Serializable
{
private
boolean
toCreateReward
;
private
int
bigReward
Coin
;
private
int
smallR
ewardCoin
;
private
int
rewardDouble
Coin
;
private
int
r
ewardCoin
;
private
int
createRewardNeedTime
;
public
boolean
isToCreateReward
()
{
return
toCreateReward
;
}
public
int
get
BigReward
Coin
()
{
return
bigReward
Coin
;
public
int
get
RewardDouble
Coin
()
{
return
rewardDouble
Coin
;
}
public
int
get
Small
RewardCoin
()
{
return
smallR
ewardCoin
;
public
int
getRewardCoin
()
{
return
r
ewardCoin
;
}
public
int
getCreateRewardNeedTime
()
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/presenters/HomePresenter.kt
View file @
154bb8a9
...
...
@@ -117,28 +117,6 @@ class HomePresenter : BasePresenter<HomeView>() {
})
}
fun
requestAddHomeVedioReward
()
{
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
requestAddHomeVedioReward
(),
object
:
BaseSubscriber
<
BaseResponse
<
Any
>>()
{
override
fun
onCompleted
()
{
if
(
isLinkView
)
return
}
override
fun
onError
(
e
:
Throwable
)
{
if
(
isLinkView
)
return
}
override
fun
onNext
(
baseResponse
:
BaseResponse
<
Any
>)
{
if
(
isLinkView
)
return
val
code
=
baseResponse
.
getStatus
()
when
(
code
)
{
200
->
getHomeVedioMsg
()
}
}
})
}
/**
* 游客登录
*/
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/views/VedioAdManagerView.java
View file @
154bb8a9
...
...
@@ -2,5 +2,4 @@ package com.mints.goodmoney.mvp.views;
public
interface
VedioAdManagerView
extends
BaseView
{
void
checkSuc
(
boolean
lyCmtFlag
);
}
GoodMoney/app/src/main/java/com/mints/goodmoney/net/LoanService.java
View file @
154bb8a9
...
...
@@ -310,17 +310,9 @@ public interface LoanService {
*
* @return
*/
@POST
(
"api/getHomeVedioMsg"
)
@POST
(
"api/getHomeVedio
Base
Msg"
)
Observable
<
BaseResponse
<
MainVedioMsgBean
>>
getHomeVedioMsg
();
/**
* 请求红包
*
* @return
*/
@POST
(
"api/requestAddHomeVedioReward"
)
Observable
<
BaseResponse
<
Object
>>
requestAddHomeVedioReward
();
/**
* 阅读时长
*
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/AwardActivity.kt
View file @
154bb8a9
...
...
@@ -33,7 +33,7 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
private
var
curCoin
=
0
//传入金币
private
var
extraId
=
""
//传入key
private
var
carrierType
=
""
//传入载体
private
var
loadVedioFailCount
=
0
private
var
loadVedioFailCount
=
0
// 视频失败次数
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_award
...
...
@@ -66,11 +66,10 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
startTime
()
when
(
carrierType
)
{
Constant
.
CHALLENGE_SHAREFRIEND
,
Constant
.
SHAREFRIEND_COMPLETE_1
,
Constant
.
SHAREFRIEND_COMPLETE_2
,
Constant
.
SHAREFRIEND_COMPLETE_3
,
Constant
.
SHAREFRIEND_COMPLETE_4
,
Constant
.
SHAREFRIEND_COMPLETE_5
,
Constant
.
SHAREFRIEND_COMPLETE_6
,
Constant
.
CARRIER_
HOMEVEDIO_SMALL
,
Constant
.
CARRIER_
GAME_ONLINE
->
{
Constant
.
CARRIER_GAME_ONLINE
->
{
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"carrierType"
]
=
carrierType
awardPresenter
.
reportAddCoinMsg
(
vo
)
...
...
@@ -78,16 +77,26 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
tvAwardContent
.
setText
(
curCoin
.
toString
()
+
"金币已到账"
)
tvAwardNext
.
setText
(
"我知道了"
)
}
// Constant.CHALLENGE_SHAREFRIEND -> {
// val vo = HashMap<String, Any>()
// vo["carrierType"] = carrierType
// awardPresenter.reportAddCoinMsg(vo)
//
// tvAwardContent.setText(curCoin.toString() + "金币已到账")
// tvAwardNext.setText("金币翻倍")
//
// carrierType = Constant.CARRIER_CHALLENGE_SHAREFRIEND_DOUBLE
// }
Constant
.
CARRIER_HOMEVEDIO
->
{
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"carrierType"
]
=
carrierType
awardPresenter
.
reportAddCoinMsg
(
vo
)
tvAwardContent
.
setText
(
curCoin
.
toString
()
+
"金币已到账"
)
tvAwardNext
.
setText
(
"看视频赚${extraId}金币"
)
carrierType
=
Constant
.
CARRIER_HOMEVEDIO_DOUBLE
}
Constant
.
CHALLENGE_SHAREFRIEND
->
{
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"carrierType"
]
=
carrierType
awardPresenter
.
reportAddCoinMsg
(
vo
)
tvAwardContent
.
setText
(
curCoin
.
toString
()
+
"金币已到账"
)
tvAwardNext
.
setText
(
"金币翻倍"
)
carrierType
=
Constant
.
CARRIER_CHALLENGE_SHAREFRIEND_DOUBLE
}
Constant
.
CARRIER_NEW_USER
->
{
tvAwardContent
.
setText
(
"新人红包"
)
tvAwardNext
.
setText
(
"我知道了"
)
...
...
@@ -112,8 +121,14 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
}
tvAwardNext
.
setText
(
"我知道了"
)
}
Constant
.
CARRIER_SIGNIN_HOMEPAGE_CARD
,
Constant
.
CARRIER_CHALLENGE_TURN
,
Constant
.
CARRIER_CHALLENGE_CARD
,
Constant
.
CARRIER_WALK_BUBBLE
,
Constant
.
CARRIER_WALK
,
Constant
.
CARRIER_HOMEWATER
->
{
tvAwardContent
.
setText
(
"看视频领取"
+
curCoin
+
"金币"
)
}
else
->
{
tvAwardContent
.
setText
(
"点击领取"
+
curCoin
+
"金币
"
)
tvAwardContent
.
setText
(
curCoin
.
toString
()
+
"金币已到账
"
)
}
}
}
...
...
@@ -171,10 +186,11 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
R
.
id
.
tvAwardNext
->
{
when
(
carrierType
)
{
// 只有看视频才能领金币
Constant
.
CARRIER_CHALLENGE_SHAREFRIEND_DOUBLE
,
Constant
.
CARRIER_OFFLINE_DOUBLE
,
Constant
.
CARRIER_SIGNIN_HOMEPAGE_CARD
,
Constant
.
CARRIER_CHALLENGE_TURN
,
Constant
.
CARRIER_CHALLENGE_CARD
,
Constant
.
CARRIER_WALK_BUBBLE
,
Constant
.
CARRIER_HOMEVEDIO_BIG
,
Constant
.
CARRIER_WALK
,
Constant
.
CARRIER_HOMEWATER
->
{
Constant
.
CARRIER_WALK_BUBBLE
,
Constant
.
CARRIER_HOMEVEDIO_DOUBLE
,
Constant
.
CARRIER_WALK
,
Constant
.
CARRIER_HOMEWATER
->
{
awardVedio
()
}
else
->
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/CoinRecordActivity.kt
View file @
154bb8a9
...
...
@@ -24,7 +24,7 @@ class CoinRecordActivity : BaseActivity(), View.OnClickListener, OnRefreshListen
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_drawcash_record
override
fun
initViewsAndEvents
()
{
tv_title
.
text
=
"金币
记录
"
tv_title
.
text
=
"金币
明细
"
iv_left_icon
.
visibility
=
View
.
VISIBLE
iv_left_icon
.
setImageResource
(
R
.
mipmap
.
ic_arrow_back
)
iv_left_icon
.
setOnClickListener
(
this
)
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/DrawcashActivity.kt
View file @
154bb8a9
...
...
@@ -90,7 +90,7 @@ class DrawcashActivity : BaseActivity(),
readyGo
(
DrawcashRecordActivity
::
class
.
java
)
}
R
.
id
.
rl_coin
->
{
readyGo
(
CoinRecordActivity
::
class
.
java
)
//
readyGo(CoinRecordActivity::class.java)
}
R
.
id
.
tvDrawcashWx
->
{
if
(!
TextUtils
.
isEmpty
(
userConfig
?.
openid
))
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MainFragment.kt
View file @
154bb8a9
This diff is collapsed.
Click to expand it.
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
View file @
154bb8a9
...
...
@@ -110,6 +110,7 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
item_title_id
.
setOnClickListener
(
this
)
iv_right_icon
.
setOnClickListener
(
this
)
btn_withdraw
.
setOnClickListener
(
this
)
btn_coinRecord
.
setOnClickListener
(
this
)
item_title_invitecode
.
setOnClickListener
(
this
)
item_title_invitecode_copy
.
setOnClickListener
(
this
)
ll_my_login
.
setOnClickListener
(
this
)
...
...
@@ -577,6 +578,15 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
readyGo
(
DrawcashActivity
::
class
.
java
)
}
R
.
id
.
btn_coinRecord
->
{
if
(
userConfig
==
null
)
{
showToast
(
"网络异常,请检测网络!"
)
myPresenter
.
getUserHallBaseMsg
()
return
}
readyGo
(
CoinRecordActivity
::
class
.
java
)
}
R
.
id
.
item_title_invitecode
->
{
if
(
userConfig
!=
null
)
{
val
invitedCode
=
userConfig
!!
.
userMsg
.
idcode
...
...
GoodMoney/app/src/main/res/layout/activity_drawcash.xml
View file @
154bb8a9
...
...
@@ -39,21 +39,13 @@
android:id=
"@+id/tvDrawcashGold"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_toStartOf=
"@id/iv_coin"
android:gravity=
"center_vertical"
android:text=
"0"
android:layout_alignParentRight=
"true"
android:textColor=
"@color/main_mints"
android:textSize=
"22sp"
android:textStyle=
"bold"
/>
<ImageView
android:id=
"@+id/iv_coin"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentEnd=
"true"
android:layout_centerVertical=
"true"
android:padding=
"4dp"
android:src=
"@mipmap/ic_arrow_more"
/>
</RelativeLayout>
<View
...
...
GoodMoney/app/src/main/res/layout/item_fragment_main_my_title.xml
View file @
154bb8a9
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"20
0
dp"
android:layout_height=
"20
4
dp"
android:orientation=
"vertical"
>
<LinearLayout
...
...
@@ -78,7 +78,7 @@
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"
8
0dp"
android:layout_height=
"
9
0dp"
android:layout_marginStart=
"15dp"
android:layout_marginTop=
"20dp"
android:layout_marginEnd=
"15dp"
...
...
@@ -112,15 +112,32 @@
android:textColor=
"@color/my_color_orange"
android:textSize=
"28sp"
/>
<Button
android:id=
"@+id/btn_withdraw"
android:layout_width=
"60dp"
android:layout_height=
"32dp"
android:layout_marginStart=
"10dp"
android:background=
"@drawable/shape_btn_switch"
android:text=
"提现"
android:textColor=
"@color/white"
android:textSize=
"16sp"
/>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<Button
android:id=
"@+id/btn_coinRecord"
android:layout_width=
"60dp"
android:layout_height=
"30dp"
android:layout_marginStart=
"10dp"
android:background=
"@drawable/shape_btn_switch"
android:text=
"明细"
android:textColor=
"@color/white"
android:textSize=
"16sp"
/>
<Button
android:id=
"@+id/btn_withdraw"
android:layout_width=
"60dp"
android:layout_marginTop=
"10dp"
android:layout_height=
"30dp"
android:layout_marginStart=
"10dp"
android:background=
"@drawable/shape_btn_switch"
android:text=
"提现"
android:textColor=
"@color/white"
android:textSize=
"16sp"
/>
</LinearLayout>
</LinearLayout>
...
...
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