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
d8aca3d4
Commit
d8aca3d4
authored
Oct 14, 2019
by
邱旭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
e4bf6e85
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
51 additions
and
29 deletions
+51
-29
workspace.xml
.idea/workspace.xml
+2
-7
NetName.ts
egret/libs/tw/enum/NetName.ts
+1
-0
NetManager.ts
egret/libs/tw/manager/NetManager.ts
+1
-1
StartScene.ts
egret/src/Scene/StartScene/StartScene.ts
+46
-14
getCarousel.json
mock/json/getCarousel.json
+1
-7
No files found.
.idea/workspace.xml
View file @
d8aca3d4
...
@@ -3,13 +3,8 @@
...
@@ -3,13 +3,8 @@
<component
name=
"ChangeListManager"
>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"6d7f36c9-7613-4f12-9933-91b1cd2225cf"
name=
"Default Changelist"
comment=
""
>
<list
default=
"true"
id=
"6d7f36c9-7613-4f12-9933-91b1cd2225cf"
name=
"Default Changelist"
comment=
""
>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/egret/libs/tw/enum/NetName.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/egret/libs/tw/enum/NetName.ts"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/egret/libs/tw/manager/NetManager.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/egret/libs/tw/manager/NetManager.ts"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/egret/libs/tw/manager/NetManager.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/egret/libs/tw/manager/NetManager.ts"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/egret/resource/TextureMerger/preload.tmproject"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/egret/resource/TextureMerger/preload.tmproject"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/egret/resource/default.thm.json"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/egret/resource/default.thm.json"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/egret/resource/skins/StartSceneSkin.exml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/egret/resource/skins/StartSceneSkin.exml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/egret/src/Panels/NoPrizePanel/NoPrizePanel.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/egret/src/Panels/NoPrizePanel/NoPrizePanel.ts"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/egret/src/Panels/PhonePanel/PhonePanel.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/egret/src/Panels/PhonePanel/PhonePanel.ts"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/egret/src/Panels/PrizePanel/PrizePanel.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/egret/src/Panels/PrizePanel/PrizePanel.ts"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/egret/src/Scene/StartScene/StartScene.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/egret/src/Scene/StartScene/StartScene.ts"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/egret/src/Scene/StartScene/StartScene.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/egret/src/Scene/StartScene/StartScene.ts"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/mock/json/getCarousel.json"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/mock/json/getCarousel.json"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/mock/json/getCarousel.json"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/mock/json/getCarousel.json"
afterDir=
"false"
/>
</list>
</list>
...
@@ -125,7 +120,7 @@
...
@@ -125,7 +120,7 @@
<workItem
from=
"1570757810220"
duration=
"3204000"
/>
<workItem
from=
"1570757810220"
duration=
"3204000"
/>
<workItem
from=
"1570863953654"
duration=
"5729000"
/>
<workItem
from=
"1570863953654"
duration=
"5729000"
/>
<workItem
from=
"1571019462141"
duration=
"698000"
/>
<workItem
from=
"1571019462141"
duration=
"698000"
/>
<workItem
from=
"1571025699917"
duration=
"1
5017
000"
/>
<workItem
from=
"1571025699917"
duration=
"1
6352
000"
/>
</task>
</task>
<servers
/>
<servers
/>
</component>
</component>
...
...
egret/libs/tw/enum/NetName.ts
View file @
d8aca3d4
...
@@ -112,5 +112,6 @@ export enum NetName {
...
@@ -112,5 +112,6 @@ export enum NetName {
GET_PHONE
,
GET_PHONE
,
SUBMIT_PHONE
,
SUBMIT_PHONE
,
GET_CAROUSEL
,
}
}
\ No newline at end of file
egret/libs/tw/manager/NetManager.ts
View file @
d8aca3d4
...
@@ -1610,7 +1610,7 @@ export class NetManager extends ABNetManager {
...
@@ -1610,7 +1610,7 @@ export class NetManager extends ABNetManager {
*/
*/
public
getCarousel
(
callback
:
Function
):
void
{
public
getCarousel
(
callback
:
Function
):
void
{
const
net
:
INetData
=
{
const
net
:
INetData
=
{
name
:
NetName
.
SUBMIT_PHONE
,
name
:
NetName
.
GET_CAROUSEL
,
uri
:
'/customActivity/fuzhouBank/bigWheel/getCarousel'
,
uri
:
'/customActivity/fuzhouBank/bigWheel/getCarousel'
,
type
:
'get'
,
type
:
'get'
,
dataType
:
'json'
,
dataType
:
'json'
,
...
...
egret/src/Scene/StartScene/StartScene.ts
View file @
d8aca3d4
...
@@ -24,6 +24,10 @@ export default class StartScene extends Scene {
...
@@ -24,6 +24,10 @@ export default class StartScene extends Scene {
public
myPrize_btn
:
eui
.
Button
;
public
myPrize_btn
:
eui
.
Button
;
public
tips_label
:
eui
.
Label
;
public
tips_label
:
eui
.
Label
;
private
timer
:
egret
.
Timer
;
private
count
:
number
;
public
get
skinKey
()
{
public
get
skinKey
()
{
return
'StartScene'
return
'StartScene'
...
@@ -241,9 +245,19 @@ export default class StartScene extends Scene {
...
@@ -241,9 +245,19 @@ export default class StartScene extends Scene {
}
}
private
initUI
():
void
{
private
initUI
():
void
{
NetManager
.
ins
.
getCarousel
((
success
,
res
)
=>
{
if
(
!
success
)
{
return
;
}
this
.
count
=
res
.
data
.
length
-
1
;
this
.
easyScroller
(
this
.
label1
,
this
.
label2
,
1000
);
});
this
.
getPhone
();
this
.
getPhone
();
this
.
timer
=
new
egret
.
Timer
(
5000
,
0
);
this
.
timer
.
addEventListener
(
egret
.
TimerEvent
.
TIMER
,
this
.
getCarousel
,
this
);
this
.
timer
.
start
();
this
.
infoGroup
.
mask
=
this
.
infoMask
;
this
.
infoGroup
.
mask
=
this
.
infoMask
;
this
.
easyScroller
(
this
.
label1
,
this
.
label2
,
1000
);
this
.
getPrizeInfo
();
this
.
getPrizeInfo
();
NetManager
.
ins
.
showLog
(
getlogItem
(
1
));
NetManager
.
ins
.
showLog
(
getlogItem
(
1
));
...
@@ -258,8 +272,8 @@ export default class StartScene extends Scene {
...
@@ -258,8 +272,8 @@ export default class StartScene extends Scene {
this
.
panelEffect
();
this
.
panelEffect
();
}
}
private
panelEffect
(){
private
panelEffect
()
{
egret
.
Tween
.
get
(
this
.
panel
).
to
({
rotation
:
360
},
8000
).
call
(()
=>
{
egret
.
Tween
.
get
(
this
.
panel
).
to
({
rotation
:
360
},
8000
).
call
(()
=>
{
this
.
panelEffect
();
this
.
panelEffect
();
});
});
}
}
...
@@ -279,7 +293,7 @@ export default class StartScene extends Scene {
...
@@ -279,7 +293,7 @@ export default class StartScene extends Scene {
});
});
}
}
private
easyScroller
(
obj1
:
any
,
obj2
:
any
,
duration
:
number
)
{
private
getCarousel
(
)
{
NetManager
.
ins
.
getCarousel
((
success
,
res
)
=>
{
NetManager
.
ins
.
getCarousel
((
success
,
res
)
=>
{
if
(
!
success
)
{
if
(
!
success
)
{
return
;
return
;
...
@@ -289,18 +303,36 @@ export default class StartScene extends Scene {
...
@@ -289,18 +303,36 @@ export default class StartScene extends Scene {
this
.
infoGroup
.
visible
=
false
;
this
.
infoGroup
.
visible
=
false
;
return
;
return
;
}
}
this
.
count
=
res
.
data
.
length
-
1
;
this
.
infoImg
.
visible
=
true
;
this
.
infoImg
.
visible
=
true
;
this
.
infoGroup
.
visible
=
true
;
this
.
infoGroup
.
visible
=
true
;
obj1
.
y
=
48
;
})
obj2
.
y
=
48
;
}
obj1
.
text
=
`恭喜手机尾号
${
res
.
data
[
Utils
.
RandomInt
(
0
,
res
.
data
.
length
)]}
的客户中奖`
;
obj2
.
text
=
`恭喜手机尾号
${
res
.
data
[
Utils
.
RandomInt
(
0
,
res
.
data
.
length
)]}
的客户中奖`
;
private
easyScroller
(
obj1
:
any
,
obj2
:
any
,
duration
:
number
)
{
egret
.
Tween
.
get
(
obj1
).
to
({
y
:
0
},
duration
).
wait
(
1500
).
call
(()
=>
{
let
data
=
DataManager
.
ins
.
getData
(
NetName
.
GET_CAROUSEL
).
data
;
egret
.
Tween
.
get
(
obj1
).
to
({
y
:
-
48
},
duration
).
call
(()
=>
{
this
.
infoImg
.
visible
=
true
;
egret
.
Tween
.
get
(
obj2
).
to
({
y
:
0
},
duration
).
wait
(
1500
).
call
(()
=>
{
this
.
infoGroup
.
visible
=
true
;
egret
.
Tween
.
get
(
obj2
).
to
({
y
:
-
48
},
duration
).
call
(()
=>
{
obj1
.
y
=
48
;
this
.
easyScroller
(
obj1
,
obj2
,
duration
);
obj2
.
y
=
48
;
});
if
(
this
.
count
<
0
)
{
this
.
count
=
data
.
length
-
1
;
}
obj1
.
text
=
`恭喜手机尾号
${
data
[
this
.
count
]}
的客户中奖`
;
this
.
count
--
;
if
(
this
.
count
<
0
)
{
this
.
count
=
data
.
length
-
1
;
}
obj2
.
text
=
`恭喜手机尾号
${
data
[
this
.
count
]}
的客户中奖`
;
this
.
count
--
;
if
(
this
.
count
<
0
)
{
this
.
count
=
data
.
length
-
1
;
}
egret
.
Tween
.
get
(
obj1
).
to
({
y
:
0
},
duration
).
wait
(
1500
).
call
(()
=>
{
egret
.
Tween
.
get
(
obj1
).
to
({
y
:
-
48
},
duration
).
call
(()
=>
{
egret
.
Tween
.
get
(
obj2
).
to
({
y
:
0
},
duration
).
wait
(
1500
).
call
(()
=>
{
egret
.
Tween
.
get
(
obj2
).
to
({
y
:
-
48
},
duration
).
call
(()
=>
{
this
.
easyScroller
(
obj1
,
obj2
,
duration
);
});
});
});
});
});
});
...
...
mock/json/getCarousel.json
View file @
d8aca3d4
...
@@ -6,12 +6,6 @@
...
@@ -6,12 +6,6 @@
"data"
:
[
"data"
:
[
"1111"
,
"1111"
,
"2222"
,
"2222"
,
"3333"
,
"3333"
"4444"
,
"5555"
,
"6666"
,
"7777"
,
"8888"
,
"9999"
]
]
}
}
\ 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