Commit c7305c45 authored by zhangjinzhou's avatar zhangjinzhou

任务调整

parent e4c72a67
...@@ -154,4 +154,5 @@ export enum NetName { ...@@ -154,4 +154,5 @@ export enum NetName {
GAMEGROUP_MARK, GAMEGROUP_MARK,
GAMEGROUP_PRIZE, GAMEGROUP_PRIZE,
frontVariable, frontVariable,
customInfo,
} }
...@@ -1627,6 +1627,24 @@ export class NetManager extends ABNetManager { ...@@ -1627,6 +1627,24 @@ export class NetManager extends ABNetManager {
}; };
this.send(net); this.send(net);
} }
/**
* 用户信息
* @param callback
*/
public customInfo(callback:Function){
const net: INetData = {
name: NetName.customInfo,
uri: '/projectx/{projectId}/join_5/customInfo.do',
type: 'get',
dataType: 'json',
param: {
},
callback: callback
};
this.send(net);
}
} }
// window['nt'] = NetManager.ins; // window['nt'] = NetManager.ins;
......
...@@ -112,6 +112,7 @@ class Main extends eui.UILayer { ...@@ -112,6 +112,7 @@ class Main extends eui.UILayer {
await Tools.getMedalData(); // 勋章数据 await Tools.getMedalData(); // 勋章数据
await Tools.gameGroupPrize(); // 游戏合集发奖 await Tools.gameGroupPrize(); // 游戏合集发奖
await Tools.gameFrontVariable();// await Tools.gameFrontVariable();//
await Tools.gameCustomInfo();
const areaPrice = await Tools.getAreaPrice(); const areaPrice = await Tools.getAreaPrice();
if (!areaPrice) { if (!areaPrice) {
......
...@@ -10,6 +10,7 @@ import ItemRenderer = eui.ItemRenderer; ...@@ -10,6 +10,7 @@ import ItemRenderer = eui.ItemRenderer;
import Image = eui.Image; import Image = eui.Image;
import Label = eui.Label; import Label = eui.Label;
import Group = eui.Group; import Group = eui.Group;
import { Tools } from "../Tools";
export default class TaskPanel extends Panel { export default class TaskPanel extends Panel {
public list: List; public list: List;
...@@ -145,8 +146,15 @@ class TaskItem extends ItemRenderer { ...@@ -145,8 +146,15 @@ class TaskItem extends ItemRenderer {
MainDispatcher.dispatchEvent('getTaskInfo'); MainDispatcher.dispatchEvent('getTaskInfo');
MainIns().mainUI.getPropInfo(); MainIns().mainUI.getPropInfo();
if (window['taskUi'][this.data.id].linkId) { if (window['taskUi'][this.data.id].linkId) {
console.error("任务点击1===》",window['taskUi'][this.data.id].linkId);
window['getActivityInfo'](window['taskUi'][this.data.id].linkId); window['getActivityInfo'](window['taskUi'][this.data.id].linkId);
} else { } else {
console.error("任务点击2===》",this.data.url || window['taskUi'][this.data.id].link,Tools.customInfo.data);
let signstr = Tools.customInfo.data.custid+""+15+""+this.data.id+""+Tools.customInfo.data.cisno;
let sign = window['duiba_md5'](signstr);
let jumplink = (this.data.url || window['taskUi'][this.data.id].link)+"&custid="+Tools.customInfo.data.custid+"&taskid="+this.data.id+"&durtime="+15+"&sign="+sign;
console.error("跳转检查===》",jumplink);
window.location.href = this.data.url || window['taskUi'][this.data.id].link; window.location.href = this.data.url || window['taskUi'][this.data.id].link;
} }
} }
......
...@@ -204,4 +204,14 @@ export class Tools { ...@@ -204,4 +204,14 @@ export class Tools {
}) })
} }
public static customInfo = null;
public static gameCustomInfo(){
return new Promise((resolve)=>{
NetManager.ins.customInfo((success,res)=>{
this.customInfo = res;
resolve(true);
})
})
}
} }
\ No newline at end of file
...@@ -368,6 +368,9 @@ const config = { ...@@ -368,6 +368,9 @@ const config = {
'/projectx/{projectId}/frontVariable.query': { '/projectx/{projectId}/frontVariable.query': {
data: './game/frontVariable.json' data: './game/frontVariable.json'
}, },
'/projectx/{projectId}/join_5/customInfo.do': {
data: './game/customInfo.json'
},
}; };
// for (let item in config) { // for (let item in config) {
......
{
"success": true,
"message": "",
"code": "",
"data": {
"mobile":"121",
"custid":"121",
"cisno":"121"
}
}
\ 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