Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
db-game-template
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
崔立强
db-game-template
Commits
1a3f861a
Commit
1a3f861a
authored
Nov 01, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
4bb17153
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
147 deletions
+6
-147
.DS_Store
egret/.DS_Store
+0
-0
index.html
egret/index.html
+1
-0
startscenebg.jpg
egret/resource/assets/start1/startscenebg.jpg
+0
-0
Start1Skin.exml
egret/resource/skins/Start1Skin.exml
+1
-37
StartScene1.ts
egret/src/start1/StartScene1.ts
+4
-110
No files found.
egret/.DS_Store
View file @
1a3f861a
No preview for this file type
egret/index.html
View file @
1a3f861a
...
...
@@ -44,6 +44,7 @@
<script
src=
"libs/security.js"
></script>
<script
src=
"libs/downloadApp.js"
></script>
<script>
window
[
'golink'
]
=
'http://aghzapi.zjkczn.com/download/'
;
window
[
'projectID'
]
=
'p32804e45'
;
window
[
'plugs'
]
=
[
1317
,
1319
];
window
[
'INIT_BALL_NUMS'
]
=
1
;
...
...
egret/resource/assets/start1/startscenebg.jpg
View replaced file @
4bb17153
View file @
1a3f861a
116 KB
|
W:
|
H:
177 KB
|
W:
|
H:
2-up
Swipe
Onion skin
egret/resource/skins/Start1Skin.exml
View file @
1a3f861a
<?xml version="1.0" encoding="utf-8"?>
<e:Skin
class=
"Start1Skin"
width=
"750"
height=
"1
206
"
xmlns:e=
"http://ns.egret.com/eui"
<e:Skin
class=
"Start1Skin"
width=
"750"
height=
"1
624
"
xmlns:e=
"http://ns.egret.com/eui"
xmlns:w=
"http://ns.egret.com/wing"
>
<w:Config
id=
"16d391cc18c"
/>
<e:Image
source=
"startscenebg_jpg"
/>
<e:Group
y=
"233"
x=
"103"
>
<e:Image
id=
"notLightImg"
source=
"start 未完成暗的状态_png"
horizontalCenter=
"0"
/>
<e:Image
id=
"lightImg"
source=
"start完成活动点亮_png"
horizontalCenter=
"0"
visible=
"false"
/>
</e:Group>
<e:Group
x=
"27"
y=
"376"
>
<e:Group
width=
"163"
height=
"90"
>
<e:Label
id=
"btn1"
text=
"全部活动"
textColor=
"0x000000"
horizontalCenter=
"0"
verticalCenter=
"0"
bold=
"true"
size=
"30"
/>
<e:Image
id=
"line1"
source=
"start选中_png"
y=
"72"
x=
"60"
/>
</e:Group>
<e:Group
width=
"163"
height=
"90"
x=
"163"
>
<e:Label
id=
"btn2"
text=
"我参与的"
textColor=
"0x878787"
verticalAlign=
"middle"
textAlign=
"center"
horizontalCenter=
"0"
verticalCenter=
"0"
size=
"28"
/>
<e:Image
id=
"line2"
source=
"start选中_png"
x=
"60"
y=
"72"
visible=
"false"
/>
</e:Group>
</e:Group>
<e:Label
id=
"tips"
text=
"我完成的活动1个"
y=
"408"
textColor=
"0x2d2d2d"
right=
"38"
size=
"28"
/>
<e:Scroller
id=
"scroll"
width=
"698"
y=
"479"
height=
"675"
scrollPolicyH=
"off"
scrollPolicyV=
"on"
x=
"29"
>
<e:Group>
<e:List
id=
"list"
width=
"698"
itemRendererSkinName=
"ItemSkin"
>
<e:ArrayCollection>
<e:Array>
<e:Object
banner=
"https://yun.duiba.com.cn/db_games/yyhtest12.png"
/>
<e:Object
banner=
"https://yun.duiba.com.cn/db_games/yyhtest12.png"
/>
<e:Object
banner=
"https://yun.duiba.com.cn/db_games/yyhtest12.png"
/>
<e:Object
banner=
"https://yun.duiba.com.cn/db_games/yyhtest12.png"
/>
<e:Object
banner=
"https://yun.duiba.com.cn/db_games/yyhtest12.png"
/>
</e:Array>
</e:ArrayCollection>
<e:layout>
<e:VerticalLayout
gap=
"20"
horizontalAlign=
"center"
/>
</e:layout>
</e:List>
</e:Group>
</e:Scroller>
<e:Image
id=
"pic2"
source=
"start1暂无活动11_png"
y=
"595.2"
horizontalCenter=
"0"
/>
<e:Image
id=
"pic1"
source=
"start1暂无活动22_png"
y=
"585"
x=
"239"
/>
</e:Skin>
\ No newline at end of file
egret/src/start1/StartScene1.ts
View file @
1a3f861a
...
...
@@ -5,120 +5,14 @@ import StartItem from "./StartItem";
import
PanelCtrl
from
"../../libs/new_wx/ctrls/panelCtrl"
;
export
default
class
Start1Scene
extends
Scene
{
scroll
:
eui
.
Scroller
;
list
:
eui
.
List
;
async
start
(
d
?)
{
this
.
showlog
();
super
.
start
();
this
.
scroll
.
height
=
this
.
stage
.
stageHeight
-
this
.
scroll
.
y
-
30
;
const
{
data
}
=
DataManager
.
ins
.
getData
(
'yyh_index'
);
this
[
'notLightImg'
].
visible
=
!
data
.
lighten
;
this
[
'lightImg'
].
visible
=
data
.
lighten
;
this
[
'tips'
].
text
=
`我完成的活动
${
data
.
completeCount
}
个`
;
this
.
list
.
itemRenderer
=
StartItem
;
this
.
list
.
dataProvider
=
new
eui
.
ArrayCollection
(
data
.
activityList
);
let
showSuccess
=
false
;
if
(
localStorage
.
getItem
(
'yyh2_success'
)
==
null
&&
data
.
lighten
==
1
)
{
localStorage
.
setItem
(
'yyh2_success'
,
"1"
);
PanelCtrl
.
instance
.
show
(
'SuccessPanel'
);
showSuccess
=
true
;
}
let
completeIds
=
[];
if
(
localStorage
.
getItem
(
'yyh2_task'
)
==
null
)
{
completeIds
=
[];
}
else
{
completeIds
=
JSON
.
parse
(
localStorage
.
getItem
(
'yyh2_task'
));
}
const
currentTaskIds
=
data
.
activityList
.
filter
(
i
=>
i
.
userStatus
==
3
).
map
(
i
=>
i
.
activityId
);
const
newIds
=
currentTaskIds
.
filter
(
i
=>
completeIds
.
indexOf
(
i
)
==
-
1
);
if
(
newIds
&&
newIds
.
length
>
0
)
{
let
newActs
=
data
.
activityList
.
filter
(
i
=>
newIds
.
indexOf
(
i
.
activityId
)
!=
-
1
)
.
map
((
item
,
index
,
list
)
=>
{
if
(
index
==
list
.
length
-
1
)
return
`
${
index
+
1
}
、
${
item
.
activityName
}
`
return
`
${
index
+
1
}
、
${
item
.
activityName
}
\n`
});
if
(
newActs
.
length
>=
4
)
newActs
.
length
=
4
;
// console.log(newActs);
if
(
!
showSuccess
)
PanelCtrl
.
instance
.
show
(
'TaskPanel'
,
newActs
.
join
(
''
));
localStorage
.
setItem
(
'yyh2_task'
,
JSON
.
stringify
(
currentTaskIds
));
}
// setTimeout(() => {
// const list = data.activityList.filter(item => item.userStatus != 0);
// this.list.dataProvider = new eui.ArrayCollection(list);
// }, 2000);
// setTimeout(() => {
// this.list.dataProvider = new eui.ArrayCollection(data.activityList);
// }, 5000);
this
.
scroll
.
visible
=
false
;
this
[
'pic1'
].
visible
=
false
;
this
[
'pic2'
].
visible
=
false
;
if
(
data
.
activityList
.
length
>
0
)
{
this
.
scroll
.
visible
=
true
;
}
else
{
this
[
'pic1'
].
visible
=
true
;
}
this
[
'btn1'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
this
.
list
.
dataProvider
=
new
eui
.
ArrayCollection
(
data
.
activityList
);
this
[
'btn1'
].
size
=
30
;
this
[
'btn2'
].
size
=
28
;
this
[
'btn1'
].
textColor
=
0x000000
;
this
[
'btn1'
].
bold
=
true
;
this
[
'btn2'
].
bold
=
false
;
this
[
'btn2'
].
textColor
=
0x878787
;
this
[
'line1'
].
visible
=
true
;
this
[
'line2'
].
visible
=
false
;
this
.
scroll
.
visible
=
false
;
this
[
'pic1'
].
visible
=
false
;
this
[
'pic2'
].
visible
=
false
;
if
(
data
.
activityList
.
length
>
0
)
{
this
.
scroll
.
visible
=
true
;
}
else
{
this
[
'pic1'
].
visible
=
true
;
}
this
.
scroll
.
viewport
.
scrollV
=
0
;
},
this
);
this
[
'btn2'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
const
list
=
data
.
activityList
.
filter
(
item
=>
item
.
userStatus
!=
0
);
this
.
list
.
dataProvider
=
new
eui
.
ArrayCollection
(
list
);
this
[
'btn2'
].
textColor
=
0x000000
;
this
[
'btn1'
].
textColor
=
0x878787
;
this
[
'line1'
].
visible
=
false
;
this
[
'line2'
].
visible
=
true
;
this
[
'btn2'
].
bold
=
true
;
this
[
'btn1'
].
bold
=
false
;
this
[
'btn2'
].
size
=
30
;
this
[
'btn1'
].
size
=
28
;
this
.
scroll
.
visible
=
false
;
this
.
scroll
.
viewport
.
scrollV
=
0
;
this
[
'pic1'
].
visible
=
false
;
this
[
'pic2'
].
visible
=
false
;
if
(
list
.
length
>
0
)
{
this
.
scroll
.
visible
=
true
;
}
else
{
this
[
'pic2'
].
visible
=
true
;
}
},
this
);
this
.
stage
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,()
=>
{
window
.
location
.
href
=
window
[
'golink'
];
},
this
);
}
initEvents
()
{
...
...
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