Commit 634fa5e8 authored by wildfirecode's avatar wildfirecode

1

parent 970c6cf0
...@@ -52,9 +52,9 @@ ...@@ -52,9 +52,9 @@
<script src="http://yun.duiba.com.cn/db_games/svga.egret.min.new.js"></script> <script src="http://yun.duiba.com.cn/db_games/svga.egret.min.new.js"></script>
<script> <script>
// window['pageID'] = 'TeamShareScene'; // window['pageID'] = 'TeamShareScene';
// window['pageID'] = 'JoinShareScene'; window['pageID'] = 'JoinShareScene';
// window['pageID'] = 'Share2Scene'; // window['pageID'] = 'Share2Scene';
window['pageID'] = 'TransScene'; // window['pageID'] = 'TransScene';
window['TransLink']=''; window['TransLink']='';
window['projectId'] = "1"; window['projectId'] = "1";
window['playwayId'] = "join_1"; window['playwayId'] = "join_1";
......
...@@ -191,16 +191,33 @@ export class yzwNet{ ...@@ -191,16 +191,33 @@ export class yzwNet{
}; };
NetManager.ins.send(net); NetManager.ins.send(net);
} }
/** // /**
* 1.10加入队伍 // * 1.10加入队伍
* @param callback 回调 // * @param callback 回调
*/ // */
public static acceptInvite(callback, projectId){ // public static acceptInvite(callback, projectId){
// let param: any = {
// }
// const net: INetData = {
// name: 'acceptInvite',
// uri: `/projectx/${projectId}/invite_1/accept.do`,
// type: 'get',
// dataType: 'json',
// hideMsg: true,
// param: param,
// callback: callback
// };
// NetManager.ins.send(net);
// }
public static joinPkTeam(callback, projectId,inviteCode){
let param: any = { let param: any = {
inviteCode:inviteCode
} }
const net: INetData = { const net: INetData = {
name: 'acceptInvite', name: 'joinPkTeam',
uri: `/projectx/${projectId}/invite_1/accept.do`, uri: `/projectx/${projectId}/invite_2/joinPkTeam.do`,
type: 'get', type: 'get',
dataType: 'json', dataType: 'json',
hideMsg: true, hideMsg: true,
......
...@@ -4,6 +4,9 @@ import Panel from "../views/Panel"; ...@@ -4,6 +4,9 @@ import Panel from "../views/Panel";
import PanelCtrl from "../ctrls/panelCtrl"; import PanelCtrl from "../ctrls/panelCtrl";
import { GCache } from "../../libs/tc/util/GCache"; import { GCache } from "../../libs/tc/util/GCache";
import GameConst from "../GameConst"; import GameConst from "../GameConst";
import { yzwNet } from "../NetConst";
import { DataManager } from "../../libs/tw/manager/DataManager";
import ToastCtrl from "../ctrls/toastCtrl";
export default class ConfirmPanel extends Panel { export default class ConfirmPanel extends Panel {
...@@ -26,5 +29,16 @@ export default class ConfirmPanel extends Panel { ...@@ -26,5 +29,16 @@ export default class ConfirmPanel extends Panel {
onTap_btn() { onTap_btn() {
console.log('onTap_btn'); console.log('onTap_btn');
yzwNet.joinPkTeam((success) => {
const data = DataManager.ins.getData('joinPkTeam');
if (success) {
ToastCtrl.instance.show('成功加入队伍')
} else {
if (data.code) {
ToastCtrl.instance.show('加入队伍失败');
}
}
},
window['projectId'], GameConst.getQueryString("joinTeamCode"));
} }
} }
\ No newline at end of file
import iswx from "../iswx";
import Scene from "../views/Scene"; import Scene from "../views/Scene";
import PanelCtrl from "../ctrls/panelCtrl";
import { ModuleTypes } from "../types/sceneTypes";
import GameConst from "../GameConst"; import GameConst from "../GameConst";
import iswx from "../iswx";
export default class JoinShareScene extends Scene { export default class JoinShareScene extends Scene {
protected get skinKey() { return 'JoinShare' } protected get skinKey() { return 'JoinShare' }
...@@ -24,13 +22,19 @@ export default class JoinShareScene extends Scene { ...@@ -24,13 +22,19 @@ export default class JoinShareScene extends Scene {
this['sharemask'].once(egret.TouchEvent.TOUCH_TAP, () => { this['sharemask'].once(egret.TouchEvent.TOUCH_TAP, () => {
this['sharemask'].visible = false; this['sharemask'].visible = false;
}, this); }, this);
} else { } else {
PanelCtrl.instance.show(ModuleTypes.ConfirmPanel); const url = `${window['indexUrl']}?joinTeamCode=${GameConst.getQueryString("shareCode")}`
deeplink(url);
// PanelCtrl.instance.show(ModuleTypes.ConfirmPanel);
} }
} }
initEvents() { initEvents() {
this.onTap(this['btn'], this.onTap_btn); this.onTap(this['btn'], this.onTap_btn);
} }
}
export const deeplink = (activeUrl) => {
window.location.href = 'esports://openapp?url=http://aghzact.zjkczn.com/h5/defaultActive.html?activeUrl=' + encodeURIComponent(activeUrl);
} }
\ No newline at end of file
...@@ -88,7 +88,7 @@ export default class ShareStarterScene extends Scene { ...@@ -88,7 +88,7 @@ export default class ShareStarterScene extends Scene {
title: '寻找2022个亚运梦想活动火热进行中', title: '寻找2022个亚运梦想活动火热进行中',
content: '快来为我的亚运梦想充能吧', content: '快来为我的亚运梦想充能吧',
imgUrl: 'https://yun.duiba.com.cn/db_games/yyhlogo2.png', imgUrl: 'https://yun.duiba.com.cn/db_games/yyhlogo2.png',
url: window['shareUrl'], type: '3' url: window['TransLink'], type: '3'
}); });
} catch (error) { } catch (error) {
......
...@@ -215,6 +215,10 @@ const config = { ...@@ -215,6 +215,10 @@ const config = {
'/projectx/1/invite_1/acceptInvite.do': { '/projectx/1/invite_1/acceptInvite.do': {
data: './yzw/acceptInvite.json' data: './yzw/acceptInvite.json'
}, },
//加入队伍
'/projectx/1/invite_2/joinPkTeam.do': {
data: './yzw/joinPkTeam.json'
},
//分享足迹 //分享足迹
'/projectx/1/join_1/shareFootprint.do': { '/projectx/1/join_1/shareFootprint.do': {
data: './yzw/shareFootprint.json' data: './yzw/shareFootprint.json'
......
{
"code":null,
"data":123456,
"message":null,
"success":true
}
\ 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