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
a8f5dee5
Commit
a8f5dee5
authored
Aug 09, 2021
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
u
parent
bc5ca4e3
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
33 deletions
+45
-33
index.html
project/index.html
+2
-2
myWallet.do.json
project/mock/webNet/wallet/myWallet.do.json
+1
-1
withDraw.do.json
project/mock/webNet/wallet/withDraw.do.json
+1
-1
IndexScene.ts
project/src/scenes/IndexScene.ts
+1
-0
ShareScene.ts
project/src/scenes/ShareScene.ts
+40
-29
No files found.
project/index.html
View file @
a8f5dee5
...
@@ -66,8 +66,8 @@
...
@@ -66,8 +66,8 @@
</script>
</script>
<!-- 构建的js -->
<!-- 构建的js -->
<
!-- <script src="output.js" crossorigin="anonymous"></script> --
>
<
script
src=
"output.js"
crossorigin=
"anonymous"
></script
>
<
script
src=
"https://yun.duiba.com.cn/db_games/activity/template/1628480312/output.js"
crossorigin=
"anonymous"
></script
>
<
!-- <script src="https://yun.duiba.com.cn/db_games/activity/template/1628480312/output.js" crossorigin="anonymous"></script> --
>
...
...
project/mock/webNet/wallet/myWallet.do.json
View file @
a8f5dee5
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
"data"
:
{
"data"
:
{
"alreadyOpenAccount"
:
false
,
"alreadyOpenAccount"
:
false
,
"assistFriendNum"
:
0
,
"assistFriendNum"
:
0
,
"canWithdraw"
:
fals
e
,
"canWithdraw"
:
tru
e
,
"experienceAmount"
:
1234
,
"experienceAmount"
:
1234
,
"maxExperienceAmount"
:
2500
,
"maxExperienceAmount"
:
2500
,
"millionShares"
:
null
,
"millionShares"
:
null
,
...
...
project/mock/webNet/wallet/withDraw.do.json
View file @
a8f5dee5
...
@@ -2,5 +2,5 @@
...
@@ -2,5 +2,5 @@
"code"
:
"200010"
,
"code"
:
"200010"
,
"data"
:
2000
,
"data"
:
2000
,
"message"
:
"收益未满7天不能提现"
,
"message"
:
"收益未满7天不能提现"
,
"success"
:
tru
e
"success"
:
fals
e
}
}
\ No newline at end of file
project/src/scenes/IndexScene.ts
View file @
a8f5dee5
...
@@ -41,6 +41,7 @@ export class IndexScene extends Scene {
...
@@ -41,6 +41,7 @@ export class IndexScene extends Scene {
if
(
canWithdraw
){
if
(
canWithdraw
){
getPxTokenSave
().
then
(
token
=>
{
getPxTokenSave
().
then
(
token
=>
{
sendWebNet
(
WebNetName
.
withDraw
,
{
token
:
token
}).
then
(
res
=>
{
sendWebNet
(
WebNetName
.
withDraw
,
{
token
:
token
}).
then
(
res
=>
{
if
(
res
.
success
)
showPanel
(
DrawPanel
,
res
.
data
);
showPanel
(
DrawPanel
,
res
.
data
);
});
});
})
})
...
...
project/src/scenes/ShareScene.ts
View file @
a8f5dee5
...
@@ -8,58 +8,69 @@ import { RulePanel } from "../panels/rule";
...
@@ -8,58 +8,69 @@ import { RulePanel } from "../panels/rule";
import
{
getPxTokenSave
,
sendWebNet
,
WebNetName
}
from
"../WebNet"
;
import
{
getPxTokenSave
,
sendWebNet
,
WebNetName
}
from
"../WebNet"
;
export
class
ShareScene
extends
Scene
{
export
class
ShareScene
extends
Scene
{
onClick_share_assist
(){
onClick_share_assist
()
{
const
query
=
getQueryParams
();
const
query
=
getQueryParams
();
getPxTokenSave
().
then
(
token
=>
{
getPxTokenSave
().
then
(
token
=>
{
sendWebNet
(
WebNetName
.
assist
,
{
code
:
query
.
code
}).
then
(
res
=>
{
sendWebNet
(
WebNetName
.
assist
,
{
code
:
query
.
code
}).
then
(
res
=>
{
showPanel
(
AssistPanel
,
res
.
data
)
showPanel
(
AssistPanel
,
res
.
data
)
})
})
})
})
}
}
onClick_share_rule
(){
onClick_share_rule
()
{
showPanel
(
RulePanel
);
showPanel
(
RulePanel
);
}
}
async
start
(
data
)
{
async
start
(
data
)
{
super
.
start
();
super
.
start
();
console
.
log
(
'ShareScene query>>'
,
JSON
.
stringify
(
data
.
query
));
console
.
log
(
'ShareScene query>>'
,
JSON
.
stringify
(
getQueryParams
()));
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
}
次`
});
})
const
query
=
getQueryParams
();
sendWebNet
(
WebNetName
.
carouselInfo
).
then
(
res
=>
{
sendWebNet
(
WebNetName
.
carouselInfo
).
then
(
res
=>
{
console
.
log
(
'carouselInfo '
,
res
);
console
.
log
(
'carouselInfo '
,
res
);
const
template
=
'{phone}邀请1位好友,获得了{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
(
'{amount}'
,
item
.
amount
);
str
=
str
.
replace
(
'{amount}'
,
item
.
amount
);
return
str
return
str
});
});
const
q
=
this
.
addChild
(
new
Marquee
(
datas
));
const
q
=
this
.
addChild
(
new
Marquee
(
datas
));
q
.
x
=
135
;
q
.
y
=
448
;
q
.
x
=
135
;
q
.
y
=
448
;
window
[
'q'
]
=
q
;
window
[
'q'
]
=
q
;
});
});
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
}
次`
});
})
}
else
{
getObject
(
this
,
'share_assist'
).
visible
=
false
;
getObject
(
this
,
'share_tips3'
).
text
=
''
;
const
go
=
getObject
(
this
,
'share_go'
);
go
.
x
=
750
/
2
-
234
*
1.5
/
2
;
go
.
y
=
1110
;
go
.
scaleX
=
1.5
;
go
.
scaleY
=
1.5
;
}
}
}
initEvents
()
{
initEvents
()
{
super
.
initEvents
();
super
.
initEvents
();
getObject
(
this
,
'share_rule'
).
addEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
this
.
onClick_share_rule
,
this
);
getObject
(
this
,
'share_rule'
).
addEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
this
.
onClick_share_rule
,
this
);
getObject
(
this
,
'share_assist'
).
addEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
this
.
onClick_share_assist
,
this
);
getObject
(
this
,
'share_assist'
).
addEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
this
.
onClick_share_assist
,
this
);
}
}
removeEvents
()
{
removeEvents
()
{
super
.
removeEvents
();
super
.
removeEvents
();
getObject
(
this
,
'share_rule'
).
removeEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
this
.
onClick_share_rule
,
this
);
getObject
(
this
,
'share_rule'
).
removeEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
this
.
onClick_share_rule
,
this
);
getObject
(
this
,
'share_assist'
).
removeEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
this
.
onClick_share_assist
,
this
);
getObject
(
this
,
'share_assist'
).
removeEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
this
.
onClick_share_assist
,
this
);
}
}
get
groupNames
()
{
return
[
"share"
]
}
get
groupNames
()
{
return
[
"share"
]
}
...
...
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