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
22c927a4
Commit
22c927a4
authored
Aug 10, 2021
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
u
parent
76ad7180
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
20 deletions
+45
-20
assist.do.json
project/mock/webNet/shareAssist/assist.do.json
+1
-6
ShareMask.ts
project/src/common/ShareMask.ts
+19
-4
getShareUrl.ts
project/src/getShareUrl.ts
+1
-1
ShareScene.ts
project/src/scenes/ShareScene.ts
+24
-9
No files found.
project/mock/webNet/shareAssist/assist.do.json
View file @
22c927a4
{
"code"
:
null
,
"data"
:
"1234567890123"
,
"message"
:
123
,
"success"
:
1
}
\ No newline at end of file
{
"code"
:
"200303"
,
"data"
:
null
,
"message"
:
"助力者助力次数已用完"
,
"success"
:
false
}
\ No newline at end of file
project/src/common/ShareMask.ts
View file @
22c927a4
import
{
RES
}
from
"../../module/RES"
;
import
{
layers
}
from
"../../module/views/layers"
;
import
centerTextField
from
"./centerTextField"
;
import
TestLabel
from
"./TestLabel"
;
let
mask
;
export
default
class
ShareMask
extends
FYGE
.
Sprite
{
...
...
@@ -12,10 +14,10 @@ export default class ShareMask extends FYGE.Sprite {
bg
.
endFill
();
this
.
addChild
(
bg
);
this
.
addChild
(
new
TestLabel
({
text
:
'这是个分享引导蒙层'
,
color
:
'0xffffff'
,
w
:
750
,
h
:
1624
}));
//
this.addChild(new TestLabel({
//
text:'这是个分享引导蒙层',
//
color:'0xffffff',w:750,h:1624
//
}));
if
(
container
)
container
.
addChild
(
this
);
...
...
@@ -27,6 +29,19 @@ export default class ShareMask extends FYGE.Sprite {
mask
=
null
;
};
const
sharepicWrapper
=
new
FYGE
.
Sprite
();
sharepicWrapper
.
addChild
(
new
FYGE
.
Sprite
(
RES
.
getRes
(
'share.png'
)));
const
tf
=
new
FYGE
.
TextField
;
tf
.
size
=
30
;
tf
.
fillColor
=
'0xffffff'
;
tf
.
text
=
'点击分享~'
;
tf
.
position
.
set
(
0
,
240
);
centerTextField
(
tf
,
470
,
-
50
);
sharepicWrapper
.
addChild
(
tf
);
sharepicWrapper
.
x
=
750
-
470
-
30
;
sharepicWrapper
.
y
=
30
;
this
.
addChild
(
sharepicWrapper
);
this
.
addEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
callback
,
this
);
}
}
...
...
project/src/getShareUrl.ts
View file @
22c927a4
...
...
@@ -10,5 +10,5 @@ export const getShareUrl = (queryParams) => {
}
export
const
getAutoPrizeUrl
=
()
=>
{
return
getShareUrl
({
auto
P
rize
:
1
})
return
getShareUrl
({
auto
p
rize
:
1
})
}
\ No newline at end of file
project/src/scenes/ShareScene.ts
View file @
22c927a4
import
{
hideWaiting
,
showPanel
,
showWaiting
}
from
"../../module/ctrls"
;
import
{
hideWaiting
,
showPanel
,
show
Toast
,
show
Waiting
}
from
"../../module/ctrls"
;
import
{
Scene
}
from
"../../module/views/Scene"
;
import
centerTextField
from
"../common/centerTextField"
;
import
getObject
from
"../common/getObject"
;
...
...
@@ -14,10 +14,21 @@ export class ShareScene extends Scene {
const
query
=
getQueryParams
();
showWaiting
();
getPxTokenSave
().
then
(
token
=>
{
sendWebNet
(
WebNetName
.
assist
,
{
code
:
query
.
code
}).
then
(
res
=>
{
sendWebNet
(
WebNetName
.
assist
,
{
code
:
query
.
code
,
token
:
token
},
null
,
true
).
then
(
res
=>
{
this
.
updateUI
();
hideWaiting
();
if
(
res
.
success
)
showPanel
(
AssistPanel
,
res
.
data
)
else
{
switch
(
res
.
code
)
{
case
'200303'
:
showToast
(
'助力机会已用完,明天再来吧~'
);
break
;
default
:
showToast
(
'助力机会已用完,明天再来吧~'
);
break
;
}
}
})
})
...
...
@@ -50,13 +61,7 @@ export class ShareScene extends Scene {
});
if
(
query
.
code
)
{
getPxTokenSave
().
then
(
token
=>
{
sendWebNet
(
WebNetName
.
shareInfo
,
{
code
:
getQueryParams
().
code
,
token
:
token
}).
then
(
res
=>
{
const
{
experienceAmount
,
preIncom
,
remainAssist
}
=
res
.
data
;
getObject
(
this
,
'share_tips1'
).
text
=
`
${
experienceAmount
}
元体验金,预期收益
${
preIncom
}
元`
getObject
(
this
,
'share_tips2'
).
text
=
`今日剩余助力次数:
${
remainAssist
}
次`
});
})
this
.
updateUI
();
}
else
{
getObject
(
this
,
'share_assist'
).
visible
=
false
;
getObject
(
this
,
'share_tips3'
).
text
=
''
;
...
...
@@ -68,6 +73,16 @@ export class ShareScene extends Scene {
}
}
private
updateUI
()
{
getPxTokenSave
().
then
(
token
=>
{
sendWebNet
(
WebNetName
.
shareInfo
,
{
code
:
getQueryParams
().
code
,
token
:
token
}).
then
(
res
=>
{
const
{
experienceAmount
,
preIncom
,
remainAssist
}
=
res
.
data
;
getObject
(
this
,
'share_tips1'
).
text
=
`
${
experienceAmount
}
元体验金,预期收益
${
preIncom
}
元`
;
getObject
(
this
,
'share_tips2'
).
text
=
`今日剩余助力次数:
${
remainAssist
}
次`
;
});
});
}
initEvents
()
{
super
.
initEvents
();
...
...
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