Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xiaoxiaole
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
wildfirecode13
xiaoxiaole
Commits
4c72c1fe
Commit
4c72c1fe
authored
May 22, 2020
by
zjz1994
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增广告处理
parent
9ad2908b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
0 deletions
+43
-0
DataManager.ts
egret/libs/tw/manager/DataManager.ts
+43
-0
No files found.
egret/libs/tw/manager/DataManager.ts
View file @
4c72c1fe
...
...
@@ -991,4 +991,47 @@ export class DataManager extends ABDataManager {
}
// tslint:disable-next-line:max-file-line-count
//新增广告处理
solveAdvertData
(
data
){
var
enable
=
data
.
enable
;
if
(
enable
){
//配置了,没东西处理下
var
advertList
=
data
.
advertList
;
if
(
advertList
){
var
newAdlist
=
new
Array
();
for
(
var
i
=
0
;
i
<
advertList
.
length
;
i
++
){
var
iadata
=
advertList
[
i
];
var
iadimg
=
iadata
.
img
;
var
iadurl
=
iadata
.
url
;
var
iadapsClickUrl
=
iadata
.
apsClickUrl
;
if
(
iadimg
&&
iadimg
.
length
>
2
){
newAdlist
.
push
({
img
:
iadimg
,
apsClickUrl
:
iadapsClickUrl
,
url
:
iadurl
})
}
}
if
(
newAdlist
.
length
>
0
){
return
{
enable
:
true
,
advertList
:
newAdlist
}
}
else
{
return
{
enable
:
false
}
}
}
else
{
data
.
enable
=
false
;
return
{
enable
:
false
}
}
}
else
{
return
{
enable
:
false
}
}
}
}
\ 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