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
e39c2fb3
Commit
e39c2fb3
authored
Aug 06, 2021
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
8e7bf13f
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
9 additions
and
54 deletions
+9
-54
index.do.json
project/mock/webNet/game/index.do.json
+0
-1
Main.ts
project/src/Main.ts
+1
-1
ResJson.ts
project/src/ResJson.ts
+1
-1
prize.ts
project/src/panels/prize.ts
+2
-24
IndexScene.ts
project/src/scenes/IndexScene.ts
+1
-23
ShareScene.ts
project/src/scenes/ShareScene.ts
+2
-2
updateShare.ts
project/src/updateShare.ts
+2
-2
No files found.
project/mock/webNet/game/index.do.json
View file @
e39c2fb3
...
@@ -3,7 +3,6 @@
...
@@ -3,7 +3,6 @@
"message"
:
""
,
"message"
:
""
,
"code"
:
""
,
"code"
:
""
,
"data"
:
{
"data"
:
{
"shareCode"
:
"d8kadf2"
,
"isNewbie"
:
1
,
"isNewbie"
:
1
,
"amount"
:
1000
"amount"
:
1000
}
}
...
...
project/src/Main.ts
View file @
e39c2fb3
...
@@ -78,7 +78,7 @@ export class Main {
...
@@ -78,7 +78,7 @@ export class Main {
const
alreadyAcquiredResult
=
await
sendWebNet
(
WebNetName
.
alreadyAcquired
)
const
alreadyAcquiredResult
=
await
sendWebNet
(
WebNetName
.
alreadyAcquired
)
if
(
!
alreadyAcquiredResult
.
data
)
{
if
(
!
alreadyAcquiredResult
.
data
)
{
updateShare
(
'inNewbieScene'
,
''
,
0
,
0
);
updateShare
(
'inNewbieScene'
,
''
);
changeScene
(
NewbieScene
);
changeScene
(
NewbieScene
);
}
}
else
{
else
{
...
...
project/src/ResJson.ts
View file @
e39c2fb3
...
@@ -820,5 +820,5 @@ export const ResJson = {
...
@@ -820,5 +820,5 @@ export const ResJson = {
}
}
}
}
],
],
"path"
:
"https://yun.duiba.com.cn/db_games/activity/template/16282
18126
/resource/"
"path"
:
"https://yun.duiba.com.cn/db_games/activity/template/16282
30044
/resource/"
}
}
\ No newline at end of file
project/src/panels/prize.ts
View file @
e39c2fb3
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
{
ProgressBarS
}
from
"../common/ProgressBarS"
;
import
{
ProgressBarS
}
from
"../common/ProgressBarS"
;
import
{
showShareMask
}
from
"../common/ShareMask"
;
import
{
showShareMask
}
from
"../common/ShareMask"
;
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
updateShare
from
"../updateShare"
;
import
updateShare
from
"../updateShare"
;
import
{
getPxTokenSave
,
getWebData
,
sendWebNet
,
WebNetName
}
from
"../WebNet"
;
import
{
getPxTokenSave
,
sendWebNet
,
WebNetName
}
from
"../WebNet"
;
let
createItemResultComplete
,
myWalletResultComplete
;
const
checkUpdateShare
=
()
=>
{
if
(
createItemResultComplete
&&
myWalletResultComplete
)
{
updateShare
(
'inPrizePanel'
,
createItemResultComplete
.
data
,
myWalletResultComplete
.
data
.
sumIncome
,
myWalletResultComplete
.
data
.
experienceAmount
)
}
}
export
class
PrizePanel
extends
Panel
{
export
class
PrizePanel
extends
Panel
{
amountTxt
:
FYGE
.
TextField
;
amountTxt
:
FYGE
.
TextField
;
percentTxt
:
FYGE
.
TextField
;
percentTxt
:
FYGE
.
TextField
;
...
@@ -56,15 +42,7 @@ export class PrizePanel extends Panel {
...
@@ -56,15 +42,7 @@ export class PrizePanel extends Panel {
getPxTokenSave
().
then
(
token
=>
{
getPxTokenSave
().
then
(
token
=>
{
sendWebNet
(
WebNetName
.
createItem
).
then
(
createItemResult
=>
{
sendWebNet
(
WebNetName
.
createItem
).
then
(
createItemResult
=>
{
createItemResultComplete
=
createItemResult
;
updateShare
(
'inPrizePanel'
,
createItemResult
.
data
)
checkUpdateShare
();
});
})
getPxTokenSave
().
then
(
token
=>
{
sendWebNet
(
WebNetName
.
myWallet
,
{
token
:
token
}).
then
(
myWalletResult
=>
{
myWalletResultComplete
=
myWalletResult
;
checkUpdateShare
();
});
});
})
})
...
...
project/src/scenes/IndexScene.ts
View file @
e39c2fb3
...
@@ -12,16 +12,6 @@ import { ShareSuccessPanel } from '../panels/share_success';
...
@@ -12,16 +12,6 @@ import { ShareSuccessPanel } from '../panels/share_success';
import
{
getStageHeight
,
getStageOffset
}
from
'../stage'
;
import
{
getStageHeight
,
getStageOffset
}
from
'../stage'
;
import
updateShare
from
'../updateShare'
;
import
updateShare
from
'../updateShare'
;
import
{
getPxTokenSave
,
sendWebNet
,
WebNetName
}
from
'../WebNet'
;
import
{
getPxTokenSave
,
sendWebNet
,
WebNetName
}
from
'../WebNet'
;
let
createItemResultComplete
,
myWalletResultComplete
;
const
checkUpdateShare
=
()
=>
{
if
(
createItemResultComplete
&&
myWalletResultComplete
)
{
updateShare
(
'inIndexScene'
,
createItemResultComplete
.
data
,
myWalletResultComplete
.
data
.
sumIncome
,
myWalletResultComplete
.
data
.
experienceAmount
)
}
}
export
class
IndexScene
extends
Scene
{
export
class
IndexScene
extends
Scene
{
onclick_index_drawBtn
(){
onclick_index_drawBtn
(){
...
@@ -81,21 +71,9 @@ export class IndexScene extends Scene {
...
@@ -81,21 +71,9 @@ export class IndexScene extends Scene {
getPxTokenSave
().
then
(
token
=>
{
getPxTokenSave
().
then
(
token
=>
{
sendWebNet
(
WebNetName
.
createItem
).
then
(
createItemResult
=>
{
sendWebNet
(
WebNetName
.
createItem
).
then
(
createItemResult
=>
{
createItemResultComplete
=
createItemResult
;
updateShare
(
'inIndexScene'
,
createItemResult
.
data
,)
checkUpdateShare
();
});
});
})
})
getPxTokenSave
().
then
(
token
=>
{
sendWebNet
(
WebNetName
.
myWallet
,{
token
:
token
}).
then
(
myWalletResult
=>
{
myWalletResultComplete
=
myWalletResult
;
checkUpdateShare
();
});
})
}
}
async
showSharePanel
()
{
async
showSharePanel
()
{
...
...
project/src/scenes/ShareScene.ts
View file @
e39c2fb3
...
@@ -10,7 +10,7 @@ export class ShareScene extends Scene {
...
@@ -10,7 +10,7 @@ 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
.
shareC
ode
}).
then
(
res
=>
{
sendWebNet
(
WebNetName
.
assist
,{
code
:
query
.
c
ode
}).
then
(
res
=>
{
showPanel
(
AssistPanel
)
showPanel
(
AssistPanel
)
})
})
})
})
...
@@ -29,7 +29,7 @@ export class ShareScene extends Scene {
...
@@ -29,7 +29,7 @@ export class ShareScene extends Scene {
console
.
log
(
'ShareScene query>>'
,
JSON
.
stringify
(
data
.
query
));
console
.
log
(
'ShareScene query>>'
,
JSON
.
stringify
(
data
.
query
));
getPxTokenSave
().
then
(
token
=>
{
getPxTokenSave
().
then
(
token
=>
{
sendWebNet
(
WebNetName
.
shareInfo
,{
code
:
getQueryParams
().
shareC
ode
,
token
:
token
}).
then
(
res
=>
{});
sendWebNet
(
WebNetName
.
shareInfo
,{
code
:
getQueryParams
().
c
ode
,
token
:
token
}).
then
(
res
=>
{});
})
})
...
...
project/src/updateShare.ts
View file @
e39c2fb3
const
updateShare
=
(
type
,
shareCode
,
sumIncome
,
experienceAmount
)
=>
{
const
updateShare
=
(
type
,
code
)
=>
{
console
.
log
(
'updateShare'
,
'type='
,
type
,
'
shareCode='
,
shareCode
,
'sumIncome='
,
sumIncome
,
'experienceAmount='
,
experienceAmount
)
console
.
log
(
'updateShare'
,
'type='
,
type
,
'
code='
,
code
)
}
}
export
default
updateShare
export
default
updateShare
\ 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