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
29e7b501
Commit
29e7b501
authored
Aug 13, 2021
by
shunx 马
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
111
parent
2969c274
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
56 additions
and
20 deletions
+56
-20
index.do.json
project/mock/webNet/dazzle/index.do.json
+3
-3
WebNetName.ts
project/src/WebNetName.ts
+8
-2
cost.ts
project/src/panels/cost.ts
+1
-0
noprize.ts
project/src/panels/noprize.ts
+1
-1
BoxGroup.ts
project/src/scenes/BoxGroup.ts
+2
-2
IndexScene.ts
project/src/scenes/IndexScene.ts
+41
-12
No files found.
project/mock/webNet/dazzle/index.do.json
View file @
29e7b501
{
"code"
:
null
,
"data"
:
{
"surplusCount"
:
1
1111
,
"credits"
:
2222
,
"surplusCount"
:
1
,
"credits"
:
2222
2
,
"needCredits"
:
3333
,
"type"
:
2
,
"isMember"
:
1
},
"message"
:
null
,
"success"
:
1
"success"
:
true
}
\ No newline at end of file
project/src/WebNetName.ts
View file @
29e7b501
...
...
@@ -13,7 +13,13 @@
/**
* 获取首页数据
*/
index
=
"/projectx/{projectId}/dazzle/index.do"
,
drawPrize
=
"/projectx/{projectId}/dazzle/drawPrize.do"
,
index
=
"/projectx/{projectId}/dazzle/index.do"
,
/**
* 获取奖品信息
*/
drawPrize
=
"/projectx/{projectId}/dazzle/drawPrize.do"
,
/**
* 分享获得免费次数
*/
getFreeCount
=
"/projectx/{projectId}/dazzle/getFreeCount.do"
}
\ No newline at end of file
project/src/panels/cost.ts
View file @
29e7b501
...
...
@@ -15,6 +15,7 @@ export class CostPanel extends Panel {
cost_open
()
{
this
.
dispatchEvent
(
"stopIndexEnterFrame"
,
{
});
this
.
hidePanel
();
showPanel
(
PrizePanel
)
}
...
...
project/src/panels/noprize.ts
View file @
29e7b501
...
...
@@ -32,7 +32,7 @@ export class NoPrizePanel extends Panel {
this
.
addChild
(
indexsvga
);
this
.
addChild
(
prizePop
)
indexsvga
.
addEventListener
(
FYGE
.
Event
.
ENTER_FRAME
,
()
=>
{
if
(
indexsvga
.
currentFrame
==
indexsvga
.
totalFrames
-
1
0
)
{
if
(
indexsvga
.
currentFrame
==
indexsvga
.
totalFrames
-
1
3
)
{
prizePop
.
visible
=
true
;
}
},
this
)
...
...
project/src/scenes/BoxGroup.ts
View file @
29e7b501
import
{
showPanel
}
from
"../../module/ctrls"
;
import
{
RES
}
from
"../../module/RES"
;
import
{
delayClick
}
from
"../common/delayClick"
;
import
{
CostPanel
}
from
"../panels/cost"
;
import
{
Box
}
from
"./Box"
;
...
...
@@ -72,14 +73,13 @@ export class BoxGroup extends FYGE.Sprite {
}
handleClick
(
e
)
{
delayClick
(
e
.
target
.
stage
);
const
indexsvga
=
this
.
indexsvga
=
new
FYGE
.
MovieClip
(
RES
.
getRes
(
'盲盒选中-输出.svga'
));
flag
=
1
;
this
.
dispatchEvent
(
"stopIndexEnterFrame"
,
{
});
indexsvga
.
mouseChildren
=
indexsvga
.
mouseEnable
=
false
;
indexsvga
.
position
.
set
(
e
.
target
.
x
-
200
,
e
.
target
.
y
-
190
)
this
.
addChild
(
indexsvga
);
indexsvga
.
startAniRange
(
1
,
indexsvga
.
totalFrames
,
1
,
()
=>
{
flag
=
0
;
showPanel
(
CostPanel
);
});
}
...
...
project/src/scenes/IndexScene.ts
View file @
29e7b501
...
...
@@ -32,20 +32,26 @@ export class IndexScene extends Scene {
start
()
{
super
.
start
();
this
.
getIndex
();
// this.initNonmemberMask();
getObject
(
this
,
'index_sharetips'
).
visible
=
false
;
//
getObject(this,'index_sharetips').visible=false;
this
.
initContainer
();
this
.
initmask
();
const
limit
=
getObject
(
this
,
'index_timestips2'
);
limit
.
position
.
set
(
255
,
1129
);
limit
.
position
.
set
(
245
,
1130
);
limit
.
size
=
25
;
const
credits
=
getObject
(
this
,
'index_moneytips2'
);
credits
.
position
.
set
(
608
,
1129
);
credits
.
position
.
set
(
600
,
1130
);
credits
.
size
=
25
;
const
index_moneytips
=
getObject
(
this
,
'index_moneytips'
);
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
);
list
.
position
.
set
(
80
,
1240
+
30
);
this
.
addChild
(
list
);
this
.
getIndex
();
this
.
stage
.
addEventListener
(
"restartEnterFrame"
,
this
.
onRestartFrame
,
this
);
boxGroup
.
addEventListener
(
"stopIndexEnterFrame"
,
this
.
removeEvent
,
this
);
...
...
@@ -61,9 +67,10 @@ export class IndexScene extends Scene {
initNonmemberMask
()
{
const
mask
=
new
FYGE
.
Shape
();
mask
.
beginFill
(
0
,
0.
1
);
mask
.
beginFill
(
0
,
1
);
mask
.
drawRect
(
0
,
0
,
750
,
1624
);
mask
.
endFill
();
mask
.
alpha
=
0
;
layers
.
topLayer
.
addChild
(
mask
);
mask
.
addEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
()
=>
{
showPanel
(
memberGuidePanel
);
...
...
@@ -107,18 +114,40 @@ export class IndexScene extends Scene {
getIndex
=
async
()
=>
{
const
result
=
getWebData
(
WebNetName
.
index
);
const
shareButton
=
getObject
(
this
,
'index_sharetips'
);
shareButton
.
addEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
()
=>
{
})
const
hand
=
getObject
(
this
,
'index_sharehand'
);
this
.
addChild
(
hand
);
const
tw
=
FYGE
.
Tween
.
get
(
hand
,
{
loop
:
true
}).
to
({
scaleX
:
1.5
,
scaleY
:
1.5
},
1000
).
to
({
scaleX
:
1
,
scaleY
:
1
},
1000
);
hand
.
visible
=
false
;
if
(
result
&&
result
.
data
)
{
const
getBoxButton
=
getObject
(
this
,
'index_opentips'
);
const
reDegree
=
getObject
(
this
,
'index_timestips2'
);
const
credits
=
getObject
(
this
,
'index_moneytips2'
);
credits
.
text
=
result
.
data
.
credits
;
if
(
result
.
data
&&
result
.
data
.
credits
>
9999
)
{
credits
.
text
=
"9999"
+
"+"
;
}
else
{
credits
.
text
=
`
${
result
.
data
.
credits
}
`
;
}
const
needCredits
=
getObject
(
this
,
'index_costtips'
);
needCredits
.
text
=
result
.
data
.
needCredits
+
"积分/次"
;
if
(
result
.
data
.
type
==
2
)
{
reDegree
.
text
=
result
.
data
.
surplusCount
;
needCredits
.
text
=
`
${
result
.
data
.
needCredits
}
`
+
"积分/次"
;
if
(
result
.
data
.
type
==
1
)
{
reDegree
.
text
=
`
${
result
.
data
.
surplusCount
}
`
;
if
(
result
.
data
.
surplusCount
<=
0
)
{
getBoxButton
.
visible
=
false
;
shareButton
.
visible
=
true
;
hand
.
visible
=
true
;
reDegree
.
text
=
'0'
;
}
else
{
getBoxButton
.
visible
=
true
;
shareButton
.
visible
=
false
;
}
}
else
{
reDegree
.
text
=
0
;
needCredits
.
text
=
'免费拆盒1次'
;
reDegree
.
text
=
`
${
result
.
data
.
surplusCount
}
`
;
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