Commit bc38c93f authored by wildfirecode's avatar wildfirecode

1

parent 52c46874
......@@ -366,6 +366,14 @@ export default class MainBase extends eui.UILayer {
});
}
getBackReward() {
return new Promise((r) => {
NetManager.ins.hc_getBackReward(() => {
r();
})
});
}
ajaxElement() {
return new Promise((r) => {
NetManager.ins.ajaxElement(async () => {
......@@ -396,6 +404,7 @@ export default class MainBase extends eui.UILayer {
this.ajaxElement(),
this.hcHome(),
this.hc_userInfo(),
this.getBackReward(),
]);
MapScene.adData = DataManager.ins.getData('hc_advert');
......
......@@ -7,7 +7,7 @@ export interface IExposureData {
activityUseType?: string;
advertId?: number;
appId: number;
consumerId: number;
// consumerId: number;
dcm: string;
domain: string;
dpm: string;
......
......@@ -943,6 +943,21 @@ export class NetManager extends ABNetManager {
};
this.send(net);
}
public hc_getBackReward(callback: Function): void {
const d: any = {
activityId: DataManager.ins.customCfgData.actId
};
const net: INetData = {
name: 'hc_getBackReward',
uri: window['duiba'] + '/customActivity/happyclear/getBackReward',
type: 'get',
dataType: 'json',
hideMsg:true,
param: d,
callback: callback
};
this.send(net);
}
public hc_turnableDojoin(callback: Function): void {
const d: any = {
activityId: DataManager.ins.customCfgData.actId,
......
......@@ -4,30 +4,16 @@ import { IExposureData } from '../data/common/IExposureData';
export class Buried {
private static appId: number;
private static consumerId: number;
// private static consumerId: number;
private static oaId: number;
/**
* 初始化
*/
public static init(): void {
if(DataManager.ins.gameCfgData) {
this.appId = DataManager.ins.gameCfgData.appInfo.appId;
this.consumerId = DataManager.ins.getInfoData.consumerId;
this.oaId = DataManager.ins.gameCfgData.gameInfo.oaId;
} else if(DataManager.ins.customCfgData){
this.appId = DataManager.ins.customCfgData.appId;
this.consumerId = DataManager.ins.customCfgData.consumerId;
this.appId = DataManager.ins.customCfgData.appId;
// this.consumerId = DataManager.ins.customCfgData.consumerId;
this.oaId = DataManager.ins.customCfgData.oaId ;
} else if(DataManager.ins.petIndexData && DataManager.ins.petIndexData.appId && DataManager.ins.petIndexData.activityId){
this.appId = DataManager.ins.petIndexData.appId;
this.consumerId = DataManager.ins.petIndexData.consumerId;
this.oaId = DataManager.ins.petIndexData.activityId ;
} else if(DataManager.ins.petsIndexData && DataManager.ins.petsIndexData.appId && DataManager.ins.petsIndexData.activityId){
this.appId = DataManager.ins.petsIndexData.appId;
this.consumerId = DataManager.ins.petsIndexData.consumerId;
this.oaId = DataManager.ins.petsIndexData.activityId ;
}
}
/**
......@@ -41,7 +27,7 @@ export class Buried {
const exposure: IExposureData = {
dpm: dpm,
dcm: dcm,
consumerId: Buried.consumerId,
// consumerId: Buried.consumerId,
appId: Buried.appId,
domain: embedDomain
};
......
......@@ -3,6 +3,9 @@ const config = {
'/crecord/getrecord': {
data: './happyclear/getrecord.json'
},
'/customActivity/happyclear/getBackReward': {
data: './happyclear/getBackReward.json'
},
'/customActivity/happyclear/bigWheel/baseInfo': {
data: './happyclear/turnablebaseInfo.json'
},
......
{
"code":"0000000000",
"data":{
"appItemId":2322,
"categoryType":1,
"coinType":1,
"img":"1",
"maxValue":2,
"minValue":1,
"name":"测试商品",
"num":3,
"propType":2,
"rate":"概率",
"title":"商品信息",
"value":"虚拟商品标识符"
},
"desc":"OK",
"success":true,
"timestamp":1572079274940
}
\ No newline at end of file
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