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
b6d3bd3d
Commit
b6d3bd3d
authored
Aug 06, 2021
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
u
parent
7e64d160
Changes
16
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
183 additions
and
1174 deletions
+183
-1174
carouselInfo.do.json
project/mock/webNet/carousel/carouselInfo.do.json
+6
-6
acquireExperienceAmount.do.json
project/mock/webNet/wallet/acquireExperienceAmount.do.json
+1
-1
acquireOtherExperienceAmount.do.json
...t/mock/webNet/wallet/acquireOtherExperienceAmount.do.json
+0
-0
assist_bg.png
project/resource/assist/assist_bg.png
+0
-0
assist_bg2.png
project/resource/assist/assist_bg2.png
+0
-0
assist_btn.png
project/resource/assist/assist_btn.png
+0
-0
assist_close.png
project/resource/assist/assist_close.png
+0
-0
assist_title.png
project/resource/assist/assist_title.png
+0
-0
res.json
project/resource/res.json
+4
-1
skin.json
project/resource/skin.json
+1
-1116
ResJson.ts
project/src/ResJson.ts
+4
-1
SkinJson.ts
project/src/SkinJson.ts
+101
-1
Marquee.ts
project/src/common/Marquee.ts
+9
-9
prize.ts
project/src/panels/prize.ts
+43
-25
IndexScene.ts
project/src/scenes/IndexScene.ts
+13
-14
NewbieScene.ts
project/src/scenes/NewbieScene.ts
+1
-0
No files found.
project/mock/webNet/carousel/carouselInfo.do.json
View file @
b6d3bd3d
...
@@ -2,16 +2,16 @@
...
@@ -2,16 +2,16 @@
"code"
:
null
,
"code"
:
null
,
"data"
:
[
"data"
:
[
{
{
"nickname"
:
"1
23
"
,
"nickname"
:
"1
38****5678
"
,
"amount"
:
"999"
"amount"
:
"999
9
"
},
},
{
{
"nickname"
:
"
789
"
,
"nickname"
:
"
138****5678
"
,
"amount"
:
"777"
"amount"
:
"777
7
"
},
},
{
{
"nickname"
:
"
456
"
,
"nickname"
:
"
138****5678
"
,
"amount"
:
"888"
"amount"
:
"888
8
"
}
}
],
],
"message"
:
"sed dolor nulla sint ut"
,
"message"
:
"sed dolor nulla sint ut"
,
...
...
project/mock/webNet/wallet/acquireExperienceAmount.do.json
View file @
b6d3bd3d
{
{
"code"
:
null
,
"code"
:
null
,
"data"
:
0
,
"data"
:
50000
0
,
"message"
:
"reprehenderit ullamco minim esse"
,
"message"
:
"reprehenderit ullamco minim esse"
,
"success"
:
true
"success"
:
true
}
}
\ No newline at end of file
project/mock/webNet/wallet/acquireOtherExperienceAmount.do
→
project/mock/webNet/wallet/acquireOtherExperienceAmount.do
.json
View file @
b6d3bd3d
File moved
project/resource/assist/assist_bg.png
0 → 100644
View file @
b6d3bd3d
192 KB
project/resource/assist/assist_bg2.png
0 → 100644
View file @
b6d3bd3d
196 KB
project/resource/assist/assist_btn.png
0 → 100644
View file @
b6d3bd3d
45 KB
project/resource/assist/assist_close.png
0 → 100644
View file @
b6d3bd3d
1.4 KB
project/resource/assist/assist_title.png
0 → 100644
View file @
b6d3bd3d
29.8 KB
project/resource/res.json
View file @
b6d3bd3d
...
@@ -8,7 +8,10 @@
...
@@ -8,7 +8,10 @@
"keys"
:
"startSceneBg.jpg,奖品按钮.png,底部按钮区背景.png,开始游戏.png,排行榜按钮.png,规则按钮.png,赚次数按钮.png,运动锦鲤按钮.png"
,
"keys"
:
"startSceneBg.jpg,奖品按钮.png,底部按钮区背景.png,开始游戏.png,排行榜按钮.png,规则按钮.png,赚次数按钮.png,运动锦鲤按钮.png"
,
"name"
:
"StartScene"
"name"
:
"StartScene"
},
},
{
"keys"
:
"assist_bg.png,assist_bg2.png,assist_btn.png,assist_close.png,assist_title.png"
,
"name"
:
"assist"
},
{
{
"keys"
:
"comCloseBtn.png,toastBg.png,waitingBg.png,waitingRot.png"
,
"keys"
:
"comCloseBtn.png,toastBg.png,waitingBg.png,waitingRot.png"
,
"name"
:
"common"
"name"
:
"common"
...
...
project/resource/skin.json
View file @
b6d3bd3d
This diff is collapsed.
Click to expand it.
project/src/ResJson.ts
View file @
b6d3bd3d
...
@@ -8,7 +8,10 @@ export const ResJson = {
...
@@ -8,7 +8,10 @@ export const ResJson = {
"keys"
:
"startSceneBg.jpg,奖品按钮.png,底部按钮区背景.png,开始游戏.png,排行榜按钮.png,规则按钮.png,赚次数按钮.png,运动锦鲤按钮.png"
,
"keys"
:
"startSceneBg.jpg,奖品按钮.png,底部按钮区背景.png,开始游戏.png,排行榜按钮.png,规则按钮.png,赚次数按钮.png,运动锦鲤按钮.png"
,
"name"
:
"StartScene"
"name"
:
"StartScene"
},
},
{
"keys"
:
"assist_bg.png,assist_bg2.png,assist_btn.png,assist_close.png,assist_title.png"
,
"name"
:
"assist"
},
{
{
"keys"
:
"comCloseBtn.png,toastBg.png,waitingBg.png,waitingRot.png"
,
"keys"
:
"comCloseBtn.png,toastBg.png,waitingBg.png,waitingRot.png"
,
"name"
:
"common"
"name"
:
"common"
...
...
project/src/SkinJson.ts
View file @
b6d3bd3d
...
@@ -258,7 +258,6 @@ export const SkinJson ={
...
@@ -258,7 +258,6 @@ export const SkinJson ={
}
}
]
]
},
},
{
{
"name"
:
"prize"
,
"name"
:
"prize"
,
"x"
:
78
,
"x"
:
78
,
...
@@ -1111,6 +1110,107 @@ export const SkinJson ={
...
@@ -1111,6 +1110,107 @@ export const SkinJson ={
}
}
}
}
]
]
},
{
"name"
:
"assist"
,
"x"
:
78
,
"y"
:
405
,
"type"
:
"container"
,
"children"
:
[
{
"name"
:
"assist_bg2"
,
"x"
:
28
,
"y"
:
0
,
"type"
:
"sprite"
,
"props"
:
{
"source"
:
"assist_bg2.png"
}
},
{
"name"
:
"assist_bg"
,
"x"
:
0
,
"y"
:
134
,
"type"
:
"sprite"
,
"props"
:
{
"source"
:
"assist_bg.png"
}
},
{
"name"
:
"assist_title"
,
"x"
:
78
,
"y"
:
69
,
"type"
:
"sprite"
,
"props"
:
{
"source"
:
"assist_title.png"
}
},
{
"name"
:
"assist_tips3"
,
"x"
:
208
,
"y"
:
208
,
"type"
:
"text"
,
"props"
:
{
"text"
:
"成功助力好友"
,
"size"
:
30
,
"fillColor"
:
"#c75b2b"
,
"textAlpha"
:
1
}
},
{
"name"
:
"assist_tips2"
,
"x"
:
145
,
"y"
:
412
,
"type"
:
"text"
,
"props"
:
{
"text"
:
"活动最高可获得100万体验金
\
r收益多多快来参与吧"
,
"size"
:
24
,
"fillColor"
:
"#c75b2b"
,
"textAlpha"
:
1
}
},
{
"name"
:
"assist_amout"
,
"x"
:
226
,
"y"
:
294
,
"type"
:
"text"
,
"props"
:
{
"text"
:
"1000"
,
"size"
:
60
,
"fillColor"
:
"#ff2f50"
,
"textAlpha"
:
1
}
},
{
"name"
:
"assist_tips"
,
"x"
:
363
,
"y"
:
315
,
"type"
:
"text"
,
"props"
:
{
"text"
:
"元"
,
"size"
:
29
,
"fillColor"
:
"#ff2f50"
,
"textAlpha"
:
1
}
},
{
"name"
:
"assist_btn"
,
"x"
:
127
,
"y"
:
580
,
"type"
:
"sprite"
,
"props"
:
{
"source"
:
"assist_btn.png"
}
},
{
"name"
:
"assist_close"
,
"x"
:
560
,
"y"
:
7
,
"type"
:
"sprite"
,
"props"
:
{
"source"
:
"assist_close.png"
}
}
]
}
}
]
]
}
}
\ No newline at end of file
project/src/common/Marquee.ts
View file @
b6d3bd3d
const
w
=
5
00
;
const
w
=
5
32
;
const
h
=
50
;
const
h
=
40
const
gap
=
10
;
const
gap
=
10
;
export
default
class
Marquee
extends
FYGE
.
Sprite
{
export
default
class
Marquee
extends
FYGE
.
Sprite
{
...
@@ -65,11 +65,11 @@ export default class Marquee extends FYGE.Sprite {
...
@@ -65,11 +65,11 @@ export default class Marquee extends FYGE.Sprite {
initUI
()
{
initUI
()
{
const
bg
=
new
FYGE
.
Shape
();
//
const bg = new FYGE.Shape();
bg
.
beginFill
(
0
,
1
);
//
bg.beginFill(0, 1);
bg
.
drawRoundedRect
(
0
,
0
,
w
,
h
,
5
,
5
,
5
,
5
);
//
bg.drawRoundedRect(0, 0, w, h, 5, 5, 5, 5);
bg
.
endFill
();
//
bg.endFill();
this
.
addChild
(
bg
);
//
this.addChild(bg);
this
.
textwrapper
=
new
FYGE
.
Sprite
();
this
.
textwrapper
=
new
FYGE
.
Sprite
();
this
.
textwrapper
.
x
=
gap
;
this
.
textwrapper
.
x
=
gap
;
...
@@ -84,7 +84,7 @@ export default class Marquee extends FYGE.Sprite {
...
@@ -84,7 +84,7 @@ export default class Marquee extends FYGE.Sprite {
const
buttonTxt
=
new
FYGE
.
TextField
;
const
buttonTxt
=
new
FYGE
.
TextField
;
buttonTxt
.
textHeight
=
h
;
buttonTxt
.
textHeight
=
h
;
buttonTxt
.
size
=
2
0
;
buttonTxt
.
size
=
2
5
;
buttonTxt
.
verticalAlign
=
FYGE
.
VERTICAL_ALIGN
.
MIDDLE
;
buttonTxt
.
verticalAlign
=
FYGE
.
VERTICAL_ALIGN
.
MIDDLE
;
buttonTxt
.
fillColor
=
'0xffffff'
;
buttonTxt
.
fillColor
=
'0xffffff'
;
this
.
textwrapper
.
addChild
(
buttonTxt
);
this
.
textwrapper
.
addChild
(
buttonTxt
);
...
@@ -93,7 +93,7 @@ export default class Marquee extends FYGE.Sprite {
...
@@ -93,7 +93,7 @@ export default class Marquee extends FYGE.Sprite {
const
buttonTxt2
=
new
FYGE
.
TextField
;
const
buttonTxt2
=
new
FYGE
.
TextField
;
buttonTxt2
.
textHeight
=
h
;
buttonTxt2
.
textHeight
=
h
;
buttonTxt2
.
size
=
2
0
;
buttonTxt2
.
size
=
2
5
;
buttonTxt2
.
verticalAlign
=
FYGE
.
VERTICAL_ALIGN
.
MIDDLE
;
buttonTxt2
.
verticalAlign
=
FYGE
.
VERTICAL_ALIGN
.
MIDDLE
;
buttonTxt2
.
fillColor
=
'0xffffff'
;
buttonTxt2
.
fillColor
=
'0xffffff'
;
this
.
textwrapper
.
addChild
(
buttonTxt2
);
this
.
textwrapper
.
addChild
(
buttonTxt2
);
...
...
project/src/panels/prize.ts
View file @
b6d3bd3d
...
@@ -2,6 +2,7 @@ import { changeScene } from "../../module/ctrls";
...
@@ -2,6 +2,7 @@ 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
Group
from
"../common/Group"
;
import
{
ProgressBarS
}
from
"../common/ProgressBarS"
;
import
{
showShareMask
}
from
"../common/ShareMask"
;
import
{
showShareMask
}
from
"../common/ShareMask"
;
import
TestButton
from
"../common/TestButton"
;
import
TestButton
from
"../common/TestButton"
;
import
TestLabel
from
"../common/TestLabel"
;
import
TestLabel
from
"../common/TestLabel"
;
...
@@ -13,11 +14,11 @@ import { getWebData, sendWebNet, WebNetName } from "../WebNet";
...
@@ -13,11 +14,11 @@ import { getWebData, sendWebNet, WebNetName } from "../WebNet";
let
createItemResultComplete
,
myWalletResultComplete
;
let
createItemResultComplete
,
myWalletResultComplete
;
const
checkUpdateShare
=
()
=>
{
const
checkUpdateShare
=
()
=>
{
if
(
createItemResultComplete
&&
myWalletResultComplete
)
{
if
(
createItemResultComplete
&&
myWalletResultComplete
)
{
updateShare
(
'inPrizePanel'
,
updateShare
(
'inPrizePanel'
,
createItemResultComplete
.
data
,
createItemResultComplete
.
data
,
myWalletResultComplete
.
data
.
sumIncome
,
myWalletResultComplete
.
data
.
experienceAmount
)
myWalletResultComplete
.
data
.
sumIncome
,
myWalletResultComplete
.
data
.
experienceAmount
)
}
}
}
}
export
class
PrizePanel
extends
Panel
{
export
class
PrizePanel
extends
Panel
{
...
@@ -28,29 +29,46 @@ export class PrizePanel extends Panel {
...
@@ -28,29 +29,46 @@ export class PrizePanel extends Panel {
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
);
this
.
inviteBtn
=
getObject
(
this
,
'prize_invite'
);
this
.
inviteBtn
=
getObject
(
this
,
'prize_invite'
);
}
}
async
start
(
data
)
{
async
start
(
data
)
{
super
.
start
();
super
.
start
();
const
prize_tips1
=
getObject
(
this
,
'prize_tips1'
);
const
prize_tips2
=
getObject
(
this
,
'prize_tips2'
);
const
prize_tip3
=
getObject
(
this
,
'prize_tip3'
);
prize_tips2
.
text
=
data
;
const
w
=
prize_tips1
.
textWidth
+
prize_tips2
.
textWidth
;
prize_tips2
.
x
=
(
595
-
w
)
/
2
;
prize_tips1
.
x
=
prize_tips2
.
x
+
prize_tips2
.
textWidth
;
prize_tip3
.
textWidth
=
595
;
prize_tip3
.
x
=
0
;
prize_tip3
.
textAlign
=
'center'
;
prize_tip3
.
text
=
`
${
data
}
/1000000`
;
let
percent
=
0.05
;
if
(
data
/
1000000
>
percent
)
{
percent
=
data
/
1000000
;
}
const
progressBar
=
new
ProgressBarS
(
getObject
(
this
,
'prize_progress'
));
progressBar
.
value
=
percent
;
sendWebNet
(
WebNetName
.
createItem
).
then
(
createItemResult
=>
{
sendWebNet
(
WebNetName
.
createItem
).
then
(
createItemResult
=>
{
createItemResultComplete
=
createItemResult
;
createItemResultComplete
=
createItemResult
;
checkUpdateShare
();
checkUpdateShare
();
});
});
sendWebNet
(
WebNetName
.
myWallet
).
then
(
myWalletResult
=>
{
sendWebNet
(
WebNetName
.
myWallet
).
then
(
myWalletResult
=>
{
myWalletResultComplete
=
myWalletResult
;
myWalletResultComplete
=
myWalletResult
;
checkUpdateShare
();
checkUpdateShare
();
});
});
getObject
(
this
,
'prize_close'
).
addEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
()
=>
{
getObject
(
this
,
'prize_close'
).
addEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
()
=>
{
console
.
log
(
'123'
)
console
.
log
(
'123'
)
},
this
);
},
this
);
}
}
hidePanel
()
{
hidePanel
()
{
...
@@ -58,22 +76,22 @@ export class PrizePanel extends Panel {
...
@@ -58,22 +76,22 @@ export class PrizePanel extends Panel {
changeScene
(
IndexScene
);
changeScene
(
IndexScene
);
}
}
onClick_inviteBtn
(){
onClick_inviteBtn
()
{
showShareMask
();
showShareMask
();
}
}
get
closeBtns
()
{
get
closeBtns
()
{
return
[
getObject
(
this
,
'prize_close'
)];
return
[
getObject
(
this
,
'prize_close'
)];
}
}
initEvents
()
{
initEvents
()
{
super
.
initEvents
();
super
.
initEvents
();
this
.
inviteBtn
.
addEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
this
.
onClick_inviteBtn
,
this
);
this
.
inviteBtn
.
addEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
this
.
onClick_inviteBtn
,
this
);
}
}
removeEvents
()
{
removeEvents
()
{
super
.
removeEvents
();
super
.
removeEvents
();
this
.
inviteBtn
.
removeEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
this
.
onClick_inviteBtn
,
this
);
this
.
inviteBtn
.
removeEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
this
.
onClick_inviteBtn
,
this
);
}
}
get
groupNames
()
{
return
[
"prize"
]
}
get
groupNames
()
{
return
[
"prize"
]
}
get
skinName
()
{
return
"prize"
}
get
skinName
()
{
return
"prize"
}
...
...
project/src/scenes/IndexScene.ts
View file @
b6d3bd3d
...
@@ -61,20 +61,19 @@ export class IndexScene extends Scene {
...
@@ -61,20 +61,19 @@ export class IndexScene extends Scene {
// showPanel(DrawPanel)
// showPanel(DrawPanel)
// }, 1000);
// }, 1000);
// sendWebNet(WebNetName.carouselInfo).then(res => {
sendWebNet
(
WebNetName
.
carouselInfo
).
then
(
res
=>
{
// console.log('carouselInfo ', res);
console
.
log
(
'carouselInfo '
,
res
);
// const template = '{phone}邀请了{friend}位好友,获得了{amount}体验金';
const
template
=
'{phone}邀请1位好友,获得了{amount}体验金'
;
// const datas = res.data.map(item => {
const
datas
=
res
.
data
.
map
(
item
=>
{
// let str = template.replace('{phone}', item.nickname);
let
str
=
template
.
replace
(
'{phone}'
,
item
.
nickname
);
// str = str.replace('{friend}', item.friend);
str
=
str
.
replace
(
'{amount}'
,
item
.
amount
);
// str = str.replace('{amount}', item.amount);
return
str
// return str
});
// });
const
q
=
getObject
(
this
,
'index_wrapper'
).
addChild
(
new
Marquee
(
datas
));
// const q = this.page.view.addChild(new Marquee(datas));
q
.
x
=
135
;
q
.
y
=
191
;
// q.y = 50;
window
[
'q'
]
=
q
;
// q.x = 50;
});
// });
sendWebNet
(
WebNetName
.
createItem
).
then
(
createItemResult
=>
{
sendWebNet
(
WebNetName
.
createItem
).
then
(
createItemResult
=>
{
...
...
project/src/scenes/NewbieScene.ts
View file @
b6d3bd3d
...
@@ -15,6 +15,7 @@ export class NewbieScene extends Scene {
...
@@ -15,6 +15,7 @@ export class NewbieScene extends Scene {
prizeBtn
:
FYGE
.
Sprite
;
prizeBtn
:
FYGE
.
Sprite
;
ruleBtn
:
FYGE
.
Sprite
;
ruleBtn
:
FYGE
.
Sprite
;
onPageVisibilityChange
=
async
(
visible
)
=>
{
onPageVisibilityChange
=
async
(
visible
)
=>
{
if
(
getQueryParams
().
disablewatch
==
1
){
console
.
log
(
'disable watch'
);
return
;
}
console
.
log
(
'页面visible'
,
visible
);
console
.
log
(
'页面visible'
,
visible
);
if
(
!
prize
)
{
if
(
!
prize
)
{
console
.
log
(
'没有领体验金'
);
return
;
console
.
log
(
'没有领体验金'
);
return
;
...
...
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