Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_highgold
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_highgold
Commits
fb4ea988
Commit
fb4ea988
authored
Jun 03, 2020
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整优先级
parent
8eb1f717
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
44 deletions
+44
-44
VedioAdingManager.java
...rc/main/java/com/mints/highgold/ad/VedioAdingManager.java
+19
-19
LoanService.java
...app/src/main/java/com/mints/highgold/net/LoanService.java
+25
-25
No files found.
highgold/app/src/main/java/com/mints/highgold/ad/VedioAdingManager.java
View file @
fb4ea988
...
...
@@ -122,26 +122,26 @@ public class VedioAdingManager {
/**
* 根据广告优先级获取下一个
* <p>
*
珊瑚>穿山甲激励> 优量汇>多盟>mintegral>东方网>全屏>创神
*
穿山甲激励> 优量汇> 珊瑚>创神>多盟>mintegral>东方网>全屏
*/
private
String
getNextAdType
()
{
String
nextAdType
=
""
;
if
(
AppConfig
.
shanhuAdCount
>
0
)
{
nextAdType
=
Constant
.
SHANHU_VEDIO_AD
;
}
else
if
(
AppConfig
.
csjVedioAdCount
>
0
)
{
if
(
AppConfig
.
csjVedioAdCount
>
0
)
{
nextAdType
=
Constant
.
CSJ_VEDIO_AD
;
}
else
if
(
AppConfig
.
ylhAdCount
>
0
)
{
nextAdType
=
Constant
.
YLH_VEDIO_AD
;
}
else
if
(
AppConfig
.
shanhuAdCount
>
0
)
{
nextAdType
=
Constant
.
SHANHU_VEDIO_AD
;
}
else
if
(
AppConfig
.
chuangshenVedioAdCount
>
0
)
{
nextAdType
=
Constant
.
CHUANGSHEN_VEDIO_AD
;
}
else
if
(
AppConfig
.
duomentVedioAdCount
>
0
)
{
nextAdType
=
Constant
.
DUOMENT_VEDIO_AD
;
}
else
if
(
AppConfig
.
mintegralAdCount
>
0
)
{
nextAdType
=
Constant
.
MINTEGRAL_VEDIO_AD
;
}
else
if
(
AppConfig
.
csjFullAdCount
>
0
)
{
nextAdType
=
Constant
.
CSJ_FULL_AD
;
}
else
if
(
AppConfig
.
chuangshenVedioAdCount
>
0
)
{
nextAdType
=
Constant
.
CHUANGSHEN_VEDIO_AD
;
}
else
if
(
AppConfig
.
hytechVedioAdCount
>
0
)
{
nextAdType
=
Constant
.
HYTECH_VEDIO_AD
;
}
else
if
(
AppConfig
.
csjFullAdCount
>
0
)
{
nextAdType
=
Constant
.
CSJ_FULL_AD
;
}
return
nextAdType
;
}
...
...
@@ -169,12 +169,7 @@ public class VedioAdingManager {
int
weight
=
0
;
// 若没有视频完成数,不加入权重计算范围内
// 珊瑚>穿山甲激励>优量汇>多盟>mintegral>东方网>全屏>创神
if
(
AppConfig
.
shanhuAdCount
>
0
)
{
weightList
.
add
(
new
WeightBean
(
shanhuWeight
,
Constant
.
SHANHU_VEDIO_AD
));
weight
=
weight
+
shanhuWeight
;
LogUtil
.
d
(
TAG
,
"权重值:shanhuWeight:"
+
shanhuWeight
);
}
// 穿山甲激励> 优量汇> 珊瑚>创神>多盟>mintegral>东方网>全屏
if
(
AppConfig
.
csjVedioAdCount
>
0
)
{
weightList
.
add
(
new
WeightBean
(
csjVedioWeight
,
Constant
.
CSJ_VEDIO_AD
));
weight
=
weight
+
csjVedioWeight
;
...
...
@@ -185,6 +180,16 @@ public class VedioAdingManager {
weight
=
weight
+
ylhWeight
;
LogUtil
.
d
(
TAG
,
"权重值:ylhWeight:"
+
ylhWeight
);
}
if
(
AppConfig
.
shanhuAdCount
>
0
)
{
weightList
.
add
(
new
WeightBean
(
shanhuWeight
,
Constant
.
SHANHU_VEDIO_AD
));
weight
=
weight
+
shanhuWeight
;
LogUtil
.
d
(
TAG
,
"权重值:shanhuWeight:"
+
shanhuWeight
);
}
if
(
AppConfig
.
chuangshenVedioAdCount
>
0
)
{
weightList
.
add
(
new
WeightBean
(
chuangshenWeight
,
Constant
.
CHUANGSHEN_VEDIO_AD
));
weight
=
weight
+
chuangshenWeight
;
LogUtil
.
d
(
TAG
,
"权重值:chuangshenWeight:"
+
chuangshenWeight
);
}
if
(
Build
.
VERSION
.
SDK_INT
<
Build
.
VERSION_CODES
.
Q
&&
AppConfig
.
duomentVedioAdCount
>
0
)
{
weightList
.
add
(
new
WeightBean
(
domobWeight
,
Constant
.
DUOMENT_VEDIO_AD
));
weight
=
weight
+
domobWeight
;
...
...
@@ -205,11 +210,6 @@ public class VedioAdingManager {
weight
=
weight
+
csjFullWeight
;
LogUtil
.
d
(
TAG
,
"权重值:csjFullWeight:"
+
csjFullWeight
);
}
if
(
AppConfig
.
chuangshenVedioAdCount
>
0
)
{
weightList
.
add
(
new
WeightBean
(
chuangshenWeight
,
Constant
.
CHUANGSHEN_VEDIO_AD
));
weight
=
weight
+
chuangshenWeight
;
LogUtil
.
d
(
TAG
,
"权重值:chuangshenWeight:"
+
chuangshenWeight
);
}
// 权重随机
if
(
weightList
!=
null
&&
weightList
.
size
()
>
0
&&
weight
>
0
)
{
...
...
highgold/app/src/main/java/com/mints/highgold/net/LoanService.java
View file @
fb4ea988
...
...
@@ -485,32 +485,32 @@ public interface LoanService {
builder
.
interceptors
().
add
(
okHttpInterceptor
);
Retrofit
retrofit
;
if
(
BuildConfig
.
DEBUG
)
{
SPUtil
spUtil
=
SPUtil
.
getInstance
(
context
);
if
(
TextUtils
.
isEmpty
(
spUtil
.
getString
(
Constant
.
LOCAL_IP
)))
{
spUtil
.
putString
(
Constant
.
LOCAL_IP
,
"http://39.97.65.143:9082/api-p1/"
);
}
retrofit
=
new
Retrofit
.
Builder
()
.
client
(
builder
.
build
())
.
baseUrl
(
spUtil
.
getString
(
Constant
.
LOCAL_IP
))
.
addConverterFactory
(
GsonConverterFactory
.
create
())
.
addCallAdapterFactory
(
RxJavaCallAdapterFactory
.
create
())
.
build
();
}
else
{
retrofit
=
new
Retrofit
.
Builder
()
.
client
(
builder
.
build
())
.
baseUrl
(
BuildConfig
.
MainIp
)
.
addConverterFactory
(
GsonConverterFactory
.
create
())
.
addCallAdapterFactory
(
RxJavaCallAdapterFactory
.
create
())
.
build
();
}
// if (BuildConfig.DEBUG) {
// SPUtil spUtil = SPUtil.getInstance(context);
// if (TextUtils.isEmpty(spUtil.getString(Constant.LOCAL_IP))) {
// spUtil.putString(Constant.LOCAL_IP, "http://39.97.65.143:9082/api-p1/");
// }
// retrofit = new Retrofit.Builder()
// .client(builder.build())
// .baseUrl(spUtil.getString(Constant.LOCAL_IP))
// .addConverterFactory(GsonConverterFactory.create())
// .addCallAdapterFactory(RxJavaCallAdapterFactory.create())
// .build();
// } else {
// retrofit = new Retrofit.Builder()
// .client(builder.build())
// .baseUrl(BuildConfig.MainIp)
// .addConverterFactory(GsonConverterFactory.create())
// .addCallAdapterFactory(RxJavaCallAdapterFactory.create())
// .build();
// }
retrofit
=
new
Retrofit
.
Builder
()
.
client
(
builder
.
build
())
.
baseUrl
(
BuildConfig
.
MainIp
)
.
addConverterFactory
(
GsonConverterFactory
.
create
())
.
addCallAdapterFactory
(
RxJavaCallAdapterFactory
.
create
())
.
build
();
return
retrofit
.
create
(
LoanService
.
class
);
...
...
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