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
e57f6b05
Commit
e57f6b05
authored
Aug 04, 2021
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
55cde038
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
55 additions
and
116 deletions
+55
-116
Main.ts
project/src/Main.ts
+7
-13
Marquee2.ts
project/src/common/Marquee2.ts
+0
-91
ShareMask.ts
project/src/common/ShareMask.ts
+4
-1
TestLabel.ts
project/src/common/TestLabel.ts
+14
-6
prize.ts
project/src/panels/prize.ts
+30
-5
No files found.
project/src/Main.ts
View file @
e57f6b05
import
{
layers
,
destroyLayers
}
from
"../module/views/layer
s"
;
import
{
changeScene
,
destroyAllCtrls
}
from
"../module/ctrl
s"
;
import
{
RES
}
from
"../module/RES"
;
import
{
RES
}
from
"../module/RES"
;
import
{
changeScene
,
showWaiting
,
destroyAllCtrls
,
showPanel
,
hideWaiting
}
from
"../module/ctrl
s"
;
import
{
destroyLayers
,
layers
}
from
"../module/views/layer
s"
;
import
getQueryParams
from
"./getQueryParams"
;
import
{
ResJson
}
from
"./ResJson"
;
import
{
ResJson
}
from
"./ResJson"
;
import
{
SkinJson
}
from
"./SkinJson"
;
import
{
LoadingScene
}
from
"./template/LoadingScene"
;
import
{
destroyWebNetData
,
sendWebNet
,
WebNetName
}
from
"./WebNet"
;
import
{
StartScene
}
from
"./template/StartScene"
;
import
{
NewbieScene
}
from
"./scenes/NewbieScene"
;
import
{
IndexScene
}
from
"./scenes/IndexScene"
;
import
{
IndexScene
}
from
"./scenes/IndexScene"
;
import
{
NewbieScene
}
from
"./scenes/NewbieScene"
;
import
{
ShareScene
}
from
"./scenes/ShareScene"
;
import
{
ShareScene
}
from
"./scenes/ShareScene"
;
import
{
ShareFailPanel
}
from
"./panels/share_fail"
;
import
{
SkinJson
}
from
"./SkinJson"
;
import
{
ShareSuccessPanel
}
from
"./panels/share_success"
;
import
{
isFromShare
}
from
"duiba-utils"
;
import
getQueryParams
from
"./getQueryParams"
;
import
updateShare
from
"./updateShare"
;
import
updateShare
from
"./updateShare"
;
import
ShareMask
from
"./common/ShareMask"
;
import
{
destroyWebNetData
,
sendWebNet
,
WebNetName
}
from
"./WebNet"
;
const
isShare
=
()
=>
{
const
isShare
=
()
=>
{
const
query
=
getQueryParams
();
const
query
=
getQueryParams
();
...
...
project/src/common/Marquee2.ts
deleted
100644 → 0
View file @
55cde038
const
w
=
500
;
const
h
=
50
;
const
gap
=
10
;
export
default
class
Marquee2
extends
FYGE
.
Sprite
{
textwrapper
:
FYGE
.
Sprite
;
datas
:
string
[];
buttonTxt1
:
FYGE
.
TextField
;
buttonTxt2
:
FYGE
.
TextField
;
time
:
number
;
constructor
(
datas
:
string
[],
time
:
number
=
5000
,
direction
=
'left'
)
{
super
();
this
.
datas
=
datas
;
this
.
time
=
time
;
this
.
initUI
();
this
.
start
();
}
start
()
{
let
next
;
next
=
()
=>
{
const
item1
=
this
.
datas
.
shift
();
this
.
datas
.
push
(
item1
);
const
item2
=
this
.
datas
.
shift
();
this
.
datas
.
push
(
item2
);
this
.
buttonTxt1
.
text
=
item1
;
this
.
buttonTxt2
.
text
=
item2
;
this
.
buttonTxt1
.
y
=
0
;
this
.
buttonTxt2
.
y
=
this
.
buttonTxt1
.
textHeight
;
FYGE
.
Tween
.
removeTweens
(
this
.
buttonTxt1
);
FYGE
.
Tween
.
removeTweens
(
this
.
buttonTxt2
);
FYGE
.
Tween
.
get
(
this
.
buttonTxt1
)
.
to
({
y
:
-
this
.
buttonTxt1
.
textHeight
},
this
.
time
)
FYGE
.
Tween
.
get
(
this
.
buttonTxt2
)
.
to
({
y
:
-
this
.
buttonTxt2
.
textHeight
},
this
.
time
)
.
wait
(
1000
)
.
call
(
next
);
}
next
();
}
initUI
()
{
const
bg
=
new
FYGE
.
Shape
();
bg
.
beginFill
(
0
,
1
);
bg
.
drawRoundedRect
(
0
,
0
,
w
,
h
,
5
,
5
,
5
,
5
);
bg
.
endFill
();
this
.
addChild
(
bg
);
this
.
textwrapper
=
new
FYGE
.
Sprite
();
this
.
textwrapper
.
x
=
gap
;
this
.
addChild
(
this
.
textwrapper
);
const
mask
=
new
FYGE
.
Shape
();
mask
.
beginFill
(
0
,
1
);
mask
.
drawRoundedRect
(
0
,
0
,
w
-
gap
*
2
,
h
,
5
,
5
,
5
,
5
);
mask
.
endFill
();
this
.
textwrapper
.
addChild
(
mask
);
this
.
textwrapper
.
mask
=
mask
;
const
buttonTxt
=
new
FYGE
.
TextField
;
buttonTxt
.
textHeight
=
h
;
buttonTxt
.
size
=
20
;
buttonTxt
.
verticalAlign
=
FYGE
.
VERTICAL_ALIGN
.
MIDDLE
;
buttonTxt
.
fillColor
=
'0xffffff'
;
this
.
textwrapper
.
addChild
(
buttonTxt
);
this
.
buttonTxt
=
buttonTxt
;
const
buttonTxt2
=
new
FYGE
.
TextField
;
buttonTxt2
.
textHeight
=
h
;
buttonTxt2
.
size
=
20
;
buttonTxt2
.
verticalAlign
=
FYGE
.
VERTICAL_ALIGN
.
MIDDLE
;
buttonTxt2
.
fillColor
=
'0xffffff'
;
this
.
textwrapper
.
addChild
(
buttonTxt2
);
this
.
buttonTxt2
=
buttonTxt2
;
}
dispose
()
{
}
}
\ No newline at end of file
project/src/common/ShareMask.ts
View file @
e57f6b05
...
@@ -11,7 +11,10 @@ export default class ShareMask extends FYGE.Sprite {
...
@@ -11,7 +11,10 @@ export default class ShareMask extends FYGE.Sprite {
bg
.
endFill
();
bg
.
endFill
();
this
.
addChild
(
bg
);
this
.
addChild
(
bg
);
this
.
addChild
(
new
TestLabel
(
'这是个分享引导蒙层'
,
'0xffffff'
));
this
.
addChild
(
new
TestLabel
({
text
:
'这是个分享引导蒙层'
,
color
:
'0xffffff'
,
w
:
750
,
h
:
1624
}));
if
(
container
)
if
(
container
)
container
.
addChild
(
this
);
container
.
addChild
(
this
);
...
...
project/src/common/TestLabel.ts
View file @
e57f6b05
export
default
class
TestLabel
extends
FYGE
.
Sprite
{
export
default
class
TestLabel
extends
FYGE
.
Sprite
{
constructor
(
txt
,
color
=
'0x000000'
,
parent
?)
{
textfield
:
FYGE
.
TextField
;
constructor
({
text
,
color
,
w
,
h
,
size
}:
any
,
parent
?)
{
super
();
super
();
this
[
'w'
]
=
w
;
this
[
'h'
]
=
h
;
const
buttonTxt
=
new
FYGE
.
TextField
;
const
buttonTxt
=
new
FYGE
.
TextField
;
buttonTxt
.
text
=
txt
;
buttonTxt
.
text
=
t
e
xt
;
buttonTxt
.
textWidth
=
750
;
buttonTxt
.
textWidth
=
w
;
buttonTxt
.
textHeight
=
1624
;
buttonTxt
.
textHeight
=
h
;
buttonTxt
.
size
=
5
0
;
buttonTxt
.
size
=
size
||
3
0
;
buttonTxt
.
textAlign
=
FYGE
.
TEXT_ALIGN
.
CENTER
;
buttonTxt
.
textAlign
=
FYGE
.
TEXT_ALIGN
.
CENTER
;
buttonTxt
.
verticalAlign
=
FYGE
.
VERTICAL_ALIGN
.
MIDDLE
;
buttonTxt
.
verticalAlign
=
FYGE
.
VERTICAL_ALIGN
.
MIDDLE
;
buttonTxt
.
fillColor
=
color
;
buttonTxt
.
fillColor
=
color
;
this
.
addChild
(
buttonTxt
);
this
.
addChild
(
buttonTxt
);
this
.
textfield
=
buttonTxt
if
(
parent
)
if
(
parent
)
parent
.
addChild
(
this
)
parent
.
addChild
(
this
)
}
}
getRect
(){
return
[
this
[
'w'
],
this
[
'h'
]]
}
}
}
\ No newline at end of file
project/src/panels/prize.ts
View file @
e57f6b05
import
{
changeScene
}
from
"../../module/ctrls"
;
import
{
changeScene
}
from
"../../module/ctrls"
;
import
{
RES
}
from
"../../module/RES"
;
import
{
RES
}
from
"../../module/RES"
;
import
{
Panel
}
from
"../../module/views/Panel"
;
import
{
Panel
}
from
"../../module/views/Panel"
;
import
Group
from
"../common/Group"
;
import
TestButton
from
"../common/TestButton"
;
import
TestButton
from
"../common/TestButton"
;
import
TestLabel
from
"../common/TestLabel"
;
import
getObject
from
"../getObject"
;
import
getObject
from
"../getObject"
;
import
{
IndexScene
}
from
"../scenes/IndexScene"
;
import
{
IndexScene
}
from
"../scenes/IndexScene"
;
import
{
Tools
}
from
"../Tools"
;
import
{
Tools
}
from
"../Tools"
;
...
@@ -9,15 +11,38 @@ import updateShare from "../updateShare";
...
@@ -9,15 +11,38 @@ import updateShare from "../updateShare";
import
{
getWebData
,
sendWebNet
,
WebNetName
}
from
"../WebNet"
;
import
{
getWebData
,
sendWebNet
,
WebNetName
}
from
"../WebNet"
;
export
class
PrizePanel
extends
Panel
{
export
class
PrizePanel
extends
Panel
{
amountTxt
:
FYGE
.
TextField
;
percentTxt
:
FYGE
.
TextField
;
initUi
()
{
initUi
()
{
super
.
initUi
();
super
.
initUi
();
var
skin
=
RES
.
getSkinDataByName
(
this
.
skinName
);
var
skin
=
RES
.
getSkinDataByName
(
this
.
skinName
);
this
.
position
.
set
(
skin
.
x
,
skin
.
y
);
this
.
position
.
set
(
skin
.
x
,
skin
.
y
);
const
group
=
new
Group
();
this
.
addChild
(
group
)
const
prizeBtn
=
new
TestButton
(
'立即拆开'
);
group
.
add
(
prizeBtn
);
const
label
=
new
TestLabel
({
text
:
'1000元'
,
color
:
'0x000000'
,
w
:
500
,
h
:
100
,
size
:
50
});
group
.
add
(
label
);
this
.
amountTxt
=
label
.
textfield
;
const
label2
=
new
TestLabel
({
text
:
'1000/1000000'
,
color
:
'0x000000'
,
w
:
500
,
h
:
100
,
size
:
50
});
group
.
add
(
label2
);
this
.
percentTxt
=
label2
.
textfield
;
}
}
get
groupNames
()
{
return
[
"prize"
]
}
get
groupNames
()
{
return
[
"prize"
]
}
get
skinName
()
{
return
"prize"
}
get
skinName
()
{
return
"prize"
}
//两个按钮都是关闭作用
//两个按钮都是关闭作用
get
closeBtns
()
{
get
closeBtns
()
{
...
@@ -27,13 +52,13 @@ export class PrizePanel extends Panel {
...
@@ -27,13 +52,13 @@ export class PrizePanel extends Panel {
async
start
(
data
)
{
async
start
(
data
)
{
super
.
start
();
super
.
start
();
const
indexResult
=
await
sendWebNet
(
WebNetName
.
index
)
const
indexResult
=
await
sendWebNet
(
WebNetName
.
index
)
updateShare
(
'inPrizePanel'
,
data
.
shareCode
,
indexResult
.
data
.
amount1
,
indexResult
.
data
.
amount2
)
updateShare
(
'inPrizePanel'
,
data
.
shareCode
,
indexResult
.
data
.
amount1
,
indexResult
.
data
.
amount2
)
}
}
hidePanel
(){
hidePanel
()
{
super
.
hidePanel
();
super
.
hidePanel
();
changeScene
(
IndexScene
);
changeScene
(
IndexScene
);
}
}
}
}
\ 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