Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wfc13
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
wildfirecode13
wfc13
Commits
10734c46
Commit
10734c46
authored
Aug 13, 2021
by
shunx 马
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
111
parent
27290ee0
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
26 deletions
+47
-26
index.do.json
project/mock/webNet/dazzle/index.do.json
+2
-2
cost.ts
project/src/panels/cost.ts
+2
-1
getTimes.ts
project/src/panels/getTimes.ts
+10
-2
IndexScene.ts
project/src/scenes/IndexScene.ts
+33
-21
No files found.
project/mock/webNet/dazzle/index.do.json
View file @
10734c46
{
"code"
:
null
,
"data"
:
{
"surplusCount"
:
0
,
"surplusCount"
:
1
,
"credits"
:
22222
,
"needCredits"
:
3333
,
"type"
:
2
,
"type"
:
1
,
"isMember"
:
1
},
"message"
:
null
,
...
...
project/src/panels/cost.ts
View file @
10734c46
...
...
@@ -7,6 +7,7 @@ import { sendWebNetWithToken } from "../sendWebNetWithToken";
import
{
sendWebNet
}
from
"../WebNet"
;
import
{
WebNetName
}
from
"../WebNetName"
;
import
{
NoPrizePanel
}
from
"./noprize"
;
import
{
notEnoughMoneyPanel
}
from
"./notEnoughMoney"
;
import
{
PrizePanel
}
from
"./prize"
;
let
section
;
...
...
project/src/panels/getTimes.ts
View file @
10734c46
import
{
showPanel
}
from
"../../module/ctrls"
;
import
{
RES
}
from
"../../module/RES"
;
import
{
Panel
}
from
"../../module/views/Panel"
;
import
centerTextField
from
"../common/centerTextField"
;
import
getObject
from
"../common/getObject"
;
import
{
hideShareMask
,
showShareMask
}
from
"../common/ShareMask"
;
import
{
SharePanel
}
from
"./share"
;
let
section
;
export
class
getTimesPanel
extends
Panel
{
click_getTimes_go
(){
console
.
log
(
'click_getTimes_go'
);
click_getTimes_go
()
{
this
.
hidePanel
();
showShareMask
();
setTimeout
(()
=>
{
hideShareMask
();
showPanel
(
SharePanel
);
},
2000
)
}
get
groupNames
()
{
return
[
"getTimes"
]
}
...
...
project/src/scenes/IndexScene.ts
View file @
10734c46
...
...
@@ -22,8 +22,9 @@ import { showShareMask } from "../common/ShareMask";
let
boxGroup
:
BoxGroup
;
let
boxArea
;
let
hand
:
FYGE
.
Sprite
;
let
hand
;
let
shareButton
;
let
indexData
;
export
class
IndexScene
extends
Scene
{
get
groupNames
()
{
return
[
"index"
]
}
...
...
@@ -35,8 +36,6 @@ export class IndexScene extends Scene {
start
()
{
super
.
start
();
// this.initNonmemberMask();
// getObject(this,'index_sharetips').visible=false;
this
.
initContainer
();
this
.
initmask
();
const
limit
=
getObject
(
this
,
'index_timestips2'
);
...
...
@@ -49,20 +48,21 @@ export class IndexScene extends Scene {
index_moneytips
.
position
.
set
(
480
,
1131
);
const
index_timestips
=
getObject
(
this
,
'index_timestips'
);
index_timestips
.
position
.
set
(
127
,
1131
);
const
list
=
new
FYGE
.
ScrollList
(
ScrollItem
,
131
+
20
,
131
,
620
,
154
,
false
);
const
array
=
[
'//yun.duiba.com.cn/spark/assets/1398924a1b804f0f20f9d3e16ed3158c2b3d686b.png'
,
'//yun.duiba.com.cn/spark/assets/1398924a1b804f0f20f9d3e16ed3158c2b3d686b.png'
,
'//yun.duiba.com.cn/spark/assets/1398924a1b804f0f20f9d3e16ed3158c2b3d686b.png'
,
'//yun.duiba.com.cn/spark/assets/1398924a1b804f0f20f9d3e16ed3158c2b3d686b.png'
,
'//yun.duiba.com.cn/spark/assets/1398924a1b804f0f20f9d3e16ed3158c2b3d686b.png'
];
list
.
updateData
(
array
);
const
list
=
new
FYGE
.
ScrollList
(
ScrollItem
,
131
+
20
,
131
,
620
,
154
,
false
);
list
.
position
.
set
(
80
,
1240
+
30
);
this
.
addChild
(
list
);
if
(
hand
)
{
const
tw
=
FYGE
.
Tween
.
get
(
hand
,
{
loop
:
true
}).
to
({
scaleX
:
1.5
,
scaleY
:
1.5
},
1000
).
to
({
scaleX
:
1
,
scaleY
:
1
},
1000
);
}
hand
=
getObject
(
this
,
'index_sharehand'
);
this
.
addChild
(
hand
);
this
.
getIndex
();
const
result
=
getWebData
(
WebNetName
.
index
)
const
array
=
[
'//yun.duiba.com.cn/spark/assets/1398924a1b804f0f20f9d3e16ed3158c2b3d686b.png'
,
'//yun.duiba.com.cn/spark/assets/1398924a1b804f0f20f9d3e16ed3158c2b3d686b.png'
,
'//yun.duiba.com.cn/spark/assets/1398924a1b804f0f20f9d3e16ed3158c2b3d686b.png'
,
'//yun.duiba.com.cn/spark/assets/1398924a1b804f0f20f9d3e16ed3158c2b3d686b.png'
,
'//yun.duiba.com.cn/spark/assets/1398924a1b804f0f20f9d3e16ed3158c2b3d686b.png'
];
list
.
updateData
(
array
);
hand
&&
FYGE
.
Tween
.
get
(
hand
,
{
loop
:
true
}).
to
({
scaleX
:
1.5
,
scaleY
:
1.5
},
1000
).
to
({
scaleX
:
1
,
scaleY
:
1
},
1000
);
this
.
stage
.
addEventListener
(
"restartEnterFrame"
,
this
.
onRestartFrame
,
this
);
boxGroup
.
addEventListener
(
"stopIndexEnterFrame"
,
this
.
removeEvent
,
this
);
shareButton
=
getObject
(
this
,
'index_sharetips'
);
shareButton
.
addEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
()
=>
{
showShareMask
();
this
.
handleShare
();
},
this
)
}
...
...
@@ -121,16 +121,19 @@ export class IndexScene extends Scene {
this
.
removeEventListener
(
FYGE
.
Event
.
ENTER_FRAME
,
this
.
onEnterFrame
,
this
);
}
handleShare
=
async
()
=>
{
showShareMask
();
handleShare
=
async
()
=>
{
if
(
indexData
.
data
.
type
==
2
&&
indexData
.
data
.
surplusCount
<=
0
)
{
showPanel
(
timesNotEnoughPanel
);
}
else
{
showPanel
(
getTimesPanel
);
await
getWebData
(
WebNetName
.
getFreeCount
);
this
.
getIndex
();
}
}
getIndex
=
async
()
=>
{
const
result
=
await
getWebData
(
WebNetName
.
index
);
hand
=
getObject
(
this
,
'index_sharehand'
);
this
.
addChild
(
hand
);
indexData
=
result
;
hand
.
visible
=
false
;
if
(
result
&&
result
.
data
)
{
const
getBoxButton
=
getObject
(
this
,
'index_opentips'
);
...
...
@@ -155,13 +158,22 @@ export class IndexScene extends Scene {
shareButton
.
visible
=
false
;
}
}
else
{
if
(
result
.
data
.
surplusCount
>
0
)
{
needCredits
.
text
=
'免费拆盒1次'
;
reDegree
.
text
=
`
${
result
.
data
.
surplusCount
}
`
;
getBoxButton
.
visible
=
false
;
shareButton
.
visible
=
true
;
hand
.
visible
=
true
;
}
else
{
reDegree
.
text
=
'0'
;
needCredits
.
text
=
`
${
result
.
data
.
needCredits
}
`
+
"积分/次"
;
getBoxButton
.
visible
=
true
;
shareButton
.
visible
=
false
;
}
}
}
}
...
...
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