Commit f017e7e6 authored by wildfirecode's avatar wildfirecode

1

parent b0b2a6ab
...@@ -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 = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment