Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
db-game-template
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
崔立强
db-game-template
Commits
5ad4278c
Commit
5ad4278c
authored
Nov 26, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
4ede4aab
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
9 deletions
+45
-9
NetManager.ts
egret/libs/tw/manager/NetManager.ts
+16
-0
CostPanel.ts
egret/src/panels/CostPanel.ts
+17
-8
config.js
mock/config.js
+3
-0
index.json
mock/esports/index.json
+1
-1
queryStatus.json
mock/esports/queryStatus.json
+8
-0
No files found.
egret/libs/tw/manager/NetManager.ts
View file @
5ad4278c
...
@@ -1123,6 +1123,22 @@ export class NetManager extends ABNetManager {
...
@@ -1123,6 +1123,22 @@ export class NetManager extends ABNetManager {
this
.
send
(
net
);
this
.
send
(
net
);
}
}
public
yyh_queryStatus
(
callback
:
Function
,
ticketNum
,
pollingCheck
?:
Function
,
pollingCount
=
10
):
void
{
const
param
:
any
=
{
ticketNum
};
const
net
:
INetData
=
{
name
:
'yyh_queryStatus'
,
uri
:
'/projectx/'
+
window
[
'projectID'
]
+
'/credits/queryStatus.do?_='
+
new
Date
().
getTime
(),
type
:
'get'
,
dataType
:
'json'
,
param
:
param
,
callback
:
callback
,
pollingCheck
:
pollingCheck
,
pollingCount
:
pollingCount
,
hideMsg
:
false
};
this
.
send
(
net
);
}
public
getProjectUserInfo
(
callback
:
Function
):
void
{
public
getProjectUserInfo
(
callback
:
Function
):
void
{
const
param
:
any
=
{
const
param
:
any
=
{
...
...
egret/src/panels/CostPanel.ts
View file @
5ad4278c
...
@@ -76,21 +76,30 @@ export default class CostPanel extends Panel {
...
@@ -76,21 +76,30 @@ export default class CostPanel extends Panel {
const
detail
=
DataManager
.
ins
.
getData
(
'yyh_join1_dreamDetail'
).
data
;
const
detail
=
DataManager
.
ins
.
getData
(
'yyh_join1_dreamDetail'
).
data
;
//助力成功之后重新拿一下数据
//助力成功之后重新拿一下数据
let
key
=
`doAssist`
;
let
key
=
`doAssist`
;
if
(
this
.
selectOrder
>
1
)
if
(
this
.
selectOrder
>
1
)
key
+=
`
${
this
.
selectOrder
}
`
;
key
+=
`
${
this
.
selectOrder
}
`
;
NetManager
.
ins
.
yyh_creditsCost
((
success
)
=>
{
NetManager
.
ins
.
yyh_creditsCost
((
success
)
=>
{
if
(
success
)
{
if
(
success
)
{
const
ticketNum
=
DataManager
.
ins
.
getData
(
'yyh_creditsCost'
).
data
;
const
ticketNum
=
DataManager
.
ins
.
getData
(
'yyh_creditsCost'
).
data
;
NetManager
.
ins
.
yyh_assist1_doAssist
(
async
(
success
)
=>
{
NetManager
.
ins
.
yyh_queryStatus
((
s
)
=>
{
Loading
.
instace
.
hide
();
if
(
s
&&
DataManager
.
ins
.
getData
(
'yyh_queryStatus'
).
data
==
1
)
{
if
(
success
)
{
NetManager
.
ins
.
yyh_assist1_doAssist
(
async
(
success
)
=>
{
this
.
hidePanel
(
false
,
1
);
Loading
.
instace
.
hide
();
updateCredits
();
updateCredits
();
if
(
success
)
{
this
.
hidePanel
(
false
,
1
);
}
else
{
this
.
hidePanel
(
false
);
}
},
detail
.
assistItemId
,
detail
.
id
,
this
.
selectOrder
,
ticketNum
);
}
else
{
}
else
{
this
.
hidePanel
(
false
);
this
.
hidePanel
(
false
);
updateCredits
();
updateCredits
();
Loading
.
instace
.
hide
();
}
}
},
detail
.
assistItemId
,
detail
.
id
,
this
.
selectOrder
,
ticketNum
);
},
ticketNum
,
()
=>
{
return
DataManager
.
ins
.
getData
(
'yyh_queryStatus'
).
data
==
0
});
}
else
{
}
else
{
this
.
hidePanel
(
false
);
this
.
hidePanel
(
false
);
updateCredits
();
updateCredits
();
...
...
mock/config.js
View file @
5ad4278c
...
@@ -3,6 +3,9 @@ const config = {
...
@@ -3,6 +3,9 @@ const config = {
'/chw/visual-editor/user/information'
:
{
'/chw/visual-editor/user/information'
:
{
data
:
'./esports/credits.json'
data
:
'./esports/credits.json'
},
},
'/projectx/p32804e45/credits/queryStatus.do'
:
{
data
:
'./esports/queryStatus.json'
},
'/projectx/p32804e45/assist_1/index.do'
:
{
'/projectx/p32804e45/assist_1/index.do'
:
{
data
:
'./esports/index.json'
data
:
'./esports/index.json'
},
},
...
...
mock/esports/index.json
View file @
5ad4278c
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
"reviewPassedWindow"
:
0
,
"reviewPassedWindow"
:
0
,
"reviewFailedWindow"
:
0
,
"reviewFailedWindow"
:
0
,
"reviewDeadline"
:
157489441000
,
"reviewDeadline"
:
157489441000
,
"assistDeadline"
:
0
,
"assistDeadline"
:
9995748944100
0
,
"doAssistCount"
:
10
,
"doAssistCount"
:
10
,
"doAssistLimit"
:
11
,
"doAssistLimit"
:
11
,
...
...
mock/esports/queryStatus.json
0 → 100644
View file @
5ad4278c
{
"success"
:
0
,
"message"
:
""
,
"code"
:
""
,
"data"
:{
"state"
:
2
}
}
\ 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