Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_youyou
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
android
android_youyou
Commits
189b0d01
Commit
189b0d01
authored
Apr 02, 2021
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化穿山甲,优量汇codeid逻辑
parent
03bde953
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
339 additions
and
275 deletions
+339
-275
CsjCode.kt
app/src/main/java/com/wenshu/youyou/ad/code/CsjCode.kt
+51
-0
YlhCode.kt
app/src/main/java/com/wenshu/youyou/ad/code/YlhCode.kt
+51
-0
CsjVideoAdManager.java
...in/java/com/wenshu/youyou/ad/video/CsjVideoAdManager.java
+29
-54
YlhVideoAdManager.java
...in/java/com/wenshu/youyou/ad/video/YlhVideoAdManager.java
+19
-75
ChannelManager.kt
...src/main/java/com/wenshu/youyou/manager/ChannelManager.kt
+4
-4
TtCsjAdManager.java
...c/main/java/com/wenshu/youyou/manager/TtCsjAdManager.java
+61
-61
YlhAdManager.kt
app/src/main/java/com/wenshu/youyou/manager/YlhAdManager.kt
+62
-62
CodeBean.kt
app/src/main/java/com/wenshu/youyou/mvp/model/CodeBean.kt
+8
-0
HomePresenter.kt
...in/java/com/wenshu/youyou/mvp/presenters/HomePresenter.kt
+31
-5
LoanService.java
app/src/main/java/com/wenshu/youyou/net/LoanService.java
+10
-0
MainFragment.kt
...c/main/java/com/wenshu/youyou/ui/fragment/MainFragment.kt
+4
-5
MyFragment.kt
...src/main/java/com/wenshu/youyou/ui/fragment/MyFragment.kt
+1
-1
ToastUtil.java
app/src/main/java/com/wenshu/youyou/utils/ToastUtil.java
+8
-8
No files found.
app/src/main/java/com/wenshu/youyou/ad/code/CsjCode.kt
0 → 100644
View file @
189b0d01
package
com.wenshu.youyou.ad.code
import
com.wenshu.youyou.manager.TtCsjAdManager
import
com.wenshu.youyou.utils.LogUtil
/**
* 描述:穿山甲代码位策略
* 作者:孟崔广
* 时间:2021/4/1 14:02
*/
object
CsjCode
{
private
val
TAG
=
CsjCode
::
class
.
java
.
simpleName
var
currentCodePosition
=
0
//当前代码位位置
var
codeSize
=
0
// 代码位总数
private
var
listCode
:
MutableList
<
String
>?
=
null
fun
initListCode
(
listCode
:
MutableList
<
String
>?)
{
listCode
?.
let
{
this
.
listCode
=
it
codeSize
=
it
.
size
}
}
/**
* 轮训获取列表中的代码位
*
* 一轮获取完成后,重新开始
*/
fun
getCodeId
():
String
{
var
codeId
=
TtCsjAdManager
.
TT_AD_VEDIO_MOREDIALOG
//默认
if
(
codeSize
>
0
)
{
listCode
?.
let
{
// currentCodePosition == codeSize表示一轮获取完成,需重新开始
if
(
currentCodePosition
==
codeSize
)
{
currentCodePosition
=
0
}
codeId
=
it
[
currentCodePosition
]
LogUtil
.
d
(
TAG
,
"穿山甲激励视频-->总大小:${codeSize} 当前位置:${currentCodePosition} 当前位置codeId:${codeId}"
)
currentCodePosition
++
}
}
return
codeId
}
}
\ No newline at end of file
app/src/main/java/com/wenshu/youyou/ad/code/YlhCode.kt
0 → 100644
View file @
189b0d01
package
com.wenshu.youyou.ad.code
import
com.wenshu.youyou.manager.YlhAdManager
import
com.wenshu.youyou.utils.LogUtil
/**
* 描述:优量汇代码位策略
* 作者:孟崔广
* 时间:2021/4/1 14:30
*/
object
YlhCode
{
private
val
TAG
=
YlhCode
::
class
.
java
.
simpleName
var
currentCodePosition
=
0
//当前代码位位置
var
codeSize
=
0
// 代码位总数
private
var
listCode
:
MutableList
<
String
>?
=
null
fun
initListCode
(
listCode
:
MutableList
<
String
>?)
{
listCode
?.
let
{
this
.
listCode
=
it
codeSize
=
it
.
size
}
}
/**
* 轮训获取列表中的代码位
*
* 一轮获取完成后,重新开始
*/
fun
getCodeId
():
String
{
var
codeId
=
YlhAdManager
.
YLH_AD_VEDIO_MOREDIALOG
//默认
if
(
codeSize
>
0
)
{
listCode
?.
let
{
// currentCodePosition == codeSize表示一轮获取完成,需重新开始
if
(
currentCodePosition
==
codeSize
)
{
currentCodePosition
=
0
}
codeId
=
it
[
currentCodePosition
]
LogUtil
.
d
(
TAG
,
"优量汇激励视频-->总大小:${codeSize} 当前位置:${currentCodePosition} 当前位置codeId:${codeId}"
)
currentCodePosition
++
}
}
return
codeId
}
}
\ No newline at end of file
app/src/main/java/com/wenshu/youyou/ad/video/CsjVideoAdManager.java
View file @
189b0d01
...
@@ -8,6 +8,8 @@ import com.bytedance.sdk.openadsdk.TTAdNative;
...
@@ -8,6 +8,8 @@ import com.bytedance.sdk.openadsdk.TTAdNative;
import
com.bytedance.sdk.openadsdk.TTAppDownloadListener
;
import
com.bytedance.sdk.openadsdk.TTAppDownloadListener
;
import
com.bytedance.sdk.openadsdk.TTRewardVideoAd
;
import
com.bytedance.sdk.openadsdk.TTRewardVideoAd
;
import
com.wenshu.youyou.BuildConfig
;
import
com.wenshu.youyou.BuildConfig
;
import
com.wenshu.youyou.WenshuApplication
;
import
com.wenshu.youyou.ad.code.CsjCode
;
import
com.wenshu.youyou.ad.video.base.BaseVideoAd
;
import
com.wenshu.youyou.ad.video.base.BaseVideoAd
;
import
com.wenshu.youyou.ad.video.base.VideoAdStatusListener
;
import
com.wenshu.youyou.ad.video.base.VideoAdStatusListener
;
import
com.wenshu.youyou.common.AppConfig
;
import
com.wenshu.youyou.common.AppConfig
;
...
@@ -19,6 +21,7 @@ import com.wenshu.youyou.manager.UserManager;
...
@@ -19,6 +21,7 @@ import com.wenshu.youyou.manager.UserManager;
import
com.wenshu.youyou.utils.LogUtil
;
import
com.wenshu.youyou.utils.LogUtil
;
import
com.wenshu.youyou.utils.MD5
;
import
com.wenshu.youyou.utils.MD5
;
import
com.wenshu.library.utils.json.JsonUtil
;
import
com.wenshu.library.utils.json.JsonUtil
;
import
com.wenshu.youyou.utils.ToastUtil
;
import
net.grandcentrix.tray.AppPreferences
;
import
net.grandcentrix.tray.AppPreferences
;
...
@@ -82,61 +85,11 @@ public class CsjVideoAdManager extends BaseVideoAd {
...
@@ -82,61 +85,11 @@ public class CsjVideoAdManager extends BaseVideoAd {
isClickScreen
=
true
;
isClickScreen
=
true
;
this
.
curCoin
=
curCoin
;
this
.
curCoin
=
curCoin
;
this
.
extraId
=
extraId
;
this
.
extraId
=
extraId
;
String
codeId
=
TtCsjAdManager
.
TT_AD_VEDIO_MAIN_DEV
;
if
(!
BuildConfig
.
DEBUG
)
{
switch
(
carrierType
)
{
case
Constant
.
CARRIER_VERSUS_VIDEO
:
// 每日任务视频
codeId
=
TtCsjAdManager
.
TT_AD_VEDIO_MAIN
;
break
;
case
Constant
.
CARRIER_OFFLINE_DOUBLE
:
// 离线收益翻倍
codeId
=
TtCsjAdManager
.
TT_AD_VEDIO_OFFINELINE
;
break
;
case
Constant
.
CARRIER_SIGNIN_HOMEPAGE_CARD
:
// 签到翻倍
codeId
=
TtCsjAdManager
.
TT_AD_VEDIO_SIGN
;
break
;
case
Constant
.
CARRIER_WALK_BUBBLE
:
// 汽泡
codeId
=
TtCsjAdManager
.
TT_AD_VEDIO_MOREDIALOG
;
break
;
case
Constant
.
CARRIER_HOMEWATER
:
// 喝水
codeId
=
TtCsjAdManager
.
TT_AD_VEDIO_DRINK
;
break
;
case
Constant
.
CARRIER_WALK
:
// 走路
codeId
=
TtCsjAdManager
.
TT_AD_VEDIO_WALK
;
break
;
case
Constant
.
CARRIER_CHALLENGE_TURN
:
// 大转盘
codeId
=
TtCsjAdManager
.
TT_AD_VEDIO_TURNABLE
;
break
;
case
Constant
.
CARRIER_DRAWCASH
:
// 提现
codeId
=
TtCsjAdManager
.
TT_AD_VEDIO_DRAWCASH
;
break
;
case
Constant
.
CARRIER_CHALLENGE_CARD
:
// 刮刮乐
codeId
=
TtCsjAdManager
.
TT_AD_VEDIO_ERASE
;
break
;
case
Constant
.
CARRIER_BLESSINGBAG_DOUBLE
:
// 福袋
codeId
=
TtCsjAdManager
.
TT_AD_VEDIO_BLESSINGBAG
;
break
;
case
Constant
.
CARRIER_HOMEVEDIO_DOUBLE
:
// 首页视频翻倍
codeId
=
TtCsjAdManager
.
TT_AD_VEDIO_HOMEVEDIO
;
break
;
case
Constant
.
CARRIER_SMALLHOMEVEDIO_DOUBLE
:
// 短视频翻倍
codeId
=
TtCsjAdManager
.
TT_AD_VEDIO_SMALLHOMEVEDIO
;
break
;
case
Constant
.
CARRIER_KUYINYUE_VEDIO
:
// 来电秀
codeId
=
TtCsjAdManager
.
TT_AD_VEDIO_KYLVEDIO
;
break
;
case
Constant
.
CARRIER_EATMEAL_SUBSIDY
:
// 饭补
codeId
=
TtCsjAdManager
.
TT_AD_VEDIO_EAT
;
break
;
case
Constant
.
CARRIER_HIGH_ACTIVITY
:
// 超级翻倍/高额任务
codeId
=
TtCsjAdManager
.
TT_AD_VEDIO_MOST
;
break
;
default
:
codeId
=
TtCsjAdManager
.
TT_AD_VEDIO_MOREDIALOG
;
break
;
}
}
// showToast("穿山甲激励视频代码位:" + codeId);
String
codeId
=
getCodeId
(
carrierType
);
ToastUtil
.
showLong
(
WenshuApplication
.
getContext
(),
"穿山甲激励视频代码位:"
+
codeId
);
String
userID
=
userManager
.
getUserID
();
String
userID
=
userManager
.
getUserID
();
String
tid
=
MD5
.
GetMD5Code
(
System
.
currentTimeMillis
()
+
userID
);
String
tid
=
MD5
.
GetMD5Code
(
System
.
currentTimeMillis
()
+
userID
);
...
@@ -277,6 +230,28 @@ public class CsjVideoAdManager extends BaseVideoAd {
...
@@ -277,6 +230,28 @@ public class CsjVideoAdManager extends BaseVideoAd {
}
}
}
}
/**
* 获取codeId
*
* @param carrierType
* @return
*/
private
String
getCodeId
(
String
carrierType
)
{
String
codeId
=
TtCsjAdManager
.
TT_AD_VEDIO_MAIN_DEV
;
if
(!
BuildConfig
.
DEBUG
)
{
switch
(
carrierType
)
{
case
Constant
.
CARRIER_BLESSINGBAG_DOUBLE
:
// 福袋
codeId
=
TtCsjAdManager
.
TT_AD_VEDIO_BLESSINGBAG
;
break
;
default
:
codeId
=
CsjCode
.
INSTANCE
.
getCodeId
();
break
;
}
}
return
codeId
;
}
/**
/**
* 封装广告数据,请求服务器
* 封装广告数据,请求服务器
*
*
...
...
app/src/main/java/com/wenshu/youyou/ad/video/YlhVideoAdManager.java
View file @
189b0d01
...
@@ -3,6 +3,8 @@ package com.wenshu.youyou.ad.video;
...
@@ -3,6 +3,8 @@ package com.wenshu.youyou.ad.video;
import
android.app.Activity
;
import
android.app.Activity
;
import
android.os.SystemClock
;
import
android.os.SystemClock
;
import
com.wenshu.youyou.WenshuApplication
;
import
com.wenshu.youyou.ad.code.YlhCode
;
import
com.wenshu.youyou.ad.video.base.BaseVideoAd
;
import
com.wenshu.youyou.ad.video.base.BaseVideoAd
;
import
com.wenshu.youyou.ad.video.base.VideoAdStatusListener
;
import
com.wenshu.youyou.ad.video.base.VideoAdStatusListener
;
import
com.wenshu.youyou.common.AppConfig
;
import
com.wenshu.youyou.common.AppConfig
;
...
@@ -13,6 +15,7 @@ import com.wenshu.youyou.utils.LogUtil;
...
@@ -13,6 +15,7 @@ import com.wenshu.youyou.utils.LogUtil;
import
com.qq.e.ads.rewardvideo.RewardVideoAD
;
import
com.qq.e.ads.rewardvideo.RewardVideoAD
;
import
com.qq.e.ads.rewardvideo.RewardVideoADListener
;
import
com.qq.e.ads.rewardvideo.RewardVideoADListener
;
import
com.qq.e.comm.util.AdError
;
import
com.qq.e.comm.util.AdError
;
import
com.wenshu.youyou.utils.ToastUtil
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -49,81 +52,9 @@ public class YlhVideoAdManager extends BaseVideoAd {
...
@@ -49,81 +52,9 @@ public class YlhVideoAdManager extends BaseVideoAd {
public
void
loadAd
(
Activity
activity
,
int
curCoin
,
String
carrierType
,
String
extraId
)
{
public
void
loadAd
(
Activity
activity
,
int
curCoin
,
String
carrierType
,
String
extraId
)
{
isClickScreen
=
true
;
isClickScreen
=
true
;
String
ylhPostId
;
// switch (carrierType) {
String
ylhPostId
=
getCodeId
(
carrierType
);
// case Constant.CARRIER_VERSUS_VIDEO:// 每日任务视频
ToastUtil
.
showLong
(
WenshuApplication
.
getContext
(),
"优量汇激励视频代码位:"
+
ylhPostId
);
// ylhPostId = YlhAdManager.YLH_AD_VEDIO_MAIN_POSTID;
// break;
// case Constant.CARRIER_OFFLINE_DOUBLE:// 离线收益翻倍
// case Constant.CARRIER_SIGNIN_HOMEPAGE_CARD:// 签到翻倍
// case Constant.CARRIER_WALK_BUBBLE:// 汽泡
// ylhPostId = YlhAdManager.YLH_AD_VEDIO_MOREDIALOG_POSTID;
// break;
// case Constant.CARRIER_HOMEWATER:// 喝水
// ylhPostId = YlhAdManager.YLH_AD_VEDIO_DRINK_POSTID;
// break;
// case Constant.CARRIER_CHALLENGE_TURN:// 大转盘
// case Constant.CARRIER_DRAWCASH:// 提现
// ylhPostId = YlhAdManager.YLH_AD_VEDIO_TURNABLE_POSTID;
// break;
// case Constant.CARRIER_CHALLENGE_CARD:// 刮刮乐
// ylhPostId = YlhAdManager.YLH_AD_VEDIO_ERASE_POSTID;
// break;
// default:// 在线收益翻倍
// ylhPostId = YlhAdManager.YLH_AD_VEDIO_MOREDIALOG_POSTID;
// break;
// }
switch
(
carrierType
)
{
case
Constant
.
CARRIER_VERSUS_VIDEO
:
// 每日任务视频
ylhPostId
=
YlhAdManager
.
INSTANCE
.
getYLH_AD_VEDIO_MAIN
();
break
;
case
Constant
.
CARRIER_OFFLINE_DOUBLE
:
// 离线收益翻倍
ylhPostId
=
YlhAdManager
.
INSTANCE
.
getYLH_AD_VEDIO_OFFINELINE
();
break
;
case
Constant
.
CARRIER_SIGNIN_HOMEPAGE_CARD
:
// 签到翻倍
ylhPostId
=
YlhAdManager
.
INSTANCE
.
getYLH_AD_VEDIO_SIGN
();
break
;
case
Constant
.
CARRIER_WALK_BUBBLE
:
// 汽泡
ylhPostId
=
YlhAdManager
.
INSTANCE
.
getYLH_AD_VEDIO_MOREDIALOG
();
break
;
case
Constant
.
CARRIER_HOMEWATER
:
// 喝水
ylhPostId
=
YlhAdManager
.
INSTANCE
.
getYLH_AD_VEDIO_DRINK
();
break
;
case
Constant
.
CARRIER_WALK
:
// 走路
ylhPostId
=
YlhAdManager
.
INSTANCE
.
getYLH_AD_VEDIO_WALK
();
break
;
case
Constant
.
CARRIER_CHALLENGE_TURN
:
// 大转盘
ylhPostId
=
YlhAdManager
.
INSTANCE
.
getYLH_AD_VEDIO_TURNABLE
();
break
;
case
Constant
.
CARRIER_DRAWCASH
:
// 提现
ylhPostId
=
YlhAdManager
.
INSTANCE
.
getYLH_AD_VEDIO_DRAWCASH
();
break
;
case
Constant
.
CARRIER_CHALLENGE_CARD
:
// 刮刮乐
ylhPostId
=
YlhAdManager
.
INSTANCE
.
getYLH_AD_VEDIO_ERASE
();
break
;
case
Constant
.
CARRIER_BLESSINGBAG_DOUBLE
:
// 福袋
ylhPostId
=
YlhAdManager
.
INSTANCE
.
getYLH_AD_VEDIO_BLESSINGBAG
();
break
;
case
Constant
.
CARRIER_HOMEVEDIO_DOUBLE
:
// 首页视频翻倍
ylhPostId
=
YlhAdManager
.
INSTANCE
.
getYLH_AD_VEDIO_HOMEVEDIO
();
break
;
case
Constant
.
CARRIER_SMALLHOMEVEDIO_DOUBLE
:
// 短视频翻倍
ylhPostId
=
YlhAdManager
.
INSTANCE
.
getYLH_AD_VEDIO_SMALLHOMEVEDIO
();
break
;
case
Constant
.
CARRIER_KUYINYUE_VEDIO
:
// 来电秀
ylhPostId
=
YlhAdManager
.
INSTANCE
.
getYLH_AD_VEDIO_KYLVEDIO
();
break
;
case
Constant
.
CARRIER_EATMEAL_SUBSIDY
:
// 饭补
ylhPostId
=
YlhAdManager
.
INSTANCE
.
getYLH_AD_VEDIO_EAT
();
break
;
case
Constant
.
CARRIER_HIGH_ACTIVITY
:
// 超级翻倍/高额任务
ylhPostId
=
YlhAdManager
.
INSTANCE
.
getYLH_AD_VEDIO_MOST
();
break
;
default
:
ylhPostId
=
YlhAdManager
.
INSTANCE
.
getYLH_AD_VEDIO_MOREDIALOG
();
break
;
}
// ToastUtil.show(WenshuApplication.getContext(), "ylh vedio:" + ylhPostId);
if
(
rewardVideoAD
!=
null
)
{
if
(
rewardVideoAD
!=
null
)
{
rewardVideoAD
=
null
;
rewardVideoAD
=
null
;
}
}
...
@@ -229,6 +160,19 @@ public class YlhVideoAdManager extends BaseVideoAd {
...
@@ -229,6 +160,19 @@ public class YlhVideoAdManager extends BaseVideoAd {
rewardVideoAD
.
loadAD
();
rewardVideoAD
.
loadAD
();
}
}
private
String
getCodeId
(
String
carrierType
)
{
String
ylhPostId
;
switch
(
carrierType
)
{
case
Constant
.
CARRIER_BLESSINGBAG_DOUBLE
:
// 福袋
ylhPostId
=
YlhAdManager
.
INSTANCE
.
getYLH_AD_VEDIO_BLESSINGBAG
();
break
;
default
:
ylhPostId
=
YlhCode
.
INSTANCE
.
getCodeId
();
break
;
}
return
ylhPostId
;
}
public
void
setVideoAdStatusListener
(
VideoAdStatusListener
videoAdStatusListener
)
{
public
void
setVideoAdStatusListener
(
VideoAdStatusListener
videoAdStatusListener
)
{
this
.
videoAdStatusListener
=
videoAdStatusListener
;
this
.
videoAdStatusListener
=
videoAdStatusListener
;
}
}
...
...
app/src/main/java/com/wenshu/youyou/manager/ChannelManager.kt
View file @
189b0d01
...
@@ -14,10 +14,10 @@ object ChannelManager {
...
@@ -14,10 +14,10 @@ object ChannelManager {
/**
/**
* 按用户注册渠道 动态时时更新代码位
* 按用户注册渠道 动态时时更新代码位
*/
*/
fun
updataCodeIdForRegisterChannel
(
idBean
:
AdcodeBean
?)
{
//
fun updataCodeIdForRegisterChannel(idBean: AdcodeBean?) {
TtCsjAdManager
.
updataIdByChannel
(
idBean
)
//
TtCsjAdManager.updataIdByChannel(idBean)
YlhAdManager
.
updataIdByChannel
(
idBean
)
//
YlhAdManager.updataIdByChannel(idBean)
}
//
}
/**
/**
...
...
app/src/main/java/com/wenshu/youyou/manager/TtCsjAdManager.java
View file @
189b0d01
...
@@ -39,7 +39,7 @@ public class TtCsjAdManager {
...
@@ -39,7 +39,7 @@ public class TtCsjAdManager {
public
static
String
TT_AD_VEDIO_OFFINELINE
=
"945968497"
;
// 离线弹框
public
static
String
TT_AD_VEDIO_OFFINELINE
=
"945968497"
;
// 离线弹框
public
static
String
TT_AD_VEDIO_DRAWCASH
=
"945968497"
;
// 提现
public
static
String
TT_AD_VEDIO_DRAWCASH
=
"945968497"
;
// 提现
public
static
String
TT_AD_VEDIO_MOST
=
"945968497"
;
// 超级翻倍/高额任务
public
static
String
TT_AD_VEDIO_MOST
=
"945968497"
;
// 超级翻倍/高额任务
public
static
String
TT_AD_VEDIO_BLESSINGBAG
=
"9459
68497
"
;
// 福袋
public
static
String
TT_AD_VEDIO_BLESSINGBAG
=
"9459
82071
"
;
// 福袋
public
static
String
TT_AD_VEDIO_HOMEVEDIO
=
"945968497"
;
// 首页视频翻倍
public
static
String
TT_AD_VEDIO_HOMEVEDIO
=
"945968497"
;
// 首页视频翻倍
public
static
String
TT_AD_VEDIO_SMALLHOMEVEDIO
=
"945968497"
;
// 短视频翻倍
public
static
String
TT_AD_VEDIO_SMALLHOMEVEDIO
=
"945968497"
;
// 短视频翻倍
public
static
String
TT_AD_VEDIO_KYLVEDIO
=
"945968497"
;
// 来电秀视频
public
static
String
TT_AD_VEDIO_KYLVEDIO
=
"945968497"
;
// 来电秀视频
...
@@ -114,21 +114,21 @@ public class TtCsjAdManager {
...
@@ -114,21 +114,21 @@ public class TtCsjAdManager {
TT_AD_NATIVEEXPRESS_MORNINGCLOCK
=
idBean
.
getCsjv2
();
TT_AD_NATIVEEXPRESS_MORNINGCLOCK
=
idBean
.
getCsjv2
();
TT_AD_NATIVEEXPRESS_EAT
=
idBean
.
getCsjv2
();
TT_AD_NATIVEEXPRESS_EAT
=
idBean
.
getCsjv2
();
// 激励视频
// 激励视频
TT_AD_VEDIO_DRINK
=
idBean
.
getCsjv3
();
//喝水打卡
//
TT_AD_VEDIO_DRINK = idBean.getCsjv3();//喝水打卡
TT_AD_VEDIO_WALK
=
idBean
.
getCsjv3
();
//走路打卡
//
TT_AD_VEDIO_WALK = idBean.getCsjv3();//走路打卡
TT_AD_VEDIO_MAIN
=
idBean
.
getCsjv3
();
// 我的界面视频
//
TT_AD_VEDIO_MAIN = idBean.getCsjv3();// 我的界面视频
TT_AD_VEDIO_ERASE
=
idBean
.
getCsjv3
();
// 刮刮乐
//
TT_AD_VEDIO_ERASE = idBean.getCsjv3();// 刮刮乐
TT_AD_VEDIO_TURNABLE
=
idBean
.
getCsjv3
();
// 大转盘
//
TT_AD_VEDIO_TURNABLE = idBean.getCsjv3();// 大转盘
TT_AD_VEDIO_MOREDIALOG
=
idBean
.
getCsjv3
();
// 气泡
//
TT_AD_VEDIO_MOREDIALOG = idBean.getCsjv3();// 气泡
TT_AD_VEDIO_SIGN
=
idBean
.
getCsjv3
();
// 签到
//
TT_AD_VEDIO_SIGN = idBean.getCsjv3();// 签到
TT_AD_VEDIO_EAT
=
idBean
.
getCsjv3
();
// 饭补
//
TT_AD_VEDIO_EAT = idBean.getCsjv3();// 饭补
TT_AD_VEDIO_OFFINELINE
=
idBean
.
getCsjv3
();
// 离线弹框
//
TT_AD_VEDIO_OFFINELINE = idBean.getCsjv3();// 离线弹框
TT_AD_VEDIO_DRAWCASH
=
idBean
.
getCsjv3
();
// 提现
//
TT_AD_VEDIO_DRAWCASH = idBean.getCsjv3();// 提现
TT_AD_VEDIO_MOST
=
idBean
.
getCsjv3
();
// 超级翻倍/高额任务
//
TT_AD_VEDIO_MOST = idBean.getCsjv3();// 超级翻倍/高额任务
TT_AD_VEDIO_BLESSINGBAG
=
idBean
.
getCsjv3
();
// 福袋
//
TT_AD_VEDIO_BLESSINGBAG = idBean.getCsjv3();// 福袋
TT_AD_VEDIO_HOMEVEDIO
=
idBean
.
getCsjv3
();
// 首页视频翻倍
//
TT_AD_VEDIO_HOMEVEDIO = idBean.getCsjv3();// 首页视频翻倍
TT_AD_VEDIO_SMALLHOMEVEDIO
=
idBean
.
getCsjv3
();
// 短视频翻倍
//
TT_AD_VEDIO_SMALLHOMEVEDIO = idBean.getCsjv3();// 短视频翻倍
TT_AD_VEDIO_KYLVEDIO
=
idBean
.
getCsjv3
();
// 来电秀视频
//
TT_AD_VEDIO_KYLVEDIO = idBean.getCsjv3();// 来电秀视频
// banner
// banner
TT_AD_BANNER_MY
=
idBean
.
getCsjv4
();
TT_AD_BANNER_MY
=
idBean
.
getCsjv4
();
}
}
...
@@ -153,51 +153,51 @@ public class TtCsjAdManager {
...
@@ -153,51 +153,51 @@ public class TtCsjAdManager {
TT_AD_NATIVEEXPRESS_EAT
=
adBean
.
getCsj
().
getExpress
().
getEXPRESS_COMMON
();
TT_AD_NATIVEEXPRESS_EAT
=
adBean
.
getCsj
().
getExpress
().
getEXPRESS_COMMON
();
}
}
// 激励视频
// 激励视频
if
(!
TextUtils
.
isEmpty
(
idBean
.
getHOMEWATER
()))
{
//
if (!TextUtils.isEmpty(idBean.getHOMEWATER())) {
TT_AD_VEDIO_DRINK
=
idBean
.
getHOMEWATER
();
//喝水打卡
//
TT_AD_VEDIO_DRINK = idBean.getHOMEWATER();//喝水打卡
}
//
}
if
(!
TextUtils
.
isEmpty
(
idBean
.
getWALK
()))
{
//
if (!TextUtils.isEmpty(idBean.getWALK())) {
TT_AD_VEDIO_WALK
=
idBean
.
getWALK
();
//走路打卡
//
TT_AD_VEDIO_WALK = idBean.getWALK();//走路打卡
}
//
}
if
(!
TextUtils
.
isEmpty
(
idBean
.
getCHALLENGE_VEDIO
()))
{
//
if (!TextUtils.isEmpty(idBean.getCHALLENGE_VEDIO())) {
TT_AD_VEDIO_MAIN
=
idBean
.
getCHALLENGE_VEDIO
();
// 我的界面视频
//
TT_AD_VEDIO_MAIN = idBean.getCHALLENGE_VEDIO();// 我的界面视频
}
//
}
if
(!
TextUtils
.
isEmpty
(
idBean
.
getCHALLENGE_CARD
()))
{
//
if (!TextUtils.isEmpty(idBean.getCHALLENGE_CARD())) {
TT_AD_VEDIO_ERASE
=
idBean
.
getCHALLENGE_CARD
();
// 刮刮乐
//
TT_AD_VEDIO_ERASE = idBean.getCHALLENGE_CARD();// 刮刮乐
}
//
}
if
(!
TextUtils
.
isEmpty
(
idBean
.
getCHALLENGE_TURN
()))
{
//
if (!TextUtils.isEmpty(idBean.getCHALLENGE_TURN())) {
TT_AD_VEDIO_TURNABLE
=
idBean
.
getCHALLENGE_TURN
();
// 大转盘
//
TT_AD_VEDIO_TURNABLE = idBean.getCHALLENGE_TURN();// 大转盘
}
//
}
if
(!
TextUtils
.
isEmpty
(
idBean
.
getWALK_BUBBLE
()))
{
//
if (!TextUtils.isEmpty(idBean.getWALK_BUBBLE())) {
TT_AD_VEDIO_MOREDIALOG
=
idBean
.
getWALK_BUBBLE
();
// 气泡
//
TT_AD_VEDIO_MOREDIALOG = idBean.getWALK_BUBBLE();// 气泡
}
//
}
if
(!
TextUtils
.
isEmpty
(
idBean
.
getSIGNIN_HOMEPAGE_CARD
()))
{
//
if (!TextUtils.isEmpty(idBean.getSIGNIN_HOMEPAGE_CARD())) {
TT_AD_VEDIO_SIGN
=
idBean
.
getSIGNIN_HOMEPAGE_CARD
();
// 签到
//
TT_AD_VEDIO_SIGN = idBean.getSIGNIN_HOMEPAGE_CARD();// 签到
}
//
}
if
(!
TextUtils
.
isEmpty
(
idBean
.
getEATMEAL_SUBSIDY
()))
{
//
if (!TextUtils.isEmpty(idBean.getEATMEAL_SUBSIDY())) {
TT_AD_VEDIO_EAT
=
idBean
.
getEATMEAL_SUBSIDY
();
// 饭补
//
TT_AD_VEDIO_EAT = idBean.getEATMEAL_SUBSIDY();// 饭补
}
//
}
if
(!
TextUtils
.
isEmpty
(
idBean
.
getOFFLINE_DOUBLE
()))
{
//
if (!TextUtils.isEmpty(idBean.getOFFLINE_DOUBLE())) {
TT_AD_VEDIO_OFFINELINE
=
idBean
.
getOFFLINE_DOUBLE
();
// 离线弹框
//
TT_AD_VEDIO_OFFINELINE = idBean.getOFFLINE_DOUBLE();// 离线弹框
}
//
}
if
(!
TextUtils
.
isEmpty
(
idBean
.
getDRAWCASH
()))
{
//
if (!TextUtils.isEmpty(idBean.getDRAWCASH())) {
TT_AD_VEDIO_DRAWCASH
=
idBean
.
getDRAWCASH
();
// 提现
//
TT_AD_VEDIO_DRAWCASH = idBean.getDRAWCASH();// 提现
}
//
}
if
(!
TextUtils
.
isEmpty
(
idBean
.
getHIGH_ACTIVITY
()))
{
//
if (!TextUtils.isEmpty(idBean.getHIGH_ACTIVITY())) {
TT_AD_VEDIO_MOST
=
idBean
.
getHIGH_ACTIVITY
();
// 超级翻倍/高额任务
//
TT_AD_VEDIO_MOST = idBean.getHIGH_ACTIVITY();// 超级翻倍/高额任务
}
//
}
if
(!
TextUtils
.
isEmpty
(
idBean
.
getBLESSINGBAG
()))
{
//
if (!TextUtils.isEmpty(idBean.getBLESSINGBAG())) {
TT_AD_VEDIO_BLESSINGBAG
=
idBean
.
getBLESSINGBAG
();
// 福袋
//
TT_AD_VEDIO_BLESSINGBAG = idBean.getBLESSINGBAG();// 福袋
}
//
}
if
(!
TextUtils
.
isEmpty
(
idBean
.
getHOMEVEDIO_CHALLENGE
()))
{
//
if (!TextUtils.isEmpty(idBean.getHOMEVEDIO_CHALLENGE())) {
TT_AD_VEDIO_HOMEVEDIO
=
idBean
.
getHOMEVEDIO_CHALLENGE
();
// 首页视频翻倍
//
TT_AD_VEDIO_HOMEVEDIO = idBean.getHOMEVEDIO_CHALLENGE();// 首页视频翻倍
}
//
}
if
(!
TextUtils
.
isEmpty
(
idBean
.
getSMALLHOMEVEDIO_DOUBLE
()))
{
//
if (!TextUtils.isEmpty(idBean.getSMALLHOMEVEDIO_DOUBLE())) {
TT_AD_VEDIO_SMALLHOMEVEDIO
=
idBean
.
getSMALLHOMEVEDIO_DOUBLE
();
// 短视频翻倍
//
TT_AD_VEDIO_SMALLHOMEVEDIO = idBean.getSMALLHOMEVEDIO_DOUBLE();// 短视频翻倍
}
//
}
if
(!
TextUtils
.
isEmpty
(
idBean
.
getKUYINYUE_VEDIO
()))
{
//
if (!TextUtils.isEmpty(idBean.getKUYINYUE_VEDIO())) {
TT_AD_VEDIO_KYLVEDIO
=
idBean
.
getKUYINYUE_VEDIO
();
// 来电秀视频
//
TT_AD_VEDIO_KYLVEDIO = idBean.getKUYINYUE_VEDIO();// 来电秀视频
}
//
}
// 全屏广告
// 全屏广告
if
(!
TextUtils
.
isEmpty
(
adBean
.
getCsj
().
getFullvedio
().
getFULLVEDIO_COMMON
()))
{
if
(!
TextUtils
.
isEmpty
(
adBean
.
getCsj
().
getFullvedio
().
getFULLVEDIO_COMMON
()))
{
TT_AD_FULLVEDIO_ALL
=
adBean
.
getCsj
().
getFullvedio
().
getFULLVEDIO_COMMON
();
TT_AD_FULLVEDIO_ALL
=
adBean
.
getCsj
().
getFullvedio
().
getFULLVEDIO_COMMON
();
...
...
app/src/main/java/com/wenshu/youyou/manager/YlhAdManager.kt
View file @
189b0d01
...
@@ -31,7 +31,7 @@ object YlhAdManager {
...
@@ -31,7 +31,7 @@ object YlhAdManager {
var
YLH_AD_VEDIO_OFFINELINE
=
"4061975164654076"
// 离线弹框
var
YLH_AD_VEDIO_OFFINELINE
=
"4061975164654076"
// 离线弹框
var
YLH_AD_VEDIO_DRAWCASH
=
"4061975164654076"
// 提现
var
YLH_AD_VEDIO_DRAWCASH
=
"4061975164654076"
// 提现
var
YLH_AD_VEDIO_MOST
=
"4061975164654076"
// 超级翻倍/高额任务
var
YLH_AD_VEDIO_MOST
=
"4061975164654076"
// 超级翻倍/高额任务
var
YLH_AD_VEDIO_BLESSINGBAG
=
"
4061975164654076
"
// 福袋
var
YLH_AD_VEDIO_BLESSINGBAG
=
"
3051979206073642
"
// 福袋
var
YLH_AD_VEDIO_HOMEVEDIO
=
"4061975164654076"
// 首页视频翻倍
var
YLH_AD_VEDIO_HOMEVEDIO
=
"4061975164654076"
// 首页视频翻倍
var
YLH_AD_VEDIO_SMALLHOMEVEDIO
=
"4061975164654076"
// 短视频翻倍
var
YLH_AD_VEDIO_SMALLHOMEVEDIO
=
"4061975164654076"
// 短视频翻倍
var
YLH_AD_VEDIO_KYLVEDIO
=
"4061975164654076"
// 来电秀视频
var
YLH_AD_VEDIO_KYLVEDIO
=
"4061975164654076"
// 来电秀视频
...
@@ -56,21 +56,21 @@ object YlhAdManager {
...
@@ -56,21 +56,21 @@ object YlhAdManager {
// 开屏
// 开屏
YLH_AD_SPLASH_POSTID
=
idBean
.
ylhv1
YLH_AD_SPLASH_POSTID
=
idBean
.
ylhv1
// 激励视频
// 激励视频
YLH_AD_VEDIO_DRINK
=
idBean
.
ylhv2
//喝水打卡
//
YLH_AD_VEDIO_DRINK = idBean.ylhv2 //喝水打卡
YLH_AD_VEDIO_WALK
=
idBean
.
ylhv2
//走路打卡
//
YLH_AD_VEDIO_WALK = idBean.ylhv2 //走路打卡
YLH_AD_VEDIO_MAIN
=
idBean
.
ylhv2
// 我的界面视频
//
YLH_AD_VEDIO_MAIN = idBean.ylhv2 // 我的界面视频
YLH_AD_VEDIO_ERASE
=
idBean
.
ylhv2
// 刮刮乐
//
YLH_AD_VEDIO_ERASE = idBean.ylhv2 // 刮刮乐
YLH_AD_VEDIO_TURNABLE
=
idBean
.
ylhv2
// 大转盘
//
YLH_AD_VEDIO_TURNABLE = idBean.ylhv2 // 大转盘
YLH_AD_VEDIO_MOREDIALOG
=
idBean
.
ylhv2
// 气泡
//
YLH_AD_VEDIO_MOREDIALOG = idBean.ylhv2 // 气泡
YLH_AD_VEDIO_SIGN
=
idBean
.
ylhv2
// 签到
//
YLH_AD_VEDIO_SIGN = idBean.ylhv2 // 签到
YLH_AD_VEDIO_EAT
=
idBean
.
ylhv2
// 饭补
//
YLH_AD_VEDIO_EAT = idBean.ylhv2 // 饭补
YLH_AD_VEDIO_OFFINELINE
=
idBean
.
ylhv2
// 离线弹框
//
YLH_AD_VEDIO_OFFINELINE = idBean.ylhv2 // 离线弹框
YLH_AD_VEDIO_DRAWCASH
=
idBean
.
ylhv2
// 提现
//
YLH_AD_VEDIO_DRAWCASH = idBean.ylhv2 // 提现
YLH_AD_VEDIO_MOST
=
idBean
.
ylhv2
// 超级翻倍/高额任务
//
YLH_AD_VEDIO_MOST = idBean.ylhv2 // 超级翻倍/高额任务
YLH_AD_VEDIO_BLESSINGBAG
=
idBean
.
ylhv2
// 福袋
//
YLH_AD_VEDIO_BLESSINGBAG = idBean.ylhv2 // 福袋
YLH_AD_VEDIO_HOMEVEDIO
=
idBean
.
ylhv2
// 首页视频翻倍
//
YLH_AD_VEDIO_HOMEVEDIO = idBean.ylhv2 // 首页视频翻倍
YLH_AD_VEDIO_SMALLHOMEVEDIO
=
idBean
.
ylhv2
// 短视频翻倍
//
YLH_AD_VEDIO_SMALLHOMEVEDIO = idBean.ylhv2 // 短视频翻倍
YLH_AD_VEDIO_KYLVEDIO
=
idBean
.
ylhv2
// 来电秀视频
//
YLH_AD_VEDIO_KYLVEDIO = idBean.ylhv2 // 来电秀视频
}
}
}
}
...
@@ -78,54 +78,54 @@ object YlhAdManager {
...
@@ -78,54 +78,54 @@ object YlhAdManager {
* 按包渠道更新代码位
* 按包渠道更新代码位
*/
*/
fun
updataIdByPkg
(
adBean
:
ServerAdBean
?)
{
fun
updataIdByPkg
(
adBean
:
ServerAdBean
?)
{
if
(
adBean
!=
null
&&
adBean
.
ylh
!=
null
&&
adBean
.
ylh
.
vedio
!=
null
)
{
if
(
adBean
!=
null
&&
adBean
.
ylh
!=
null
)
{
val
idBean
=
adBean
.
ylh
.
vedio
val
idBean
=
adBean
.
ylh
.
vedio
// 激励视频
// 激励视频
if
(!
TextUtils
.
isEmpty
(
idBean
.
homewater
)){
//
if(!TextUtils.isEmpty(idBean.homewater)){
YLH_AD_VEDIO_DRINK
=
idBean
.
homewater
//喝水打卡
//
YLH_AD_VEDIO_DRINK = idBean.homewater //喝水打卡
}
//
}
if
(!
TextUtils
.
isEmpty
(
idBean
.
walk
)){
//
if(!TextUtils.isEmpty(idBean.walk)){
YLH_AD_VEDIO_WALK
=
idBean
.
walk
//走路打卡
//
YLH_AD_VEDIO_WALK = idBean.walk //走路打卡
}
//
}
if
(!
TextUtils
.
isEmpty
(
idBean
.
challengE_VEDIO
)){
//
if(!TextUtils.isEmpty(idBean.challengE_VEDIO)){
YLH_AD_VEDIO_MAIN
=
idBean
.
challengE_VEDIO
// 我的界面视频
//
YLH_AD_VEDIO_MAIN = idBean.challengE_VEDIO // 我的界面视频
}
//
}
if
(!
TextUtils
.
isEmpty
(
idBean
.
challengE_CARD
)){
//
if(!TextUtils.isEmpty(idBean.challengE_CARD)){
YLH_AD_VEDIO_ERASE
=
idBean
.
challengE_CARD
// 刮刮乐
//
YLH_AD_VEDIO_ERASE = idBean.challengE_CARD // 刮刮乐
}
//
}
if
(!
TextUtils
.
isEmpty
(
idBean
.
challengE_TURN
)){
//
if(!TextUtils.isEmpty(idBean.challengE_TURN)){
YLH_AD_VEDIO_TURNABLE
=
idBean
.
challengE_TURN
// 大转盘
//
YLH_AD_VEDIO_TURNABLE = idBean.challengE_TURN // 大转盘
}
//
}
if
(!
TextUtils
.
isEmpty
(
idBean
.
walK_BUBBLE
)){
//
if(!TextUtils.isEmpty(idBean.walK_BUBBLE)){
YLH_AD_VEDIO_MOREDIALOG
=
idBean
.
walK_BUBBLE
// 气泡
//
YLH_AD_VEDIO_MOREDIALOG = idBean.walK_BUBBLE // 气泡
}
//
}
if
(!
TextUtils
.
isEmpty
(
idBean
.
signiN_HOMEPAGE_CARD
)){
//
if(!TextUtils.isEmpty(idBean.signiN_HOMEPAGE_CARD)){
YLH_AD_VEDIO_SIGN
=
idBean
.
signiN_HOMEPAGE_CARD
// 签到
//
YLH_AD_VEDIO_SIGN = idBean.signiN_HOMEPAGE_CARD // 签到
}
//
}
if
(!
TextUtils
.
isEmpty
(
idBean
.
eatmeaL_SUBSIDY
)){
//
if(!TextUtils.isEmpty(idBean.eatmeaL_SUBSIDY)){
YLH_AD_VEDIO_EAT
=
idBean
.
eatmeaL_SUBSIDY
// 饭补
//
YLH_AD_VEDIO_EAT = idBean.eatmeaL_SUBSIDY // 饭补
}
//
}
if
(!
TextUtils
.
isEmpty
(
idBean
.
offlinE_DOUBLE
)){
//
if(!TextUtils.isEmpty(idBean.offlinE_DOUBLE)){
YLH_AD_VEDIO_OFFINELINE
=
idBean
.
offlinE_DOUBLE
// 离线弹框
//
YLH_AD_VEDIO_OFFINELINE = idBean.offlinE_DOUBLE // 离线弹框
}
//
}
if
(!
TextUtils
.
isEmpty
(
idBean
.
drawcash
)){
//
if(!TextUtils.isEmpty(idBean.drawcash)){
YLH_AD_VEDIO_DRAWCASH
=
idBean
.
drawcash
// 提现
//
YLH_AD_VEDIO_DRAWCASH = idBean.drawcash // 提现
}
//
}
if
(!
TextUtils
.
isEmpty
(
idBean
.
higH_ACTIVITY
)){
//
if(!TextUtils.isEmpty(idBean.higH_ACTIVITY)){
YLH_AD_VEDIO_MOST
=
idBean
.
higH_ACTIVITY
// 超级翻倍/高额任务
//
YLH_AD_VEDIO_MOST = idBean.higH_ACTIVITY // 超级翻倍/高额任务
}
//
}
if
(!
TextUtils
.
isEmpty
(
idBean
.
blessingbag
)){
//
if(!TextUtils.isEmpty(idBean.blessingbag)){
YLH_AD_VEDIO_BLESSINGBAG
=
idBean
.
blessingbag
// 福袋
//
YLH_AD_VEDIO_BLESSINGBAG = idBean.blessingbag // 福袋
}
//
}
if
(!
TextUtils
.
isEmpty
(
idBean
.
homevediO_CHALLENGE
)){
//
if(!TextUtils.isEmpty(idBean.homevediO_CHALLENGE)){
YLH_AD_VEDIO_HOMEVEDIO
=
idBean
.
homevediO_CHALLENGE
// 首页视频翻倍
//
YLH_AD_VEDIO_HOMEVEDIO = idBean.homevediO_CHALLENGE // 首页视频翻倍
}
//
}
if
(!
TextUtils
.
isEmpty
(
idBean
.
smallhomevediO_DOUBLE
)){
//
if(!TextUtils.isEmpty(idBean.smallhomevediO_DOUBLE)){
YLH_AD_VEDIO_SMALLHOMEVEDIO
=
idBean
.
smallhomevediO_DOUBLE
// 短视频翻倍
//
YLH_AD_VEDIO_SMALLHOMEVEDIO = idBean.smallhomevediO_DOUBLE // 短视频翻倍
}
//
}
if
(!
TextUtils
.
isEmpty
(
idBean
.
kuyinyuE_VEDIO
)){
//
if(!TextUtils.isEmpty(idBean.kuyinyuE_VEDIO)){
YLH_AD_VEDIO_KYLVEDIO
=
idBean
.
kuyinyuE_VEDIO
// 来电秀视频
//
YLH_AD_VEDIO_KYLVEDIO = idBean.kuyinyuE_VEDIO // 来电秀视频
}
//
}
if
(!
TextUtils
.
isEmpty
(
adBean
.
ylh
.
express
.
expresS_DIALOG
)){
if
(!
TextUtils
.
isEmpty
(
adBean
.
ylh
.
express
.
expresS_DIALOG
)){
YLH_AD_NATIVEEXPRESS_AWARD
=
adBean
.
ylh
.
express
.
expresS_DIALOG
YLH_AD_NATIVEEXPRESS_AWARD
=
adBean
.
ylh
.
express
.
expresS_DIALOG
...
...
app/src/main/java/com/wenshu/youyou/mvp/model/CodeBean.kt
0 → 100644
View file @
189b0d01
package
com.wenshu.youyou.mvp.model
import
java.io.Serializable
data class
CodeBean
(
val
csjArr
:
MutableList
<
String
>?
=
null
,
val
ylhArr
:
MutableList
<
String
>?
=
null
)
:
Serializable
\ No newline at end of file
app/src/main/java/com/wenshu/youyou/mvp/presenters/HomePresenter.kt
View file @
189b0d01
package
com.wenshu.youyou.mvp.presenters
package
com.wenshu.youyou.mvp.presenters
import
android.text.TextUtils
import
android.text.TextUtils
import
com.google.gson.JsonObject
import
com.wenshu.youyou.WenshuApplication
import
com.wenshu.youyou.WenshuApplication
import
com.wenshu.youyou.common.Constant
import
com.wenshu.youyou.common.Constant
import
com.wenshu.youyou.common.DeviceInfo
import
com.wenshu.youyou.common.DeviceInfo
import
com.wenshu.youyou.manager.AppHttpManager
import
com.wenshu.youyou.manager.AppHttpManager
import
com.wenshu.youyou.manager.ShumeiManager
import
com.wenshu.youyou.manager.ShumeiManager
import
com.wenshu.youyou.manager.UserManager
import
com.wenshu.youyou.manager.UserManager
import
com.wenshu.youyou.mvp.model.BaseResponse
import
com.wenshu.youyou.mvp.model.MainVideoMsgBean
import
com.wenshu.youyou.mvp.model.UserBean
import
com.wenshu.youyou.mvp.model.UserTaskMsgBean
import
com.wenshu.youyou.mvp.views.HomeView
import
com.wenshu.youyou.mvp.views.HomeView
import
com.wenshu.youyou.utils.DeviceUuidFactory
import
com.wenshu.youyou.utils.DeviceUuidFactory
import
com.wenshu.youyou.utils.IPUtil
import
com.wenshu.youyou.utils.IPUtil
...
@@ -18,6 +15,9 @@ import com.wenshu.youyou.utils.LogUtil
...
@@ -18,6 +15,9 @@ import com.wenshu.youyou.utils.LogUtil
import
com.wenshu.youyou.utils.SPUtil
import
com.wenshu.youyou.utils.SPUtil
import
com.wenshu.library.net.neterror.BaseSubscriber
import
com.wenshu.library.net.neterror.BaseSubscriber
import
com.wenshu.library.net.neterror.Throwable
import
com.wenshu.library.net.neterror.Throwable
import
com.wenshu.youyou.ad.code.CsjCode
import
com.wenshu.youyou.ad.code.YlhCode
import
com.wenshu.youyou.mvp.model.*
import
net.grandcentrix.tray.AppPreferences
import
net.grandcentrix.tray.AppPreferences
import
java.util.*
import
java.util.*
...
@@ -26,7 +26,7 @@ class HomePresenter : BasePresenter<HomeView>() {
...
@@ -26,7 +26,7 @@ class HomePresenter : BasePresenter<HomeView>() {
/**
/**
* 打开激活
* 打开激活
*/
*/
fun
comSaveTerminalInfo
(
ps
:
AppPreferences
)
{
fun
comSaveTerminalInfo
()
{
val
vo
=
HashMap
<
String
,
Any
>()
val
vo
=
HashMap
<
String
,
Any
>()
val
deviceInfo
:
DeviceInfo
=
DeviceInfo
.
instance
val
deviceInfo
:
DeviceInfo
=
DeviceInfo
.
instance
val
macAddress
:
String
=
deviceInfo
.
getMacAddress
()
val
macAddress
:
String
=
deviceInfo
.
getMacAddress
()
...
@@ -65,6 +65,32 @@ class HomePresenter : BasePresenter<HomeView>() {
...
@@ -65,6 +65,32 @@ class HomePresenter : BasePresenter<HomeView>() {
})
})
}
}
fun
getAdcodesInOpenApp
()
{
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
getAdcodesInOpenApp
(),
object
:
BaseSubscriber
<
BaseResponse
<
CodeBean
>>()
{
override
fun
onCompleted
()
{
if
(
isLinkView
)
return
}
override
fun
onError
(
e
:
Throwable
)
{
if
(
isLinkView
)
return
}
override
fun
onNext
(
baseResponse
:
BaseResponse
<
CodeBean
>)
{
if
(
isLinkView
)
return
val
code
=
baseResponse
.
getStatus
()
when
(
code
)
{
200
->
{
val
codeBean
=
baseResponse
.
data
CsjCode
.
initListCode
(
codeBean
.
csjArr
)
YlhCode
.
initListCode
(
codeBean
.
ylhArr
)
}
}
}
})
}
fun
getHallBaseMsg
()
{
fun
getHallBaseMsg
()
{
AppHttpManager
.
getInstance
(
loanApplication
)
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
getHallBaseMsg
(),
.
call
(
loanService
.
getHallBaseMsg
(),
...
...
app/src/main/java/com/wenshu/youyou/net/LoanService.java
View file @
189b0d01
...
@@ -9,6 +9,7 @@ import com.wenshu.youyou.mvp.model.BannerBean;
...
@@ -9,6 +9,7 @@ import com.wenshu.youyou.mvp.model.BannerBean;
import
com.wenshu.youyou.mvp.model.BaseResponse
;
import
com.wenshu.youyou.mvp.model.BaseResponse
;
import
com.wenshu.youyou.mvp.model.CashoutChallengeBean
;
import
com.wenshu.youyou.mvp.model.CashoutChallengeBean
;
import
com.wenshu.youyou.mvp.model.ClickTurnBean
;
import
com.wenshu.youyou.mvp.model.ClickTurnBean
;
import
com.wenshu.youyou.mvp.model.CodeBean
;
import
com.wenshu.youyou.mvp.model.CommonParamBean
;
import
com.wenshu.youyou.mvp.model.CommonParamBean
;
import
com.wenshu.youyou.mvp.model.CpdBean
;
import
com.wenshu.youyou.mvp.model.CpdBean
;
import
com.wenshu.youyou.mvp.model.DrawcashBean
;
import
com.wenshu.youyou.mvp.model.DrawcashBean
;
...
@@ -629,6 +630,15 @@ public interface LoanService {
...
@@ -629,6 +630,15 @@ public interface LoanService {
@POST
(
"api/turn/addTurnToOtherMsg"
)
@POST
(
"api/turn/addTurnToOtherMsg"
)
Observable
<
BaseResponse
<
Object
>>
addTurnToOtherMsg
(
@Body
Map
<
String
,
Object
>
vo
);
Observable
<
BaseResponse
<
Object
>>
addTurnToOtherMsg
(
@Body
Map
<
String
,
Object
>
vo
);
/**
* 获取adcode List
*
* @return
*/
@POST
(
"na/getAdcodesInOpenApp"
)
Observable
<
BaseResponse
<
CodeBean
>>
getAdcodesInOpenApp
();
/**
/**
* 默认http工厂
* 默认http工厂
*/
*/
...
...
app/src/main/java/com/wenshu/youyou/ui/fragment/MainFragment.kt
View file @
189b0d01
...
@@ -93,9 +93,6 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
...
@@ -93,9 +93,6 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
// 奖励页预加载 信息流广告
// 奖励页预加载 信息流广告
PreLoadExpressManager
.
loadADFrameLayout
()
PreLoadExpressManager
.
loadADFrameLayout
()
// 刷新喜马拉雅信息流
TTPreLoadExpressXmlyManager
.
getInstance
().
loadTtFrameLayout
()
// 首次显示权限弹窗
// 首次显示权限弹窗
showPowerDialog
()
showPowerDialog
()
...
@@ -154,8 +151,10 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
...
@@ -154,8 +151,10 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
private
fun
uploadDeviceInfo
()
{
private
fun
uploadDeviceInfo
()
{
// if (!ps.getBoolean(Constant.FIRST_DEVICE_FLAG, false)) {
// if (!ps.getBoolean(Constant.FIRST_DEVICE_FLAG, false)) {
homePresenter
.
comSaveTerminalInfo
(
ps
)
homePresenter
.
comSaveTerminalInfo
()
baseApplication
.
initUm
(
context
)
baseApplication
.
initUm
(
context
)
homePresenter
.
getAdcodesInOpenApp
()
// }
// }
}
}
...
@@ -234,7 +233,7 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
...
@@ -234,7 +233,7 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
if
(
data
.
adcode
!=
null
)
{
if
(
data
.
adcode
!=
null
)
{
AppConfig
.
user_channel_ad
=
data
.
adcode
.
key
AppConfig
.
user_channel_ad
=
data
.
adcode
.
key
}
}
ChannelManager
.
updataCodeIdForRegisterChannel
(
data
.
adcode
)
//
ChannelManager.updataCodeIdForRegisterChannel(data.adcode)
// 新人福利 放到个人中心展示 防止首页红包转动异常
// 新人福利 放到个人中心展示 防止首页红包转动异常
...
...
app/src/main/java/com/wenshu/youyou/ui/fragment/MyFragment.kt
View file @
189b0d01
...
@@ -319,7 +319,7 @@ class MyFragment : BaseFragment(),
...
@@ -319,7 +319,7 @@ class MyFragment : BaseFragment(),
if
(
data
.
adcode
!=
null
)
{
if
(
data
.
adcode
!=
null
)
{
AppConfig
.
user_channel_ad
=
data
.
adcode
.
key
AppConfig
.
user_channel_ad
=
data
.
adcode
.
key
}
}
ChannelManager
.
updataCodeIdForRegisterChannel
(
data
.
adcode
)
//
ChannelManager.updataCodeIdForRegisterChannel(data.adcode)
// 是否上报点击广告
// 是否上报点击广告
AppConfig
.
needReportClickAdEvent
=
data
.
isNeedReportClickAdEvent
AppConfig
.
needReportClickAdEvent
=
data
.
isNeedReportClickAdEvent
...
...
app/src/main/java/com/wenshu/youyou/utils/ToastUtil.java
View file @
189b0d01
...
@@ -36,14 +36,14 @@ public class ToastUtil {
...
@@ -36,14 +36,14 @@ public class ToastUtil {
}
}
public
static
void
showLong
(
Context
context
,
String
msg
)
{
public
static
void
showLong
(
Context
context
,
String
msg
)
{
//
showToast(context, msg, Toast.LENGTH_LONG, Gravity.CENTER);
showToast
(
context
,
msg
,
Toast
.
LENGTH_LONG
,
Gravity
.
CENTER
);
try
{
//
try {
ToastUtils
.
show
(
msg
);
//
ToastUtils.show(msg);
}
catch
(
Exception
e
)
{
//
} catch (Exception e) {
e
.
printStackTrace
();
//
e.printStackTrace();
showToast
(
context
,
msg
,
Toast
.
LENGTH_LONG
,
Gravity
.
CENTER
);
//
showToast(context, msg, Toast.LENGTH_LONG, Gravity.CENTER);
}
//
}
}
}
public
static
void
show
(
Context
context
,
String
msg
,
boolean
isShowToast
)
{
public
static
void
show
(
Context
context
,
String
msg
,
boolean
isShowToast
)
{
...
...
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