Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_fairyland_pro
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_fairyland_pro
Commits
b0fed741
Commit
b0fed741
authored
May 12, 2021
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加风控信息
parent
2165a9dd
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
28 additions
and
95 deletions
+28
-95
build.gradle
app/build.gradle
+3
-3
AppConfig.java
app/src/main/java/com/mints/fairyland/common/AppConfig.java
+6
-6
TtCsjAdManager.java
...main/java/com/mints/fairyland/manager/TtCsjAdManager.java
+1
-1
TrackPresenter.java
...va/com/mints/fairyland/mvp/presenters/TrackPresenter.java
+4
-0
AwardActivity.kt
...in/java/com/mints/fairyland/ui/activitys/AwardActivity.kt
+1
-1
DrawNativeVideoActivity.kt
...m/mints/fairyland/ui/activitys/DrawNativeVideoActivity.kt
+1
-1
KylVideoActivity.kt
...java/com/mints/fairyland/ui/activitys/KylVideoActivity.kt
+1
-1
MorningClockActivity.kt
.../com/mints/fairyland/ui/activitys/MorningClockActivity.kt
+1
-1
SettingsActivity.kt
...java/com/mints/fairyland/ui/activitys/SettingsActivity.kt
+2
-2
BaseActivity.java
...a/com/mints/fairyland/ui/activitys/base/BaseActivity.java
+3
-0
MainFragment.kt
...main/java/com/mints/fairyland/ui/fragment/MainFragment.kt
+1
-37
MyFragment.kt
...c/main/java/com/mints/fairyland/ui/fragment/MyFragment.kt
+2
-40
DrawcashVideoDialog.kt
.../mints/fairyland/ui/widgets/dialog/DrawcashVideoDialog.kt
+1
-1
item_fragment_main_my_customer_service.xml
...ain/res/layout/item_fragment_main_my_customer_service.xml
+1
-1
No files found.
app/build.gradle
View file @
b0fed741
...
...
@@ -9,8 +9,8 @@ android {
applicationId
"com.mints.fairyland"
minSdkVersion
rootProject
.
ext
.
androidMinSdkVersion
targetSdkVersion
rootProject
.
ext
.
androidTargetSdkVersion
versionCode
8
versionName
"1.0.
5
"
versionCode
9
versionName
"1.0.
6
"
flavorDimensions
"default"
// dex突破65535的限制
...
...
@@ -197,7 +197,7 @@ dependencies {
// 三方接入
// leakcanary
debugImplementation
'com.squareup.leakcanary:leakcanary-android:2.4'
//
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.4'
// 极光推送
implementation
'cn.jiguang.sdk:jpush:3.6.6'
implementation
'cn.jiguang.sdk:jcore:2.3.8'
...
...
app/src/main/java/com/mints/fairyland/common/AppConfig.java
View file @
b0fed741
...
...
@@ -80,27 +80,27 @@ public class AppConfig {
/**
* wnVideo 剩余广告播放数
*/
public
static
int
wnVideoAdCount
=
5
;
public
static
int
wnVideoAdCount
=
0
;
/**
* csjFull 剩余广告播放数
*/
public
static
int
csjFullVideoAdCount
=
5
;
public
static
int
csjFullVideoAdCount
=
0
;
/**
* flVideo 剩余广告播放数
*/
public
static
int
flVideoAdCount
=
5
;
public
static
int
flVideoAdCount
=
0
;
/**
* shVideo 剩余广告播放数
*/
public
static
int
shVideoAdCount
=
5
;
public
static
int
shVideoAdCount
=
0
;
/**
* ksVideo 剩余广告播放数
*/
public
static
int
ksVideoAdCount
=
5
;
public
static
int
ksVideoAdCount
=
0
;
/**
* rtaVideo 剩余广告播放数
*/
public
static
int
rtaVideoAdCount
=
5
;
public
static
int
rtaVideoAdCount
=
0
;
/**
* csjFull 剩余广告播放数
*/
...
...
app/src/main/java/com/mints/fairyland/manager/TtCsjAdManager.java
View file @
b0fed741
...
...
@@ -26,7 +26,7 @@ public class TtCsjAdManager {
public
static
String
TT_AD_BANNER_MY
=
"945932596"
;
// 个人中心
public
static
String
TT_AD_BANNER_JULEYUN
=
""
;
// 聚乐云
/*激励视频*/
public
static
String
TT_AD_VEDIO_MAIN_DEV
=
"9457108
75
"
;
// 开发使用
public
static
String
TT_AD_VEDIO_MAIN_DEV
=
"9457108
59
"
;
// 开发使用
public
static
String
TT_AD_VEDIO_DRINK
=
"945710875"
;
//喝水打卡
public
static
String
TT_AD_VEDIO_MAIN
=
"945710875"
;
// 我的界面视频
...
...
app/src/main/java/com/mints/fairyland/mvp/presenters/TrackPresenter.java
View file @
b0fed741
package
com
.
mints
.
fairyland
.
mvp
.
presenters
;
import
android.app.Activity
;
import
android.text.TextUtils
;
import
com.google.gson.JsonObject
;
import
com.mints.fairyland.MintsApplication
;
...
...
@@ -74,6 +75,9 @@ public class TrackPresenter extends BaseTrackPresenter {
@Override
public
void
onNext
(
BaseResponse
<
Object
>
baseResponse
)
{
if
(
TextUtils
.
equals
(
Constant
.
EVENT_TYPE_ONE
,
eventType
))
{
getAdWeight
();
}
}
});
}
...
...
app/src/main/java/com/mints/fairyland/ui/activitys/AwardActivity.kt
View file @
b0fed741
...
...
@@ -532,7 +532,7 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
override
fun
videoAdingListenerFail
(
adType
:
String
)
{
loadVideoFailCount
++
if
(
loadVideoFailCount
>=
2
)
{
if
(
loadVideoFailCount
>=
3
)
{
hideLoading
()
showToast
(
"加载失败,请稍后重试!"
)
}
else
{
...
...
app/src/main/java/com/mints/fairyland/ui/activitys/DrawNativeVideoActivity.kt
View file @
b0fed741
...
...
@@ -345,7 +345,7 @@ class DrawNativeVideoActivity : BaseActivity(),
override
fun
videoAdingListenerFail
(
adType
:
String
)
{
loadVideoFailCount
++
if
(
loadVideoFailCount
>=
2
)
{
if
(
loadVideoFailCount
>=
3
)
{
hideLoading
()
showToast
(
"加载失败,请稍后重试!"
)
}
else
{
...
...
app/src/main/java/com/mints/fairyland/ui/activitys/KylVideoActivity.kt
View file @
b0fed741
...
...
@@ -191,7 +191,7 @@ class KylVideoActivity : BaseActivity(), View.OnClickListener, KylVideoView {
override
fun
videoAdingListenerFail
(
adType
:
String
)
{
loadVideoFailCount
++
if
(
loadVideoFailCount
>=
2
)
{
if
(
loadVideoFailCount
>=
3
)
{
hideLoading
()
showToast
(
"加载失败,请稍后重试!"
)
}
else
{
...
...
app/src/main/java/com/mints/fairyland/ui/activitys/MorningClockActivity.kt
View file @
b0fed741
...
...
@@ -135,7 +135,7 @@ class MorningClockActivity : BaseActivity(), View.OnClickListener, MorningClockV
override
fun
videoAdingListenerFail
(
adType
:
String
)
{
loadVideoFailCount
++
if
(
loadVideoFailCount
>=
2
)
{
if
(
loadVideoFailCount
>=
3
)
{
hideLoading
()
showToast
(
"加载失败,请稍后重试!"
)
}
else
{
...
...
app/src/main/java/com/mints/fairyland/ui/activitys/SettingsActivity.kt
View file @
b0fed741
...
...
@@ -106,13 +106,13 @@ class SettingsActivity : BaseActivity(), View.OnClickListener, OnLoginListener,
item_wechat
.
findViewById
<
TextView
>(
R
.
id
.
tv_right
).
text
=
"未授权"
}
item_invitedCode
.
findViewById
<
TextView
>(
R
.
id
.
tv_title
).
text
=
"
邀请码
"
item_invitedCode
.
findViewById
<
TextView
>(
R
.
id
.
tv_title
).
text
=
"
用户ID
"
val
invitedCode
=
ContextCompat
.
getDrawable
(
mContext
,
R
.
mipmap
.
icon_settings_invite
)
invitedCode
?.
setBounds
(
0
,
0
,
56
,
56
)
item_invitedCode
.
findViewById
<
TextView
>(
R
.
id
.
tv_title
).
setCompoundDrawables
(
invitedCode
,
null
,
null
,
null
)
item_invitedCode
.
findViewById
<
TextView
>(
R
.
id
.
tv_right
).
visibility
=
View
.
VISIBLE
item_invitedCode
.
findViewById
<
ImageView
>(
R
.
id
.
iv_right
).
visibility
=
View
.
GONE
item_invitedCode
.
findViewById
<
TextView
>(
R
.
id
.
tv_right
).
text
=
UserManager
.
getInstance
().
codeID
item_invitedCode
.
findViewById
<
TextView
>(
R
.
id
.
tv_right
).
text
=
"ZZ-"
+
UserManager
.
getInstance
().
codeID
item_cleanCache
.
findViewById
<
TextView
>(
R
.
id
.
tv_title
).
text
=
"清理缓存"
val
cleanCache
=
ContextCompat
.
getDrawable
(
this
,
R
.
mipmap
.
icon_settings_clean
)
...
...
app/src/main/java/com/mints/fairyland/ui/activitys/base/BaseActivity.java
View file @
b0fed741
...
...
@@ -34,6 +34,9 @@ public abstract class BaseActivity extends BaseAppCompatActivity implements Base
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
getWindow
().
addFlags
(
WindowManager
.
LayoutParams
.
FLAG_SECURE
);
if
(
android
.
os
.
Build
.
VERSION
.
SDK_INT
!=
Build
.
VERSION_CODES
.
O
)
{
setRequestedOrientation
(
ActivityInfo
.
SCREEN_ORIENTATION_PORTRAIT
);
}
...
...
app/src/main/java/com/mints/fairyland/ui/fragment/MainFragment.kt
View file @
b0fed741
...
...
@@ -238,7 +238,7 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
// 新人福利 放到个人中心展示 防止首页红包转动异常
// 设置视频权重
initAdWeight
(
data
)
UserWeight
.
initAdWeight
(
data
)
initExpress
(
data
.
flowAdRules
)
// 调用金币视频信息接口
...
...
@@ -561,42 +561,6 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
})
}
/**
* 设置视频权重
*/
private
fun
initAdWeight
(
data
:
UserTaskMsgBean
)
{
videoAdingManager
?.
initAdWeight
(
data
.
vedioRules
.
csJ_VEDIO
.
rate
,
data
.
vedioRules
.
ylH_VEDIO
.
rate
,
data
.
vedioRules
.
sdhZ_VEDIO
.
rate
,
data
.
vedioRules
.
fL_VEDIO
.
rate
,
data
.
vedioRules
.
corAl_VIDEO
.
rate
,
data
.
vedioRules
.
csjfulL_VEDIO
.
rate
,
data
.
vedioRules
.
kS_VEDIO
.
rate
)
LogUtil
.
d
(
TAG
,
"首页权重值:csjWeight:${data.vedioRules.csJ_VEDIO.rate} "
+
"ylhWeight:${data.vedioRules.ylH_VEDIO.rate} "
+
"sdhzWeight:${data.vedioRules.sdhZ_VEDIO.rate} "
+
"csjFullWeight:${data.vedioRules.csjfulL_VEDIO.rate} "
+
"shWeight:${data.vedioRules.corAl_VIDEO.rate} "
+
"flWeight:${data.vedioRules.fL_VEDIO.rate} "
+
"ksWeight:${data.vedioRules.kS_VEDIO.rate}"
)
// 广告视频数
AppConfig
.
csjVideoAdCount
=
data
.
vedioRules
.
csJ_VEDIO
.
surplus
AppConfig
.
ylhAdCount
=
data
.
vedioRules
.
ylH_VEDIO
.
surplus
AppConfig
.
wnVideoAdCount
=
data
.
vedioRules
.
sdhZ_VEDIO
.
surplus
AppConfig
.
flVideoAdCount
=
data
.
vedioRules
.
fL_VEDIO
.
surplus
AppConfig
.
csjFullVideoAdCount
=
data
.
vedioRules
.
csjfulL_VEDIO
.
surplus
AppConfig
.
shVideoAdCount
=
data
.
vedioRules
.
corAl_VIDEO
.
surplus
AppConfig
.
ksVideoAdCount
=
data
.
vedioRules
.
kS_VEDIO
.
surplus
LogUtil
.
d
(
TAG
,
"首页视频数:csjCount:${AppConfig.csjVideoAdCount} "
+
"ylhCount:${AppConfig.ylhAdCount} "
+
"sdhzCount:${AppConfig.wnVideoAdCount} "
+
"csjFullCount:${AppConfig.csjFullVideoAdCount} "
+
"shCount:${AppConfig.shVideoAdCount} "
+
"flCount:${AppConfig.flVideoAdCount} "
+
"ksCount:${AppConfig.ksVideoAdCount}"
)
}
private
fun
initExpress
(
flowAdRules
:
FlowAdRulesBean
)
{
PreLoadExpressManager
.
init
(
flowAdRules
.
csj
,
flowAdRules
.
ylh
,
flowAdRules
.
ks
)
...
...
app/src/main/java/com/mints/fairyland/ui/fragment/MyFragment.kt
View file @
b0fed741
...
...
@@ -313,7 +313,7 @@ class MyFragment : BaseFragment(),
}
// 更新权重
initAdWeight
(
data
)
UserWeight
.
initAdWeight
(
data
)
initExpress
(
data
.
flowAdRules
)
AppConfig
.
app_black_name
=
data
.
userRiskApps
.
userRiskAppName
AppConfig
.
app_black_pkg
=
data
.
userRiskApps
.
userRiskAppPkg
...
...
@@ -1077,7 +1077,7 @@ class MyFragment : BaseFragment(),
override
fun
videoAdingListenerFail
(
adType
:
String
)
{
loadVideoFailCount
++
if
(
loadVideoFailCount
>=
2
)
{
if
(
loadVideoFailCount
>=
3
)
{
hideLoading
()
showToast
(
"加载失败,请稍后重试!"
)
}
else
{
...
...
@@ -1203,44 +1203,6 @@ class MyFragment : BaseFragment(),
mainMyAdapter
?.
setOnItemChildClickListener
(
this
)
}
/**
* 设置视频权重
*/
private
fun
initAdWeight
(
data
:
UserTaskMsgBean
)
{
videoAdingManager
.
initAdWeight
(
data
.
vedioRules
.
csJ_VEDIO
.
rate
,
data
.
vedioRules
.
ylH_VEDIO
.
rate
,
data
.
vedioRules
.
sdhZ_VEDIO
.
rate
,
data
.
vedioRules
.
fL_VEDIO
.
rate
,
data
.
vedioRules
.
corAl_VIDEO
.
rate
,
data
.
vedioRules
.
csjfulL_VEDIO
.
rate
,
data
.
vedioRules
.
kS_VEDIO
.
rate
)
LogUtil
.
d
(
TAG
,
"首页权重值:csjWeight:${data.vedioRules.csJ_VEDIO.rate} "
+
"ylhWeight:${data.vedioRules.ylH_VEDIO.rate} "
+
"sdhzWeight:${data.vedioRules.sdhZ_VEDIO.rate} "
+
"csjFullWeight:${data.vedioRules.csjfulL_VEDIO.rate} "
+
"shWeight:${data.vedioRules.corAl_VIDEO.rate} "
+
"flWeight:${data.vedioRules.fL_VEDIO.rate} "
+
"ksWeight:${data.vedioRules.kS_VEDIO.rate}"
)
// 广告视频数
AppConfig
.
csjVideoAdCount
=
data
.
vedioRules
.
csJ_VEDIO
.
surplus
AppConfig
.
ylhAdCount
=
data
.
vedioRules
.
ylH_VEDIO
.
surplus
AppConfig
.
wnVideoAdCount
=
data
.
vedioRules
.
sdhZ_VEDIO
.
surplus
AppConfig
.
flVideoAdCount
=
data
.
vedioRules
.
fL_VEDIO
.
surplus
AppConfig
.
shVideoAdCount
=
data
.
vedioRules
.
corAl_VIDEO
.
surplus
AppConfig
.
ksVideoAdCount
=
data
.
vedioRules
.
kS_VEDIO
.
surplus
LogUtil
.
d
(
TAG
,
"首页视频数:csjCount:${AppConfig.csjVideoAdCount} "
+
"ylhCount:${AppConfig.ylhAdCount} "
+
"sdhzCount:${AppConfig.wnVideoAdCount} "
+
"csjFullCount:${AppConfig.csjFullVideoAdCount} "
+
"shCount:${AppConfig.shVideoAdCount} "
+
"flCount:${AppConfig.flVideoAdCount} "
+
"rtaCount:${AppConfig.rtaVideoAdCount} "
+
"ksCount:${AppConfig.ksVideoAdCount}"
)
}
private
fun
initExpress
(
flowAdRules
:
FlowAdRulesBean
)
{
PreLoadExpressManager
.
init
(
flowAdRules
.
csj
,
flowAdRules
.
ylh
,
flowAdRules
.
ks
)
}
...
...
app/src/main/java/com/mints/fairyland/ui/widgets/dialog/DrawcashVideoDialog.kt
View file @
b0fed741
...
...
@@ -108,7 +108,7 @@ class DrawcashVideoDialog(activity: Activity) :
override
fun
videoAdingListenerFail
(
adType
:
String
)
{
loadVideoFailCount
++
if
(
loadVideoFailCount
>=
2
)
{
if
(
loadVideoFailCount
>=
3
)
{
ToastUtil
.
show
(
activity
,
"加载超时,请休息一下"
)
}
else
{
loadVideo
(
videoAdingManager
,
bean
,
false
)
...
...
app/src/main/res/layout/item_fragment_main_my_customer_service.xml
View file @
b0fed741
...
...
@@ -24,6 +24,6 @@
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:layout_marginBottom=
"20dp"
android:text=
"请关注公众号:
金币宝箱
,获取更多赚钱资讯"
/>
android:text=
"请关注公众号:
淘金空间
,获取更多赚钱资讯"
/>
</merge>
\ No newline at end of file
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