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
8285f2f2
Commit
8285f2f2
authored
Dec 10, 2020
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
枫岚广告集成
parent
ae8cbd71
Changes
40
Show whitespace changes
Inline
Side-by-side
Showing
40 changed files
with
467 additions
and
198 deletions
+467
-198
build.gradle
GoodMoney/app/build.gradle
+5
-0
ks_3.3.5.3.aar
GoodMoney/app/libs/ks_3.3.5.3.aar
+0
-0
mh-adsdk-ext.aar
GoodMoney/app/libs/mh-adsdk-ext.aar
+0
-0
mh-adsdk.aar
GoodMoney/app/libs/mh-adsdk.aar
+0
-0
AndroidManifest.xml
GoodMoney/app/src/main/AndroidManifest.xml
+4
-2
InitAppService.kt
...y/app/src/main/java/com/mints/goodmoney/InitAppService.kt
+1
-1
MintsApplication.java
...p/src/main/java/com/mints/goodmoney/MintsApplication.java
+12
-7
MhVedioAdManager.kt
...ain/java/com/mints/goodmoney/ad/video/MhVedioAdManager.kt
+141
-0
VedioAdingManager.java
.../java/com/mints/goodmoney/ad/video/VedioAdingManager.java
+74
-7
AppConfig.java
...p/src/main/java/com/mints/goodmoney/common/AppConfig.java
+4
-0
Constant.kt
.../app/src/main/java/com/mints/goodmoney/common/Constant.kt
+2
-0
MhManager.kt
...pp/src/main/java/com/mints/goodmoney/manager/MhManager.kt
+21
-0
DrawcashBean.java
...main/java/com/mints/goodmoney/mvp/model/DrawcashBean.java
+5
-0
VedioRulesBean.java
...in/java/com/mints/goodmoney/mvp/model/VedioRulesBean.java
+21
-3
MhVedioAdPresenter.kt
.../com/mints/goodmoney/mvp/presenters/MhVedioAdPresenter.kt
+38
-0
WnVedioAdPresenter.kt
.../com/mints/goodmoney/mvp/presenters/WnVedioAdPresenter.kt
+1
-1
DrawcashActivity.kt
...java/com/mints/goodmoney/ui/activitys/DrawcashActivity.kt
+1
-0
EraseActivity.kt
...in/java/com/mints/goodmoney/ui/activitys/EraseActivity.kt
+13
-17
FeedbackActivity.kt
...java/com/mints/goodmoney/ui/activitys/FeedbackActivity.kt
+3
-1
GuideActivity.kt
...in/java/com/mints/goodmoney/ui/activitys/GuideActivity.kt
+4
-4
LiebaoGameActivity.kt
...va/com/mints/goodmoney/ui/activitys/LiebaoGameActivity.kt
+9
-10
MainActivity.kt
...ain/java/com/mints/goodmoney/ui/activitys/MainActivity.kt
+0
-1
MobileLoginActivity.kt
...a/com/mints/goodmoney/ui/activitys/MobileLoginActivity.kt
+10
-10
SettingsActivity.kt
...java/com/mints/goodmoney/ui/activitys/SettingsActivity.kt
+10
-10
SplashADActivity.kt
...java/com/mints/goodmoney/ui/activitys/SplashADActivity.kt
+0
-2
SplashActivity.kt
...n/java/com/mints/goodmoney/ui/activitys/SplashActivity.kt
+6
-8
SplashYlhActivity.kt
...ava/com/mints/goodmoney/ui/activitys/SplashYlhActivity.kt
+0
-3
WebActivity.kt
...main/java/com/mints/goodmoney/ui/activitys/WebActivity.kt
+9
-12
WxLoginActivity.kt
.../java/com/mints/goodmoney/ui/activitys/WxLoginActivity.kt
+12
-12
DhGameFragment.kt
...in/java/com/mints/goodmoney/ui/fragment/DhGameFragment.kt
+0
-4
FriendsFragment.kt
...n/java/com/mints/goodmoney/ui/fragment/FriendsFragment.kt
+0
-5
HorizChannelFragment.kt
...a/com/mints/goodmoney/ui/fragment/HorizChannelFragment.kt
+5
-0
MainFragment.kt
...main/java/com/mints/goodmoney/ui/fragment/MainFragment.kt
+1
-0
MyFragment.kt
...c/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
+30
-30
PanFragment.kt
.../main/java/com/mints/goodmoney/ui/fragment/PanFragment.kt
+9
-16
ZhangyueFragment.kt
.../java/com/mints/goodmoney/ui/fragment/ZhangyueFragment.kt
+1
-1
MyViewPager.java
...main/java/com/mints/goodmoney/ui/widgets/MyViewPager.java
+10
-22
BubbleSeekBar.java
...com/mints/goodmoney/ui/widgets/seekbar/BubbleSeekBar.java
+1
-1
SystemUtils.kt
...pp/src/main/java/com/mints/goodmoney/utils/SystemUtils.kt
+1
-1
fragment_main_friends.xml
GoodMoney/app/src/main/res/layout/fragment_main_friends.xml
+3
-7
No files found.
GoodMoney/app/build.gradle
View file @
8285f2f2
...
...
@@ -202,6 +202,7 @@ dependencies {
implementation
(
"com.yilan.sdk:ui:3.0.0.3"
)
{
exclude
group:
'com.yilan.sdk'
,
module:
'toutiao'
exclude
group:
'com.yilan.sdk'
,
module:
'gdt'
exclude
group:
'com.yilan.sdk'
,
module:
'ks'
}
implementation
(
'com.aliyun.ams:alicloud-android-httpdns:1.2.3@aar'
)
{
transitive
true
...
...
@@ -234,6 +235,10 @@ dependencies {
implementation
(
name:
'bxmsdk-release-3.0.0-csj3300'
,
ext:
'aar'
)
// 闪电盒子
implementation
(
name:
'wannuosili_ad_2.0.0'
,
ext:
'aar'
)
// 枫岚
implementation
(
name:
'mh-adsdk'
,
ext:
'aar'
)
implementation
(
name:
'mh-adsdk-ext'
,
ext:
'aar'
)
implementation
(
name:
'ks_3.3.5.3'
,
ext:
'aar'
)
// testImplementation 'junit:junit:4.13'
...
...
GoodMoney/app/libs/ks_3.3.5.3.aar
0 → 100644
View file @
8285f2f2
File added
GoodMoney/app/libs/mh-adsdk-ext.aar
0 → 100644
View file @
8285f2f2
File added
GoodMoney/app/libs/mh-adsdk.aar
0 → 100644
View file @
8285f2f2
File added
GoodMoney/app/src/main/AndroidManifest.xml
View file @
8285f2f2
...
...
@@ -140,7 +140,9 @@
<activity
android:name=
".ui.activitys.AboutusActivity"
android:screenOrientation=
"portrait"
/>
<activity
android:name=
".ui.activitys.GuideActivity"
/>
<activity
android:name=
".ui.activitys.GuideActivity"
android:screenOrientation=
"portrait"
/>
<activity
android:name=
".ui.activitys.LiebaoGameActivity"
android:screenOrientation=
"portrait"
/>
...
...
@@ -179,7 +181,7 @@
android:screenOrientation=
"portrait"
/>
<activity
android:name=
".ui.activitys.AccountMergeActivity"
android:screenOrientation=
"portrait"
/>
android:screenOrientation=
"portrait"
/>
<service
android:name=
".service.UpdateService"
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/InitAppService.kt
View file @
8285f2f2
...
...
@@ -50,7 +50,7 @@ class InitAppService : IntentService("InitializeService") {
if
(
ACTION_INIT
==
action
)
{
initApplication
()
isInit
=
fals
e
isInit
=
tru
e
}
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/MintsApplication.java
View file @
8285f2f2
...
...
@@ -14,6 +14,7 @@ import androidx.multidex.MultiDexApplication;
import
com.bun.miitmdid.core.JLibrary
;
import
com.mints.goodmoney.common.Constant
;
import
com.mints.goodmoney.manager.LiebaoManager
;
import
com.mints.goodmoney.manager.MhManager
;
import
com.mints.goodmoney.manager.MiitHelper
;
import
com.mints.goodmoney.manager.TtCsjAdManager
;
import
com.mints.goodmoney.manager.WnManager
;
...
...
@@ -37,7 +38,7 @@ public class MintsApplication extends MultiDexApplication {
private
static
MintsApplication
mContext
;
public
static
String
OAID
=
""
;
private
static
LocalBroadcastManager
mLocalBroadcatManager
;
private
static
LocalBroadcastManager
mLocalBroadca
s
tManager
;
private
Scheduler
defaultSubscribeScheduler
;
private
LoanService
loanService
;
...
...
@@ -49,12 +50,10 @@ public class MintsApplication extends MultiDexApplication {
@Override
public
void
onCreate
()
{
super
.
onCreate
();
mContext
=
this
;
// 判断应用是否在前台
ForegroundOrBackground
.
init
(
this
);
// 9.0之后不可多进程使用一个目录下的WebView,写在SDK初始化之前
androidPWebView
();
// 三方配置
thirdConfig
();
}
...
...
@@ -81,6 +80,9 @@ public class MintsApplication extends MultiDexApplication {
super
.
attachBaseContext
(
base
);
MultiDex
.
install
(
base
);
// 9.0之后不可多进程使用一个目录下的WebView,写在SDK初始化之前
androidPWebView
();
// 移动安全联盟
try
{
JLibrary
.
InitEntry
(
base
);
...
...
@@ -115,6 +117,9 @@ public class MintsApplication extends MultiDexApplication {
// 闪电盒子
WnManager
.
INSTANCE
.
initWn
(
this
);
// 枫岚广告
MhManager
.
INSTANCE
.
initWn
(
this
);
// 一览视频
YlVideoManager
.
INSTANCE
.
init
(
this
);
...
...
@@ -153,10 +158,10 @@ public class MintsApplication extends MultiDexApplication {
* 获得LocalBroadcastManager对象
*/
public
static
LocalBroadcastManager
getLocalBroadcastManager
()
{
if
(
mLocalBroadcatManager
==
null
)
{
mLocalBroadcatManager
=
LocalBroadcastManager
.
getInstance
(
mContext
);
if
(
mLocalBroadca
s
tManager
==
null
)
{
mLocalBroadca
s
tManager
=
LocalBroadcastManager
.
getInstance
(
mContext
);
}
return
mLocalBroadcatManager
;
return
mLocalBroadca
s
tManager
;
}
public
LoanService
getLoanService
()
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/video/MhVedioAdManager.kt
0 → 100644
View file @
8285f2f2
package
com.mints.goodmoney.ad.video
import
android.app.Activity
import
com.maplehaze.adsdk.video.RewardVideoAd
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.manager.MhManager
import
com.mints.goodmoney.manager.TrackManager
import
com.mints.goodmoney.mvp.presenters.MhVedioAdPresenter
import
com.mints.goodmoney.mvp.views.VedioAdManagerView
import
com.mints.goodmoney.utils.LogUtil
/**
* 枫岚广告视频
*/
class
MhVedioAdManager
private
constructor
(
activity
:
Activity
)
:
BaseVideoAd
(
activity
),
VedioAdManagerView
{
private
val
TAG
=
MhVedioAdManager
::
class
.
java
.
simpleName
private
var
mhVdedioAdPresenter
:
MhVedioAdPresenter
?
=
null
private
var
mhVedioAdListener
:
MhVedioAdListener
?
=
null
private
var
mRewardVideoAd
:
RewardVideoAd
?
=
null
private
var
isClickScreen
:
Boolean
=
true
override
var
activity
:
Activity
?
=
null
companion
object
{
private
var
_inst
:
MhVedioAdManager
?
=
null
fun
getInstance
(
activity
:
Activity
):
MhVedioAdManager
?
{
return
if
(
_inst
!=
null
)
{
_inst
}
else
{
_inst
=
MhVedioAdManager
(
activity
)
_inst
}
}
}
init
{
init
(
activity
)
}
private
fun
init
(
activity
:
Activity
)
{
this
.
activity
=
activity
mhVdedioAdPresenter
=
MhVedioAdPresenter
()
mhVdedioAdPresenter
?.
attachView
(
this
)
}
override
fun
loadAd
(
activity
:
Activity
,
curCoin
:
Int
,
carrierType
:
String
,
extraId
:
String
?)
{
this
.
activity
=
activity
isClickScreen
=
true
var
postId
:
String
=
when
(
carrierType
)
{
Constant
.
CARRIER_VERSUS_VIDEO
->
MhManager
.
POS_ID
Constant
.
CARRIER_HOMEWATER
->
MhManager
.
POS_ID
Constant
.
CARRIER_CHALLENGE_TURN
,
Constant
.
CARRIER_DRAWCASH
->
MhManager
.
POS_ID
Constant
.
CARRIER_CHALLENGE_CARD
->
MhManager
.
POS_ID
else
->
MhManager
.
POS_ID
}
val
orientation
=
RewardVideoAd
.
VERTICAL
mRewardVideoAd
=
RewardVideoAd
(
activity
,
MhManager
.
APP_ID
,
postId
,
orientation
,
object
:
RewardVideoAd
.
RewardVideoListener
{
override
fun
onADCached
()
{
LogUtil
.
d
(
TAG
,
"onADCached"
)
mRewardVideoAd
?.
showAd
(
activity
)
}
override
fun
onADShow
()
{
LogUtil
.
d
(
TAG
,
"onADShow"
)
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_FL
,
Constant
.
EVENT_TYPE_ZERO
,
""
,
""
)
}
override
fun
onReward
()
{
LogUtil
.
d
(
TAG
,
"onReward"
)
}
override
fun
onADClick
()
{
LogUtil
.
d
(
TAG
,
"onADClick"
)
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_FL
,
Constant
.
EVENT_TYPE_TWO
,
""
,
""
)
if
(
isClickScreen
)
{
// 防止重复
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_FL
,
Constant
.
EVENT_TYPE_FOUR
,
""
,
""
)
isClickScreen
=
false
}
if
(
mhVedioAdListener
!=
null
)
{
mhVedioAdListener
?.
mhVedioAdDownload
()
}
}
override
fun
onVideoComplete
()
{
LogUtil
.
d
(
TAG
,
"onVideoComplete"
)
}
override
fun
onADClose
()
{
LogUtil
.
d
(
TAG
,
"onADClose"
)
mhVdedioAdPresenter
?.
reportAddCoinMsg
(
activity
,
getAdMapVO
(
carrierType
,
Constant
.
AD_SOURCE_FL
,
extraId
,
curCoin
))
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_FL
,
Constant
.
EVENT_TYPE_THREE
,
""
,
""
)
if
(
mhVedioAdListener
!=
null
)
{
mhVedioAdListener
?.
mhVedioAdSuccess
()
}
}
override
fun
onADError
(
p0
:
Int
)
{
LogUtil
.
d
(
TAG
,
"onADError->$p0"
)
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_FL
,
Constant
.
EVENT_TYPE_ONE
,
(
p0
).
toString
(),
""
)
if
(
mhVedioAdListener
!=
null
)
{
mhVedioAdListener
?.
mhVedioAdFail
()
}
}
})
mRewardVideoAd
?.
loadAd
()
}
fun
setMhVedioAdListener
(
mhVedioAdListener
:
MhVedioAdListener
?)
{
this
.
mhVedioAdListener
=
mhVedioAdListener
}
interface
MhVedioAdListener
{
fun
mhVedioAdSuccess
()
fun
mhVedioAdFail
()
fun
mhVedioAdDownload
()
}
override
fun
onDestory
()
{
mhVdedioAdPresenter
?.
let
{
it
.
dispose
()
it
.
detachView
()
}
mRewardVideoAd
=
null
activity
=
null
}
}
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/video/VedioAdingManager.java
View file @
8285f2f2
...
...
@@ -26,22 +26,22 @@ public class VedioAdingManager {
private
WnVedioAdManager
wnVedioAdManager
;
private
CsjVedioAdManager
csjVedioAdManager
;
private
YlhVedioAdManager
ylhVedioAdManager
;
private
MhVedioAdManager
mhVedioAdManager
;
private
int
wnWeight
;
private
int
ylhWeight
;
private
int
csjVedioWeight
;
private
int
flVedioWeight
;
private
ArrayList
<
WeightBean
>
weightList
;
private
Activity
activity
;
private
boolean
isVedioAdDownload
=
false
;
// 是否点击广告下载 true-点击
public
static
VedioAdingManager
getInstance
(
Activity
activity
)
{
if
(
_inst
!=
null
)
{
return
_inst
;
}
else
{
if
(
_inst
==
null
)
{
_inst
=
new
VedioAdingManager
(
activity
);
return
_inst
;
}
return
_inst
;
}
private
VedioAdingManager
(
Activity
activity
)
{
...
...
@@ -58,9 +58,20 @@ public class VedioAdingManager {
csjVedioAdManager
=
CsjVedioAdManager
.
getInstance
(
activity
);
ylhVedioAdManager
=
YlhVedioAdManager
.
getInstance
(
activity
);
wnVedioAdManager
=
WnVedioAdManager
.
Companion
.
getInstance
(
activity
);
mhVedioAdManager
=
MhVedioAdManager
.
Companion
.
getInstance
(
activity
);
weightList
=
new
ArrayList
<>();
}
/**
* 初始化广告权重
*/
public
void
initAdWeight
(
int
csjVedioWeight
,
int
ylhWeight
,
int
wnWeight
,
int
flVedioWeight
)
{
this
.
csjVedioWeight
=
csjVedioWeight
;
this
.
ylhWeight
=
ylhWeight
;
this
.
wnWeight
=
wnWeight
;
this
.
flVedioWeight
=
flVedioWeight
;
}
/**
* 初始化广告权重
*/
...
...
@@ -81,6 +92,17 @@ public class VedioAdingManager {
loadAdVedio
(
getVedioAdType
(),
bean
);
}
/**
* 根据类型加载对应视频(第一次加载)
*
* @param bean
*/
public
void
loadAding
(
Activity
activity
,
VedioAdingBean
bean
,
int
i
)
{
this
.
activity
=
activity
;
isVedioAdDownload
=
false
;
loadAdVedio
(
Constant
.
FL_VEDIO_AD
,
bean
);
}
/**
* 加载失败优先级对应视频
*
...
...
@@ -101,6 +123,8 @@ public class VedioAdingManager {
String
nextAdType
=
""
;
if
(
AppConfig
.
csjVedioAdCount
>
0
)
{
nextAdType
=
Constant
.
CSJ_VEDIO_AD
;
}
else
if
(
AppConfig
.
flVedioAdCount
>
0
)
{
nextAdType
=
Constant
.
FL_VEDIO_AD
;
}
else
if
(
AppConfig
.
ylhAdCount
>
0
)
{
nextAdType
=
Constant
.
YLH_VEDIO_AD
;
}
else
{
...
...
@@ -143,6 +167,11 @@ public class VedioAdingManager {
weight
=
weight
+
csjVedioWeight
;
LogUtil
.
d
(
TAG
,
"权重值:csjVedioWeight:"
+
csjVedioWeight
);
}
if
(
AppConfig
.
flVedioAdCount
>
0
)
{
weightList
.
add
(
new
WeightBean
(
flVedioWeight
,
Constant
.
FL_VEDIO_AD
));
weight
=
weight
+
flVedioWeight
;
LogUtil
.
d
(
TAG
,
"权重值:flVedioWeight:"
+
flVedioWeight
);
}
if
(
AppConfig
.
ylhAdCount
>
0
)
{
weightList
.
add
(
new
WeightBean
(
ylhWeight
,
Constant
.
YLH_VEDIO_AD
));
weight
=
weight
+
ylhWeight
;
...
...
@@ -186,8 +215,9 @@ public class VedioAdingManager {
int
csjVedioAdCount
=
AppConfig
.
csjVedioAdCount
;
int
ylhAdCount
=
AppConfig
.
ylhAdCount
;
int
wnAdCount
=
AppConfig
.
wnVedioAdCount
;
int
flVedioAdCount
=
AppConfig
.
flVedioAdCount
;
if
(
ylhAdCount
<=
0
&&
csjVedioAdCount
<=
0
&&
wnAdCount
<=
0
)
{
if
(
ylhAdCount
<=
0
&&
csjVedioAdCount
<=
0
&&
wnAdCount
<=
0
&&
flVedioAdCount
<=
0
)
{
// showToast("今日视频已看完,请明天再来吧");
return
true
;
}
...
...
@@ -208,12 +238,16 @@ public class VedioAdingManager {
ylhVedioAdManager
.
onDestory
();
ylhVedioAdManager
=
null
;
}
if
(
wnVedioAdManager
!=
null
)
{
wnVedioAdManager
.
setWnVedioAdListener
(
null
);
wnVedioAdManager
.
onDestory
();
wnVedioAdManager
=
null
;
}
if
(
mhVedioAdManager
!=
null
)
{
mhVedioAdManager
.
setMhVedioAdListener
(
null
);
mhVedioAdManager
.
onDestory
();
mhVedioAdManager
=
null
;
}
activity
=
null
;
}
...
...
@@ -342,8 +376,41 @@ public class VedioAdingManager {
isVedioAdDownload
=
true
;
}
});
wnVedioAdManager
.
loadAd
(
activity
,
bean
.
getCurCoin
(),
bean
.
getCarrierType
(),
bean
.
getExtraId
());
}
else
if
(
TextUtils
.
equals
(
vedioAdType
,
Constant
.
FL_VEDIO_AD
))
{
// 枫岚广告激励视频
if
(
mhVedioAdManager
==
null
)
{
if
(
activity
==
null
)
{
if
(
vedioAdingListener
!=
null
)
{
vedioAdingListener
.
vedioAdingListenerError
(
Constant
.
FL_VEDIO_AD
);
}
return
;
}
mhVedioAdManager
=
MhVedioAdManager
.
Companion
.
getInstance
(
activity
);
}
mhVedioAdManager
.
setMhVedioAdListener
(
new
MhVedioAdManager
.
MhVedioAdListener
()
{
@Override
public
void
mhVedioAdSuccess
()
{
AppConfig
.
flVedioAdCount
--;
if
(
vedioAdingListener
!=
null
)
{
vedioAdingListener
.
vedioAdingListenerSuccess
(
Constant
.
FL_VEDIO_AD
);
}
}
@Override
public
void
mhVedioAdFail
()
{
if
(
vedioAdingListener
!=
null
)
{
vedioAdingListener
.
vedioAdingListenerFail
(
Constant
.
FL_VEDIO_AD
);
}
}
@Override
public
void
mhVedioAdDownload
()
{
isVedioAdDownload
=
true
;
}
});
mhVedioAdManager
.
loadAd
(
activity
,
bean
.
getCurCoin
(),
bean
.
getCarrierType
(),
bean
.
getExtraId
());
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/common/AppConfig.java
View file @
8285f2f2
...
...
@@ -31,5 +31,9 @@ public class AppConfig {
* wnVedio 剩余广告播放数
*/
public
static
int
wnVedioAdCount
=
5
;
/**
* flVedio 剩余广告播放数
*/
public
static
int
flVedioAdCount
=
5
;
}
GoodMoney/app/src/main/java/com/mints/goodmoney/common/Constant.kt
View file @
8285f2f2
...
...
@@ -123,6 +123,7 @@ object Constant {
const
val
AD_SOURCE_CSJ
=
"CSJ"
const
val
AD_SOURCE_YLH
=
"YLH"
const
val
AD_SOURCE_SDHZ
=
"SDHZ"
//闪电盒子
const
val
AD_SOURCE_FL
=
"FL"
//枫岚
// 调用事件 0 成功 1失败 2点击 3-有效展示 4-去重
const
val
EVENT_TYPE_ZERO
=
"0"
...
...
@@ -141,6 +142,7 @@ object Constant {
const
val
CSJ_VEDIO_AD
=
"CSJ_VEDIO_AD"
const
val
YLH_VEDIO_AD
=
"YLH_VEDIO_AD"
const
val
SDHZ_VEDIO_AD
=
"SDHZ_VEDIO_AD"
const
val
FL_VEDIO_AD
=
"Fl_VEDIO_AD"
// 游戏类型
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/manager/MhManager.kt
0 → 100644
View file @
8285f2f2
package
com.mints.goodmoney.manager
import
android.app.Application
import
com.maplehaze.adsdk.MaplehazeSDK
/**
* 描述:枫岚激励视频
* 作者:孟崔广
*/
object
MhManager
{
const
val
APP_ID
=
"10200"
const
val
POS_ID
=
"56834"
/**
* 初始化
*/
fun
initWn
(
application
:
Application
)
{
MaplehazeSDK
.
init
(
application
)
}
}
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/model/DrawcashBean.java
View file @
8285f2f2
...
...
@@ -60,6 +60,7 @@ public class DrawcashBean implements Serializable {
private
int
SDHZ_VEDIO
;
private
int
CSJ_VEDIO
;
private
int
YLH_VEDIO
;
private
int
FL_VEDIO
;
public
int
getSDHZ_VEDIO
()
{
return
SDHZ_VEDIO
;
...
...
@@ -72,6 +73,10 @@ public class DrawcashBean implements Serializable {
public
int
getYLH_VEDIO
()
{
return
YLH_VEDIO
;
}
public
int
getFL_VEDIO
()
{
return
FL_VEDIO
;
}
}
public
class
CashOutMoneyArrBean
implements
Serializable
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/model/VedioRulesBean.java
View file @
8285f2f2
...
...
@@ -7,8 +7,9 @@ public class VedioRulesBean implements Serializable {
private
CsjVedioBean
CSJ_VEDIO
;
private
YlhVedioBean
YLH_VEDIO
;
private
SdhzVedioBean
SDHZ_VEDIO
;
private
FLVedioBean
FL_VEDIO
;
public
class
CsjVedioBean
implements
Serializable
{
public
class
CsjVedioBean
implements
Serializable
{
private
int
surplus
;
//剩余可看视频数
private
int
rate
;
//权重
...
...
@@ -21,7 +22,7 @@ public class VedioRulesBean implements Serializable {
}
}
public
class
YlhVedioBean
implements
Serializable
{
public
class
YlhVedioBean
implements
Serializable
{
private
int
surplus
;
private
int
rate
;
...
...
@@ -34,7 +35,7 @@ public class VedioRulesBean implements Serializable {
}
}
public
class
SdhzVedioBean
implements
Serializable
{
public
class
SdhzVedioBean
implements
Serializable
{
private
int
surplus
;
private
int
rate
;
...
...
@@ -47,6 +48,23 @@ public class VedioRulesBean implements Serializable {
}
}
public
class
FLVedioBean
implements
Serializable
{
private
int
surplus
;
private
int
rate
;
public
int
getSurplus
()
{
return
surplus
;
}
public
int
getRate
()
{
return
rate
;
}
}
public
FLVedioBean
getFL_VEDIO
()
{
return
FL_VEDIO
;
}
public
CsjVedioBean
getCSJ_VEDIO
()
{
return
CSJ_VEDIO
;
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/presenters/MhVedioAdPresenter.kt
0 → 100644
View file @
8285f2f2
package
com.mints.goodmoney.mvp.presenters
import
android.app.Activity
import
com.mints.goodmoney.MintsApplication
import
com.mints.goodmoney.mvp.model.BaseResponse
import
com.mints.goodmoney.mvp.views.VedioAdManagerView
import
com.mints.library.net.neterror.BaseSubscriber
import
com.mints.library.net.neterror.Throwable
import
rx.Subscription
import
rx.android.schedulers.AndroidSchedulers
import
java.util.*
class
MhVedioAdPresenter
:
BasePresenter
<
VedioAdManagerView
>()
{
fun
reportAddCoinMsg
(
activity
:
Activity
?,
vo
:
HashMap
<
String
,
Any
>)
{
if
(
activity
==
null
)
return
loanApplication
=
activity
.
application
as
MintsApplication
loanService
=
loanApplication
.
loanService
subscription
=
loanService
.
reportAddCoinMsg
(
vo
)
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribeOn
(
loanApplication
.
defaultSubscribeScheduler
())
.
subscribe
(
object
:
BaseSubscriber
<
BaseResponse
<
Any
>>()
{
override
fun
onCompleted
()
{}
override
fun
onError
(
e
:
Throwable
)
{
}
override
fun
onNext
(
baseResponse
:
BaseResponse
<
Any
>)
{}
})
}
fun
dispose
()
{
loanService
=
null
loanApplication
=
null
if
(
subscription
!=
null
&&
!
subscription
.
isUnsubscribed
())
{
subscription
.
unsubscribe
()
}
}
}
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/presenters/WnVedioAdPresenter.kt
View file @
8285f2f2
...
...
@@ -15,7 +15,7 @@ class WnVedioAdPresenter : BasePresenter<VedioAdManagerView>() {
fun
reportAddCoinMsg
(
activity
:
Activity
?,
vo
:
HashMap
<
String
,
Any
>)
{
if
(
activity
==
null
)
return
loanApplication
=
activity
.
application
as
MintsApplication
loanService
=
loanApplication
.
getLoanService
()
loanService
=
loanApplication
.
loanService
subscription
=
loanService
.
reportAddCoinMsg
(
vo
)
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribeOn
(
loanApplication
.
defaultSubscribeScheduler
())
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/DrawcashActivity.kt
View file @
8285f2f2
...
...
@@ -269,6 +269,7 @@ class DrawcashActivity : BaseActivity(),
* 设置视频权重
*/
private
fun
initAdWeight
(
data
:
DrawcashBean
.
VedioRules
)
{
// vedioAdingManager?.initAdWeight(data.csJ_VEDIO, data.ylH_VEDIO, data.sdhZ_VEDIO, data.fL_VEDIO)
vedioAdingManager
?.
initAdWeight
(
data
.
csJ_VEDIO
,
data
.
ylH_VEDIO
,
data
.
sdhZ_VEDIO
)
LogUtil
.
d
(
TAG
,
"提现权重值:csjWeight:${data.csJ_VEDIO} ylhWeight:${data.ylH_VEDIO} sdhzWeight:${data.sdhZ_VEDIO}"
)
// 广告视频数
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/EraseActivity.kt
View file @
8285f2f2
...
...
@@ -3,10 +3,8 @@ package com.mints.goodmoney.ui.activitys
import
android.os.Bundle
import
android.view.KeyEvent
import
android.view.View
import
android.view.View.OnLongClickListener
import
android.view.ViewGroup
import
android.webkit.WebChromeClient
import
com.github.lzyzsd.jsbridge.BridgeHandler
import
com.github.lzyzsd.jsbridge.CallBackFunction
import
com.github.lzyzsd.jsbridge.DefaultHandler
import
com.mints.goodmoney.BuildConfig
...
...
@@ -83,22 +81,20 @@ class EraseActivity : BaseActivity(), View.OnClickListener{
private
fun
loadTurnUrl
()
{
getTurnUrl
()
blEarseWebview
.
setDefaultHandler
(
DefaultHandler
())
blEarseWebview
.
setWebChromeClient
(
WebChromeClient
()
)
blEarseWebview
.
setOnLongClickListener
(
OnLongClickListener
{
true
})
blEarseWebview
.
registerHandler
(
"getEraseResult"
,
BridgeHandler
{
data
,
function
->
if
(!
isFinishing
)
{
blEarseWebview
.
webChromeClient
=
WebChromeClient
(
)
blEarseWebview
.
setOnLongClickListener
{
true
}
blEarseWebview
.
registerHandler
(
"getEraseResult"
)
{
data
,
_
->
if
(!
isFinishing
)
{
val
turntableBean
:
TurntableBean
=
JsonUtil
.
parseJson
(
data
,
TurntableBean
::
class
.
java
)
if
(
turntableBean
!=
null
)
{
val
bundle
=
Bundle
()
bundle
.
putInt
(
Constant
.
MAIN_CUR_COIN
,
turntableBean
.
getCoin
()
)
bundle
.
putInt
(
Constant
.
MAIN_CUR_COIN
,
turntableBean
.
coin
)
bundle
.
putString
(
Constant
.
MAIN_CARRIER_TYPE
,
carrierType
)
bundle
.
putString
(
Constant
.
MAIN_EXTRA_ID
,
turntableBean
.
getKey
()
)
bundle
.
putString
(
Constant
.
MAIN_EXTRA_ID
,
turntableBean
.
key
)
readyGo
(
AwardActivity
::
class
.
java
,
bundle
)
androidCallJsReferse
()
}
}
})
blEarseWebview
.
setDefaultHandler
(
object
:
DefaultHandler
()
{
override
fun
handler
(
data
:
String
,
function
:
CallBackFunction
)
{
showToast
(
data
)
...
...
@@ -110,7 +106,7 @@ class EraseActivity : BaseActivity(), View.OnClickListener{
* 获取url
*/
private
fun
getTurnUrl
()
{
val
tokenID
:
String
=
userManager
.
getTokenID
()
val
tokenID
:
String
=
userManager
.
tokenID
val
url
:
String
=
BuildConfig
.
MainIp
+
"hang/card.html?carrierType="
+
carrierType
+
"&token="
+
tokenID
LogUtil
.
d
(
"getTurnUrl"
,
url
)
blEarseWebview
.
loadUrl
(
url
)
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/FeedbackActivity.kt
View file @
8285f2f2
package
com.mints.goodmoney.ui.activitys
import
android.annotation.SuppressLint
import
android.text.Editable
import
android.text.TextUtils
import
android.text.TextWatcher
...
...
@@ -54,13 +55,14 @@ class FeedbackActivity : BaseActivity()
etFeedbackContent
.
addTextChangedListener
(
object
:
TextWatcher
{
override
fun
beforeTextChanged
(
s
:
CharSequence
,
start
:
Int
,
count
:
Int
,
after
:
Int
)
{}
@SuppressLint
(
"SetTextI18n"
)
override
fun
onTextChanged
(
s
:
CharSequence
,
start
:
Int
,
before
:
Int
,
count
:
Int
)
{
if
(
s
.
toString
().
trim
{
it
<=
' '
}.
length
>
maxLength
)
{
etFeedbackContent
.
setText
(
s
.
toString
().
substring
(
0
,
maxLength
))
etFeedbackContent
.
setSelection
(
maxLength
)
showToast
(
"您最多能输入150个字"
)
}
tvFeedbackCount
.
setText
(
etFeedbackContent
.
getText
().
toString
().
length
.
toString
()
+
"/150"
)
tvFeedbackCount
.
text
=
etFeedbackContent
.
text
.
toString
().
length
.
toString
()
+
"/150"
}
override
fun
afterTextChanged
(
s
:
Editable
)
{}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/GuideActivity.kt
View file @
8285f2f2
...
...
@@ -62,7 +62,7 @@ class GuideActivity : BaseActivity() {
mImageViews
.
add
(
imageView
)
}
val
viewPagerAdapter
=
ViewPagerAdapter
(
mImageViews
)
vp_guide_viewpager
.
setAdapter
(
viewPagerAdapter
)
vp_guide_viewpager
.
adapter
=
viewPagerAdapter
vp_guide_viewpager
.
setOnPageChangeListener
(
mOnPagerChangeListener
)
}
...
...
@@ -72,16 +72,16 @@ class GuideActivity : BaseActivity() {
private
val
mOnPagerChangeListener
:
OnPageChangeListener
=
object
:
OnPageChangeListener
{
//当界面切换完成的时候调用的方法
override
fun
onPageSelected
(
position
:
Int
)
{
pageIndicatorView
.
se
tSelection
(
position
)
pageIndicatorView
.
se
lection
=
position
if
(
position
==
mImageViews
.
size
-
1
)
{
val
alphaAnimator
=
ObjectAnimator
.
ofFloat
(
btn_guide_start
,
"alpha"
,
0f
,
1f
)
alphaAnimator
.
repeatCount
=
0
animatorSet
.
play
(
alphaAnimator
)
animatorSet
.
duration
=
1500
animatorSet
.
start
()
btn_guide_start
.
setVisibility
(
View
.
VISIBLE
)
btn_guide_start
.
visibility
=
View
.
VISIBLE
}
else
{
btn_guide_start
.
setVisibility
(
View
.
INVISIBLE
)
btn_guide_start
.
visibility
=
View
.
INVISIBLE
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/LiebaoGameActivity.kt
View file @
8285f2f2
...
...
@@ -20,8 +20,8 @@ import java.util.*
* 作者:孟崔广
* 时间:2020/10/12 10:09
*/
class
LiebaoGameActivity
:
BaseActivity
()
,
View
.
OnClickListener
,
GameView
,
class
LiebaoGameActivity
:
BaseActivity
()
,
View
.
OnClickListener
,
GameView
,
IAppCallback
,
IGamePlayTimeCallback
,
IGameAdCallback
,
...
...
@@ -89,17 +89,16 @@ class LiebaoGameActivity : BaseActivity()
}
override
fun
gameInfo
(
sumTime
:
Int
,
sumCoin
:
Int
,
gameTime
:
Int
)
{
if
(!
isFinishing
)
{
if
(!
isFinishing
)
{
tvGameHint
.
visibility
=
View
.
VISIBLE
if
(
gameTime
>=
sumTime
)
{
tvGameHint
.
setText
(
"今日游戏任务已完成"
)
tvGameHint
.
text
=
"今日游戏任务已完成"
}
else
{
tvGameHint
.
setText
(
SpanUtils
()
tvGameHint
.
text
=
SpanUtils
()
.
append
(
"畅玩"
).
append
(
"${sumTime / 60}"
).
setForegroundColor
(
mContext
.
resources
.
getColor
(
R
.
color
.
color_FF9837
)).
append
(
"分钟, "
)
.
append
(
"奖励"
).
append
(
"${sumCoin}
"
).
setForegroundColor
(
mContext
.
resources
.
getColor
(
R
.
color
.
color_cb4a39
)).
append
(
"金币, "
)
.
append
(
"奖励"
).
append
(
"$sumCoin
"
).
setForegroundColor
(
mContext
.
resources
.
getColor
(
R
.
color
.
color_cb4a39
)).
append
(
"金币, "
)
.
append
(
"已玩"
).
append
(
"${gameTime / 60}"
).
setForegroundColor
(
mContext
.
resources
.
getColor
(
R
.
color
.
color_FF9837
)).
append
(
"分钟"
)
.
create
()
)
.
create
(
)
}
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/MainActivity.kt
View file @
8285f2f2
...
...
@@ -13,7 +13,6 @@ import com.mints.goodmoney.R
import
com.mints.goodmoney.ad.video.VedioAdingManager
import
com.mints.goodmoney.common.AppConfig
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.manager.TTPreLoadCarrierExpressManager
import
com.mints.goodmoney.manager.ZhangyueManager
import
com.mints.goodmoney.mvp.views.MainView
import
com.mints.goodmoney.ui.activitys.base.BaseActivity
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/MobileLoginActivity.kt
View file @
8285f2f2
...
...
@@ -51,7 +51,7 @@ class MobileLoginActivity : BaseActivity()
finish
()
}
R
.
id
.
tvLoginSendcode
->
{
var
mobile
=
etLoginMobile
.
getText
()
.
toString
().
trim
()
var
mobile
=
etLoginMobile
.
text
.
toString
().
trim
()
if
(
mobile
.
length
<
13
)
{
showToast
(
"请输入手机号"
)
return
...
...
@@ -62,13 +62,13 @@ class MobileLoginActivity : BaseActivity()
loginPresenter
.
sendMobileCode
(
mobile
)
}
R
.
id
.
tvLoginNext
->
{
var
mobile
=
etLoginMobile
.
getText
()
.
toString
().
trim
()
var
mobile
=
etLoginMobile
.
text
.
toString
().
trim
()
if
(
mobile
.
length
<
13
)
{
showToast
(
"请输入手机号"
)
return
}
va
r
code
=
etLoginCode
.
getText
()
.
toString
().
trim
()
va
l
code
=
etLoginCode
.
text
.
toString
().
trim
()
if
(
code
.
length
<
4
)
{
showToast
(
"请输入验证码"
)
return
...
...
@@ -107,7 +107,7 @@ class MobileLoginActivity : BaseActivity()
}
override
fun
sendCodeSuc
()
{
if
(!
isFinishing
()
)
{
if
(!
isFinishing
)
{
sendCodeThread
()
}
}
...
...
@@ -141,18 +141,18 @@ class MobileLoginActivity : BaseActivity()
fun
sendCodeThread
()
{
num
=
60
tvLoginSendcode
?.
let
{
it
.
setEnabled
(
false
)
it
.
setText
(
"($num)重新获取"
)
it
.
isEnabled
=
false
it
.
text
=
"($num)重新获取"
run
=
object
:
Runnable
{
override
fun
run
()
{
num
--
LogUtil
.
d
(
"login"
,
"login num:
"
+
num
)
LogUtil
.
d
(
"login"
,
"login num:
$num"
)
if
(
num
==
0
)
{
it
.
setText
(
"重新获取"
)
it
.
setEnabled
(
true
)
it
.
text
=
"重新获取"
it
.
isEnabled
=
true
}
else
{
it
.
setText
(
"($num)重新获取"
)
it
.
text
=
"($num)重新获取"
it
.
postDelayed
(
this
,
1000
)
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/SettingsActivity.kt
View file @
8285f2f2
...
...
@@ -236,7 +236,7 @@ class SettingsActivity : BaseActivity(), View.OnClickListener, OnLoginListener,
val
dialog
=
AlertDialog
.
Builder
(
this
)
.
setTitle
(
"请输入邀请码"
)
.
setPositiveButton
(
"确定"
)
{
dialog
,
which
->
.
setPositiveButton
(
"确定"
)
{
dialog
,
_
->
if
(
etInput
.
text
.
isEmpty
())
{
showToast
(
"请输入邀请码"
)
}
else
{
...
...
@@ -244,7 +244,7 @@ class SettingsActivity : BaseActivity(), View.OnClickListener, OnLoginListener,
}
}
.
setNegativeButton
(
"取消"
)
{
dialog
,
which
->
.
setNegativeButton
(
"取消"
)
{
dialog
,
_
->
dialog
.
dismiss
()
}
.
create
()
...
...
@@ -290,14 +290,14 @@ class SettingsActivity : BaseActivity(), View.OnClickListener, OnLoginListener,
try
{
wxInfo
=
WXInfo
()
wxInfo
?.
let
{
it
.
setUnionid
(
res
[
"unionid"
].
toString
()
+
""
)
it
.
setOpenid
(
res
[
"openid"
].
toString
()
+
""
)
it
.
setProvince
(
res
[
"province"
].
toString
()
+
""
)
it
.
setCity
(
res
[
"city"
].
toString
()
+
""
)
it
.
setCountry
(
res
[
"country"
].
toString
()
+
""
)
it
.
setHeadimgurl
(
res
[
"headimgurl"
].
toString
()
+
""
)
it
.
setNickname
(
res
[
"nickname"
].
toString
()
+
""
)
it
.
se
tSex
((
res
[
"sex"
].
toString
()
+
""
).
toInt
()
)
it
.
unionid
=
res
[
"unionid"
].
toString
()
+
""
it
.
openid
=
res
[
"openid"
].
toString
()
+
""
it
.
province
=
res
[
"province"
].
toString
()
+
""
it
.
city
=
res
[
"city"
].
toString
()
+
""
it
.
country
=
res
[
"country"
].
toString
()
+
""
it
.
headimgurl
=
res
[
"headimgurl"
].
toString
()
+
""
it
.
nickname
=
res
[
"nickname"
].
toString
()
+
""
it
.
se
x
=
(
res
[
"sex"
].
toString
()
+
""
).
toInt
(
)
}
if
(!
isFinishing
)
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/SplashADActivity.kt
View file @
8285f2f2
...
...
@@ -54,8 +54,6 @@ class SplashADActivity : BaseActivity(), SplashADListener {
}
}
// 预加载好兔视频
YLLittleVideoFragment
.
preloadVideo
()
}
override
fun
isApplyKitKatTranslucency
():
Boolean
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/SplashActivity.kt
View file @
8285f2f2
...
...
@@ -33,9 +33,6 @@ class SplashActivity : BaseActivity() {
// 校验APP签名
checkAppSign
()
// 预加载好兔视频
YLLittleVideoFragment
.
preloadVideo
()
}
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_splash
...
...
@@ -52,12 +49,10 @@ class SplashActivity : BaseActivity() {
override
fun
onDestroy
()
{
super
.
onDestroy
()
if
(
mAlph
!=
null
)
mAlph
.
cancel
()
if
(
animationSet
!=
null
)
{
mAlph
.
cancel
()
animationSet
.
cancel
()
animationSet
.
setAnimationListener
(
null
)
}
}
/**
...
...
@@ -68,6 +63,9 @@ class SplashActivity : BaseActivity() {
if
(!
deviceInfo
.
signInfo
)
{
finish
()
}
else
{
// 预加载好兔视频
YLLittleVideoFragment
.
preloadVideo
()
setAnimation
()
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/SplashYlhActivity.kt
View file @
8285f2f2
...
...
@@ -65,9 +65,6 @@ class SplashYlhActivity : BaseActivity(), SplashADListener {
}
// 校验APP签名
checkAppSign
()
// 预加载好兔视频
YLLittleVideoFragment
.
preloadVideo
()
}
override
fun
isApplyKitKatTranslucency
():
Boolean
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/WebActivity.kt
View file @
8285f2f2
...
...
@@ -28,11 +28,11 @@ class WebActivity : BaseActivity(), View.OnClickListener {
}
override
fun
initViewsAndEvents
()
{
pb_web
.
setProgress
(
0
)
pb_web
.
progress
=
0
if
(
TextUtils
.
isEmpty
(
title
))
{
tv_activity_title
.
setText
(
"推荐"
)
tv_activity_title
.
text
=
"推荐"
}
else
{
tv_activity_title
.
setText
(
title
)
tv_activity_title
.
text
=
title
}
if
(!
TextUtils
.
isEmpty
(
url
)
...
...
@@ -46,7 +46,7 @@ class WebActivity : BaseActivity(), View.OnClickListener {
}
if
(!
TextUtils
.
isEmpty
(
url
))
{
browser_layout
.
webView
?.
setWebViewClient
(
object
:
WebViewClient
()
{
browser_layout
.
webView
?.
webViewClient
=
object
:
WebViewClient
()
{
override
fun
shouldOverrideUrlLoading
(
view
:
WebView
,
url
:
String
...
...
@@ -63,10 +63,7 @@ class WebActivity : BaseActivity(), View.OnClickListener {
return
super
.
shouldOverrideUrlLoading
(
view
,
url
)
}
override
fun
onPageFinished
(
view
:
WebView
,
url
:
String
)
{
super
.
onPageFinished
(
view
,
url
)
}
})
browser_layout
.
loadUrl
(
url
)
}
else
{
showToast
(
"获取URL地址失败"
)
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/WxLoginActivity.kt
View file @
8285f2f2
...
...
@@ -139,14 +139,14 @@ class WxLoginActivity : BaseActivity()
try
{
wxInfo
=
WXInfo
()
wxInfo
?.
let
{
it
.
setUnionid
(
res
[
"unionid"
].
toString
()
+
""
)
it
.
setOpenid
(
res
[
"openid"
].
toString
()
+
""
)
it
.
setProvince
(
res
[
"province"
].
toString
()
+
""
)
it
.
setCity
(
res
[
"city"
].
toString
()
+
""
)
it
.
setCountry
(
res
[
"country"
].
toString
()
+
""
)
it
.
setHeadimgurl
(
res
[
"headimgurl"
].
toString
()
+
""
)
it
.
setNickname
(
res
[
"nickname"
].
toString
()
+
""
)
it
.
se
tSex
((
res
[
"sex"
].
toString
()
+
""
).
toInt
()
)
it
.
unionid
=
res
[
"unionid"
].
toString
()
+
""
it
.
openid
=
res
[
"openid"
].
toString
()
+
""
it
.
province
=
res
[
"province"
].
toString
()
+
""
it
.
city
=
res
[
"city"
].
toString
()
+
""
it
.
country
=
res
[
"country"
].
toString
()
+
""
it
.
headimgurl
=
res
[
"headimgurl"
].
toString
()
+
""
it
.
nickname
=
res
[
"nickname"
].
toString
()
+
""
it
.
se
x
=
(
res
[
"sex"
].
toString
()
+
""
).
toInt
(
)
}
if
(!
isFinishing
)
{
...
...
@@ -170,8 +170,8 @@ class WxLoginActivity : BaseActivity()
}
override
fun
updateDrawState
(
ds
:
TextPaint
)
{
ds
.
setColor
(
resources
.
getColor
(
R
.
color
.
color_FF9837
)
)
ds
.
setUnderlineText
(
false
)
ds
.
color
=
resources
.
getColor
(
R
.
color
.
color_FF9837
)
ds
.
isUnderlineText
=
false
}
})
.
append
(
"、"
)
...
...
@@ -184,8 +184,8 @@ class WxLoginActivity : BaseActivity()
}
override
fun
updateDrawState
(
ds
:
TextPaint
)
{
ds
.
setColor
(
resources
.
getColor
(
R
.
color
.
color_FF9837
)
)
ds
.
setUnderlineText
(
false
)
ds
.
color
=
resources
.
getColor
(
R
.
color
.
color_FF9837
)
ds
.
isUnderlineText
=
false
}
})
.
append
(
"与您的利益切身相关。请您注册前务必仔细阅读!点击登录即表示您同意并愿意遵守好赚钱协议"
)
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/DhGameFragment.kt
View file @
8285f2f2
...
...
@@ -5,14 +5,11 @@ import android.content.Intent
import
android.content.pm.ApplicationInfo
import
android.net.Uri
import
android.os.Build
import
android.text.TextUtils
import
android.view.View
import
android.view.ViewGroup
import
android.webkit.WebSettings
import
android.webkit.WebViewClient
import
com.mints.goodmoney.R
import
com.mints.goodmoney.common.AppConfig
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.manager.UserManager
import
com.mints.goodmoney.ui.fragment.base.LazyLoadBaseFragment
import
com.mints.goodmoney.utils.LogUtil
...
...
@@ -20,7 +17,6 @@ import com.mints.goodmoney.utils.MD5
import
com.mints.goodmoney.utils.URIEncoder
import
kotlinx.android.synthetic.main.fragment_main_dh.*
/**
* 描述:电魂游戏
* 作者:孟崔广
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/FriendsFragment.kt
View file @
8285f2f2
...
...
@@ -175,9 +175,6 @@ class FriendsFragment : BaseFragment(), FriendsView, OnRefreshListener, View.OnC
}
2
->
{
friendsPresenter
.
getContributionLeaders
()
}
else
->
{
}
}
}
...
...
@@ -223,8 +220,6 @@ class FriendsFragment : BaseFragment(), FriendsView, OnRefreshListener, View.OnC
2
->
{
friendsPresenter
.
getContributionLeaders
()
}
else
->
{
}
}
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/HorizChannelFragment.kt
View file @
8285f2f2
...
...
@@ -21,6 +21,11 @@ import kotlinx.android.synthetic.main.fragment_horiz_channel.cdvvYilanTime
import
kotlinx.android.synthetic.main.fragment_horiz_channel.vs_tips
import
net.grandcentrix.tray.AppPreferences
/**
* 描述:横版视频页面
* 作者:孟崔广
* 时间:2020/10/29 13:48
*/
class
HorizChannelFragment
:
BaseFragment
(),
HorizChannelView
,
View
.
OnClickListener
{
private
val
TAG
=
HorizChannelFragment
::
class
.
java
.
simpleName
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MainFragment.kt
View file @
8285f2f2
...
...
@@ -490,6 +490,7 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
* 设置视频权重
*/
private
fun
initAdWeight
(
data
:
UserTaskMsgBean
)
{
// vedioAdingManager?.initAdWeight(data.vedioRules.csJ_VEDIO.rate, data.vedioRules.ylH_VEDIO.rate, data.vedioRules.sdhZ_VEDIO.rate, data.vedioRules.fL_VEDIO.rate)
vedioAdingManager
?.
initAdWeight
(
data
.
vedioRules
.
csJ_VEDIO
.
rate
,
data
.
vedioRules
.
ylH_VEDIO
.
rate
,
data
.
vedioRules
.
sdhZ_VEDIO
.
rate
)
LogUtil
.
d
(
TAG
,
"首页权重值:csjWeight:${data.vedioRules.csJ_VEDIO.rate} ylhWeight:${data.vedioRules.ylH_VEDIO.rate} sdhzWeight:${data.vedioRules.sdhZ_VEDIO.rate}"
)
// 广告视频数
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
View file @
8285f2f2
...
...
@@ -16,7 +16,6 @@ import com.mints.goodmoney.ad.banner.BannerManager
import
com.mints.goodmoney.ad.video.VedioAdingManager
import
com.mints.goodmoney.common.AppConfig
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.common.DeviceInfo
import
com.mints.goodmoney.manager.*
import
com.mints.goodmoney.mvp.model.*
import
com.mints.goodmoney.mvp.presenters.MyPresenter
...
...
@@ -690,31 +689,31 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
}
}
/**
* 跳转QQ弹框
*/
private
fun
jumpQQ
()
{
cdaa
=
CustomDialogAsApple
(
context
,
object
:
DialogListener
()
{
override
fun
onClick
(
v
:
View
)
{
if
(
cdaa
!=
null
&&
cdaa
!!
.
isShowing
)
{
cdaa
!!
.
dismiss
()
}
when
(
v
.
id
)
{
R
.
id
.
dialog_btn_left
->
{
}
R
.
id
.
dialog_btn_right
->
{
QQJumpUtil
.
jumpQQ
(
requireActivity
())
}
}
}
})
cdaa
!!
.
setTitle
(
"提示"
)
cdaa
!!
.
setContent
(
"好赚钱想要打开QQ"
)
cdaa
!!
.
setLeft
(
"取消"
)
cdaa
!!
.
setRight
(
"打开"
)
cdaa
!!
.
show
()
}
//
/**
//
* 跳转QQ弹框
//
*/
//
private fun jumpQQ() {
//
cdaa = CustomDialogAsApple(context, object : DialogListener() {
//
override fun onClick(v: View) {
//
if (cdaa != null && cdaa!!.isShowing) {
//
cdaa!!.dismiss()
//
}
//
when (v.id) {
//
R.id.dialog_btn_left -> {
//
//
}
//
R.id.dialog_btn_right -> {
//
QQJumpUtil.jumpQQ(requireActivity())
//
}
//
}
//
}
//
})
//
cdaa!!.setTitle("提示")
//
cdaa!!.setContent("好赚钱想要打开QQ")
//
cdaa!!.setLeft("取消")
//
cdaa!!.setRight("打开")
//
cdaa!!.show()
//
}
/**
* 跳转QQ群弹框
...
...
@@ -849,12 +848,13 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
* 设置视频权重
*/
private
fun
initAdWeight
(
data
:
UserTaskMsgBean
)
{
vedioAdingManager
?.
initAdWeight
(
data
.
vedioRules
.
csJ_VEDIO
.
rate
,
data
.
vedioRules
.
ylH_VEDIO
.
rate
,
data
.
vedioRules
.
sdhZ_VEDIO
.
rate
)
LogUtil
.
d
(
TAG
,
"首页权重值:csjWeight:${data.vedioRules.csJ_VEDIO.rate} ylhWeight:${data.vedioRules.ylH_VEDIO.rate} sdhzWeight:${data.vedioRules.sdhZ_VEDIO.rate}"
)
vedioAdingManager
.
initAdWeight
(
data
.
vedioRules
.
csJ_VEDIO
.
rate
,
data
.
vedioRules
.
ylH_VEDIO
.
rate
,
data
.
vedioRules
.
sdhZ_VEDIO
.
rate
)
// vedioAdingManager.initAdWeight(data.vedioRules.csJ_VEDIO.rate, data.vedioRules.ylH_VEDIO.rate, data.vedioRules.sdhZ_VEDIO.rate, data.vedioRules.fL_VEDIO.rate)
LogUtil
.
d
(
TAG
,
"首页权重值:csjWeight:${data.vedioRules.csJ_VEDIO.rate} ylhWeight:${data.vedioRules.ylH_VEDIO.rate} sdhzWeight:${data.vedioRules.sdhZ_VEDIO.rate} flWeight:${data.vedioRules.fL_VEDIO.rate}"
)
// 广告视频数
AppConfig
.
csjVedioAdCount
=
data
.
vedioRules
.
csJ_VEDIO
.
surplus
AppConfig
.
ylhAdCount
=
data
.
vedioRules
.
ylH_VEDIO
.
surplus
AppConfig
.
wnVedioAdCount
=
data
.
vedioRules
.
sdhZ_VEDIO
.
surplus
LogUtil
.
d
(
TAG
,
"首页视频数:csjCount:${AppConfig.csjVedioAdCount} ylhCount:${AppConfig.ylhAdCount} sdhzCount:${AppConfig.wnVedioAdCount}"
)
LogUtil
.
d
(
TAG
,
"首页视频数:csjCount:${AppConfig.csjVedioAdCount} ylhCount:${AppConfig.ylhAdCount} sdhzCount:${AppConfig.wnVedioAdCount}
flCount:${AppConfig.flVedioAdCount}
"
)
}
}
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/PanFragment.kt
View file @
8285f2f2
...
...
@@ -3,7 +3,6 @@ package com.mints.goodmoney.ui.fragment
import
android.os.Bundle
import
android.text.TextUtils
import
android.view.MotionEvent
import
android.view.View
import
android.webkit.WebChromeClient
import
com.github.lzyzsd.jsbridge.CallBackFunction
import
com.github.lzyzsd.jsbridge.DefaultHandler
...
...
@@ -49,7 +48,7 @@ class PanFragment : BaseFragment(), PanView {
override
fun
onResume
()
{
super
.
onResume
()
if
(
AppConfig
.
fragmentClickFlag
==
=
Constant
.
FRAGMENT_CLICK_PAN
)
{
if
(
AppConfig
.
fragmentClickFlag
==
Constant
.
FRAGMENT_CLICK_PAN
)
{
if
(
TextUtils
.
isEmpty
(
userManager
?.
userID
))
{
// 游客登录
panPresenter
.
userLogin
()
...
...
@@ -73,18 +72,13 @@ class PanFragment : BaseFragment(), PanView {
*/
private
fun
loadTurnUrl
()
{
getTurnUrl
()
blTurntableWebview
.
setOnTouchListener
(
object
:
View
.
OnTouchListener
{
override
fun
onTouch
(
v
:
View
?,
event
:
MotionEvent
):
Boolean
{
return
event
.
action
==
MotionEvent
.
ACTION_MOVE
}
})
blTurntableWebview
.
setOnTouchListener
{
_
,
event
->
event
.
action
==
MotionEvent
.
ACTION_MOVE
}
blTurntableWebview
.
setDefaultHandler
(
DefaultHandler
())
blTurntableWebview
.
webChromeClient
=
WebChromeClient
()
blTurntableWebview
.
setOnLongClickListener
{
true
}
//注册监听方法当js中调用callHandler方法时会调用此方法(handlerName必须和js中相同)
blTurntableWebview
.
registerHandler
(
"getTurnResult"
)
{
data
,
function
->
blTurntableWebview
.
registerHandler
(
"getTurnResult"
)
{
data
,
_
->
val
turntableBean
:
TurntableBean
=
JsonUtil
.
parseJson
(
data
,
TurntableBean
::
class
.
java
)
if
(
turntableBean
!=
null
)
{
val
bundle
=
Bundle
()
bundle
.
putInt
(
Constant
.
MAIN_CUR_COIN
,
turntableBean
.
coin
)
bundle
.
putString
(
Constant
.
MAIN_CARRIER_TYPE
,
carrierType
)
...
...
@@ -93,7 +87,6 @@ class PanFragment : BaseFragment(), PanView {
androidCallJsReferse
()
}
}
blTurntableWebview
.
setDefaultHandler
(
object
:
DefaultHandler
()
{
override
fun
handler
(
data
:
String
,
function
:
CallBackFunction
)
{
showToast
(
data
)
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/ZhangyueFragment.kt
View file @
8285f2f2
...
...
@@ -92,7 +92,7 @@ class ZhangyueFragment : LazyLoadBaseFragment(), BookView, IreaderApi.OnReadChan
}
else
{
tvZhangContent
.
text
=
SpanUtils
()
.
append
(
"阅读"
).
append
(
"${sumTime / 60}"
).
setForegroundColor
(
mContext
.
resources
.
getColor
(
R
.
color
.
color_FF9837
)).
append
(
"分钟, "
)
.
append
(
"奖励"
).
append
(
"$
{sumCoin}
"
).
setForegroundColor
(
mContext
.
resources
.
getColor
(
R
.
color
.
color_cb4a39
)).
append
(
"金币, "
)
.
append
(
"奖励"
).
append
(
"$
sumCoin
"
).
setForegroundColor
(
mContext
.
resources
.
getColor
(
R
.
color
.
color_cb4a39
)).
append
(
"金币, "
)
.
append
(
"已读"
).
append
(
"${readTime / 60}"
).
setForegroundColor
(
mContext
.
resources
.
getColor
(
R
.
color
.
color_FF9837
)).
append
(
"分钟"
)
.
create
()
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/widgets/MyViewPager.java
View file @
8285f2f2
...
...
@@ -6,49 +6,37 @@ import android.view.MotionEvent;
import
androidx.viewpager.widget.ViewPager
;
public
class
MyViewPager
extends
ViewPager
{
public
class
MyViewPager
extends
ViewPager
{
public
MyViewPager
(
Context
context
)
{
public
MyViewPager
(
Context
context
)
{
super
(
context
);
}
public
MyViewPager
(
Context
context
,
AttributeSet
attrs
)
{
public
MyViewPager
(
Context
context
,
AttributeSet
attrs
)
{
super
(
context
,
attrs
);
// TODO Auto-generated constructor stub
}
private
boolean
isCanScroll
=
false
;
public
void
setCanScroll
(
boolean
isCanScroll
)
{
public
void
setCanScroll
(
boolean
isCanScroll
)
{
this
.
isCanScroll
=
isCanScroll
;
}
@Override
public
boolean
onTouchEvent
(
MotionEvent
arg0
)
{
if
(
isCanScroll
)
{
public
boolean
onTouchEvent
(
MotionEvent
arg0
)
{
if
(
isCanScroll
)
{
return
super
.
onTouchEvent
(
arg0
);
}
else
{
}
else
{
return
false
;
}
}
@Override
public
boolean
onInterceptTouchEvent
(
MotionEvent
arg0
)
{
if
(
isCanScroll
)
{
public
boolean
onInterceptTouchEvent
(
MotionEvent
arg0
)
{
if
(
isCanScroll
)
{
return
super
.
onInterceptTouchEvent
(
arg0
);
}
else
{
}
else
{
return
false
;
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/widgets/seekbar/BubbleSeekBar.java
View file @
8285f2f2
...
...
@@ -784,8 +784,8 @@ public class BubbleSeekBar extends View {
mProgress
=
(
mThumbCenterX
-
mLeft
)
*
mDelta
/
mTrackLength
+
mMin
;
mBubbleCenterRawX
=
mBubbleCenterRawSolidX
+
mThumbCenterX
-
mLeft
;
mLayoutParams
.
x
=
(
int
)
(
mBubbleCenterRawX
+
0.5f
);
if
(
mBubbleView
.
getParent
()
!=
null
&&
mWindowManager
!=
null
)
{
mLayoutParams
.
x
=
(
int
)
(
mBubbleCenterRawX
+
0.5f
);
mWindowManager
.
updateViewLayout
(
mBubbleView
,
mLayoutParams
);
}
mBubbleView
.
setProgressText
(
isShowProgressInFloat
?
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/utils/SystemUtils.kt
View file @
8285f2f2
...
...
@@ -24,7 +24,7 @@ object SystemUtils {
am
.
runningAppProcesses
?:
return
null
for
(
procInfo
in
runningApps
)
{
if
(
procInfo
.
pid
==
=
pid
)
{
if
(
procInfo
.
pid
==
pid
)
{
return
procInfo
.
processName
}
}
...
...
GoodMoney/app/src/main/res/layout/fragment_main_friends.xml
View file @
8285f2f2
...
...
@@ -38,7 +38,6 @@
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/color_F8F8F8"
android:orientation=
"vertical"
>
<RelativeLayout
...
...
@@ -294,8 +293,7 @@
android:orientation=
"vertical"
app:layout_constraintEnd_toStartOf=
"@id/ll2"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/line"
tools:layout_editor_absoluteY=
"9dp"
>
app:layout_constraintTop_toBottomOf=
"@id/line"
>
<TextView
android:id=
"@+id/friends_sum"
...
...
@@ -322,8 +320,7 @@
android:orientation=
"vertical"
app:layout_constraintEnd_toStartOf=
"@id/ll3"
app:layout_constraintStart_toEndOf=
"@id/ll1"
app:layout_constraintTop_toBottomOf=
"@id/line"
tools:layout_editor_absoluteY=
"9dp"
>
app:layout_constraintTop_toBottomOf=
"@id/line"
>
<TextView
android:id=
"@+id/friends_directly_sum"
...
...
@@ -353,8 +350,7 @@
android:orientation=
"vertical"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toEndOf=
"@id/ll2"
app:layout_constraintTop_toBottomOf=
"@id/line"
tools:layout_editor_absoluteY=
"9dp"
>
app:layout_constraintTop_toBottomOf=
"@id/line"
>
<TextView
android:id=
"@+id/friends_indirect_sum"
...
...
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