Commit e4c72a67 authored by zhangjinzhou's avatar zhangjinzhou

代码暂存

parent c587e4d8
...@@ -153,5 +153,5 @@ export enum NetName { ...@@ -153,5 +153,5 @@ export enum NetName {
ACHIEVES, ACHIEVES,
GAMEGROUP_MARK, GAMEGROUP_MARK,
GAMEGROUP_PRIZE, GAMEGROUP_PRIZE,
frontVariable,
} }
...@@ -1610,6 +1610,23 @@ export class NetManager extends ABNetManager { ...@@ -1610,6 +1610,23 @@ export class NetManager extends ABNetManager {
}; };
this.send(net); this.send(net);
} }
/**
*
* @param callback
*/
public frontVariable(callback: Function) {
const net: INetData = {
name: NetName.frontVariable,
uri: '/projectx/{projectId}/frontVariable.query',
type: 'get',
dataType: 'json',
param: {
},
callback: callback
};
this.send(net);
}
} }
// window['nt'] = NetManager.ins; // window['nt'] = NetManager.ins;
......
...@@ -111,6 +111,7 @@ class Main extends eui.UILayer { ...@@ -111,6 +111,7 @@ class Main extends eui.UILayer {
await Tools.getQuestionList(); // 问题列表 await Tools.getQuestionList(); // 问题列表
await Tools.getMedalData(); // 勋章数据 await Tools.getMedalData(); // 勋章数据
await Tools.gameGroupPrize(); // 游戏合集发奖 await Tools.gameGroupPrize(); // 游戏合集发奖
await Tools.gameFrontVariable();//
const areaPrice = await Tools.getAreaPrice(); const areaPrice = await Tools.getAreaPrice();
if (!areaPrice) { if (!areaPrice) {
......
...@@ -67,7 +67,8 @@ export default class MainScene extends Scene { ...@@ -67,7 +67,8 @@ export default class MainScene extends Scene {
public houseBtn: Group; public houseBtn: Group;
public xiaoE: Image; public xiaoE: eui.Group;
advertBtn:eui.Group
public xiaoEGroup: eui.Group; public xiaoEGroup: eui.Group;
public xiaoEGroupList: eui.List; public xiaoEGroupList: eui.List;
...@@ -202,6 +203,7 @@ export default class MainScene extends Scene { ...@@ -202,6 +203,7 @@ export default class MainScene extends Scene {
[this.xiaoEAnswer, this.onTap, this], [this.xiaoEAnswer, this.onTap, this],
[this.xiaoEIKnow, this.onTap, this], [this.xiaoEIKnow, this.onTap, this],
[this.xiaoETip, this.onTap, this], [this.xiaoETip, this.onTap, this],
[this.advertBtn, this.onTap, this],
]); ]);
} }
...@@ -236,7 +238,16 @@ export default class MainScene extends Scene { ...@@ -236,7 +238,16 @@ export default class MainScene extends Scene {
this.hideXiaoETip(); this.hideXiaoETip();
M_HideOption(); M_HideOption();
break; break;
case this.advertBtn:
console.error("广告数据====?",Tools.frontdata);
if(Tools.frontdata&&Tools.frontdata.data&&Tools.frontdata.data.balloon_url){
let balloon_url = Tools.frontdata.data.balloon_url;
if(balloon_url&&balloon_url.length>4){
window.location.href = balloon_url;
}
}
break;
default: default:
break; break;
} }
......
...@@ -194,5 +194,14 @@ export class Tools { ...@@ -194,5 +194,14 @@ export class Tools {
}, toPlaywayId, toActionId, num, desc); }, toPlaywayId, toActionId, num, desc);
}); });
} }
public static frontdata = null;
public static gameFrontVariable(){
return new Promise((resolve)=>{
NetManager.ins.frontVariable((success,res)=>{
this.frontdata = res;
resolve(true);
})
})
}
} }
\ No newline at end of file
...@@ -365,7 +365,9 @@ const config = { ...@@ -365,7 +365,9 @@ const config = {
'/projectx/{projectId}/game/join.do': { '/projectx/{projectId}/game/join.do': {
data: './game/join.do.json' data: './game/join.do.json'
}, },
'/projectx/{projectId}/frontVariable.query': {
data: './game/frontVariable.json'
},
}; };
// for (let item in config) { // for (let item in config) {
......
{
"success": true,
"message": "",
"code": "",
"data": {
"balloon_url":"https://www.baidu.com/"
}
}
\ 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