Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xiaoxiaole
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
wildfirecode13
xiaoxiaole
Commits
f017e7e6
Commit
f017e7e6
authored
Aug 19, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
b0b2a6ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
111 additions
and
0 deletions
+111
-0
NetManager.ts
egret/libs/tw/manager/NetManager.ts
+111
-0
No files found.
egret/libs/tw/manager/NetManager.ts
View file @
f017e7e6
...
@@ -431,6 +431,22 @@ export class NetManager extends ABNetManager {
...
@@ -431,6 +431,22 @@ export class NetManager extends ABNetManager {
this
.
send
(
net
);
this
.
send
(
net
);
}
}
hc_submit
(
callback
:
Function
,
gamedata
):
void
{
const
net
:
INetData
=
{
name
:
'hc_submit'
,
uri
:
'/hdtool/happyclear/submit'
,
type
:
'post'
,
dataType
:
'json'
,
param
:
{
activityId
:
DataManager
.
ins
.
customCfgData
.
actId
,
gameData
:
gamedata
},
hideMsg
:
true
,
callback
:
callback
};
this
.
send
(
net
);
}
getOrderStatus
(
callback
:
Function
,
orderId
:
number
,
pollingCheck
?:
Function
,
pollingCount
=
10
):
void
{
getOrderStatus
(
callback
:
Function
,
orderId
:
number
,
pollingCheck
?:
Function
,
pollingCount
=
10
):
void
{
const
param
:
any
=
{
const
param
:
any
=
{
orderId
:
orderId
orderId
:
orderId
...
@@ -736,6 +752,78 @@ export class NetManager extends ABNetManager {
...
@@ -736,6 +752,78 @@ export class NetManager extends ABNetManager {
this
.
send
(
net
);
this
.
send
(
net
);
}
}
public
hc_home
(
callback
:
Function
,
collectRuleId
:
number
):
void
{
const
net
:
INetData
=
{
name
:
'hc_home'
,
uri
:
'/customActivity/happyclear/home'
,
type
:
'get'
,
dataType
:
'json'
,
param
:
{
activityId
:
DataManager
.
ins
.
customCfgData
.
actId
,
collectRuleId
:
collectRuleId
,
},
callback
:
callback
};
this
.
send
(
net
);
}
public
hc_getLevelInfo
(
callback
:
Function
,
getLevelInfo
:
number
):
void
{
const
net
:
INetData
=
{
name
:
'hc_getLevelInfo'
,
uri
:
'/customActivity/happyclear/getLevelInfo'
,
type
:
'get'
,
dataType
:
'json'
,
param
:
{
activityId
:
DataManager
.
ins
.
customCfgData
.
actId
,
getLevelInfo
:
getLevelInfo
,
},
callback
:
callback
};
this
.
send
(
net
);
}
public
hc_exchange
(
callback
:
Function
,
category
:
number
,
propType
:
number
):
void
{
const
net
:
INetData
=
{
name
:
'hc_exchange'
,
uri
:
'/customActivity/happyclear/exchange'
,
type
:
'post'
,
dataType
:
'json'
,
param
:
{
activityId
:
DataManager
.
ins
.
customCfgData
.
actId
,
category
:
category
,
propType
:
propType
},
callback
:
callback
};
this
.
send
(
net
);
}
public
hc_askForEnergy
(
callback
:
Function
):
void
{
const
net
:
INetData
=
{
name
:
'hc_askForEnergy'
,
uri
:
'/customActivity/happyclear/askForEnergy'
,
type
:
'post'
,
dataType
:
'json'
,
param
:
{
activityId
:
DataManager
.
ins
.
customCfgData
.
actId
},
callback
:
callback
};
this
.
send
(
net
);
}
public
hc_useProp
(
callback
:
Function
,
propType
:
number
):
void
{
const
net
:
INetData
=
{
name
:
'hc_useProp'
,
uri
:
'/customActivity/happyclear/useProp'
,
type
:
'post'
,
dataType
:
'json'
,
param
:
{
activityId
:
DataManager
.
ins
.
customCfgData
.
actId
},
callback
:
callback
};
this
.
send
(
net
);
}
public
getMusicCategory
(
callback
:
Function
,
categoryID
?:
number
,
categoryCode
?,
liteVersion
?):
void
{
public
getMusicCategory
(
callback
:
Function
,
categoryID
?:
number
,
categoryCode
?,
liteVersion
?):
void
{
const
data
:
any
=
{};
const
data
:
any
=
{};
if
(
categoryID
)
data
.
categoryID
=
categoryID
;
if
(
categoryID
)
data
.
categoryID
=
categoryID
;
...
@@ -847,6 +935,29 @@ export class NetManager extends ABNetManager {
...
@@ -847,6 +935,29 @@ export class NetManager extends ABNetManager {
};
};
this
.
getToken
(
net
);
this
.
getToken
(
net
);
}
}
public
hc_doJoin
(
callback
:
Function
,
credits
?:
number
,
collectRuleId
?:
number
):
void
{
const
param
:
any
=
{
activityId
:
DataManager
.
ins
.
customCfgData
.
actId
,
activityType
:
'hdtool'
,
consumerId
:
window
[
'CFG'
].
consumerId
};
if
(
credits
)
{
param
.
credits
=
credits
;
}
if
(
collectRuleId
)
{
param
.
collectRuleId
=
collectRuleId
;
}
const
net
:
INetData
=
{
name
:
'dojoin'
,
uri
:
'/hdtool/recon/doJoin'
,
type
:
'post'
,
dataType
:
'json'
,
param
:
param
,
callback
:
callback
};
this
.
getToken
(
net
);
}
public
getNgameStartStatus
(
callback
:
Function
,
orderId
:
number
,
pollingCheck
:
Function
,
pollingCount
=
10
):
void
{
public
getNgameStartStatus
(
callback
:
Function
,
orderId
:
number
,
pollingCheck
:
Function
,
pollingCount
=
10
):
void
{
const
param
:
any
=
{
const
param
:
any
=
{
...
...
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