Commit a2ff3fd5 authored by wangzhujun's avatar wangzhujun

3333123

parent 8a03b90c
...@@ -65,7 +65,7 @@ export class yzwNet{ ...@@ -65,7 +65,7 @@ export class yzwNet{
* 1.3轮询被邀请人的动画状态 * 1.3轮询被邀请人的动画状态
* @param callback 回调 * @param callback 回调
*/ */
public static pollingAnimationState(callback, projectId){ public static pollingAnimationState(callback, projectId,shareCode){
const net: INetData = { const net: INetData = {
name: 'pollingAnimationState', name: 'pollingAnimationState',
uri: `/projectx/${projectId}/invite_2/pollingAnimationState.do`, uri: `/projectx/${projectId}/invite_2/pollingAnimationState.do`,
...@@ -73,6 +73,7 @@ export class yzwNet{ ...@@ -73,6 +73,7 @@ export class yzwNet{
dataType: 'json', dataType: 'json',
hideMsg: true, hideMsg: true,
param: { param: {
shareCode:shareCode
}, },
callback: callback callback: callback
}; };
...@@ -101,8 +102,10 @@ export class yzwNet{ ...@@ -101,8 +102,10 @@ export class yzwNet{
* 1.5被邀请人更改动画状态 * 1.5被邀请人更改动画状态
* @param callback 回调 * @param callback 回调
*/ */
public static updateAnimationState(callback, projectId){ public static updateAnimationState(callback, projectId,shareCode,state){
let param: any = { let param: any = {
shareCode:shareCode,
state:state
} }
const net: INetData = { const net: INetData = {
name: 'updateAnimationState', name: 'updateAnimationState',
...@@ -116,15 +119,15 @@ export class yzwNet{ ...@@ -116,15 +119,15 @@ export class yzwNet{
NetManager.ins.send(net); NetManager.ins.send(net);
} }
/** /**
* 1.6生成队伍 * 1.6邀请码
* @param callback 回调 * @param callback 回调
*/ */
public static createTeam(callback, projectId){ public static genInvite(callback, projectId){
let param: any = { let param: any = {
} }
const net: INetData = { const net: INetData = {
name: 'createTeam', name: 'genInvite',
uri: `/projectx/${projectId}/invite_1/createTeam.do`, uri: `/projectx/${projectId}/invite_2/genInvite.do`,
type: 'get', type: 'get',
dataType: 'json', dataType: 'json',
hideMsg: true, hideMsg: true,
...@@ -143,7 +146,7 @@ export class yzwNet{ ...@@ -143,7 +146,7 @@ export class yzwNet{
} }
const net: INetData = { const net: INetData = {
name: 'rankInfo', name: 'rankInfo',
uri: `/projectx/${projectId}/join_2/join.do`, uri: `/projectx/${projectId}/join_1/passRankList.do`,
type: 'get', type: 'get',
dataType: 'json', dataType: 'json',
hideMsg: true, hideMsg: true,
...@@ -174,8 +177,9 @@ export class yzwNet{ ...@@ -174,8 +177,9 @@ export class yzwNet{
* 1.9参与火炬传递(是否开启动画) * 1.9参与火炬传递(是否开启动画)
* @param callback 回调 * @param callback 回调
*/ */
public static accept(callback, projectId){ public static accept(callback, projectId,inviteCode){
let param: any = { let param: any = {
inviteCode:inviteCode
} }
const net: INetData = { const net: INetData = {
name: 'accept', name: 'accept',
...@@ -197,7 +201,7 @@ export class yzwNet{ ...@@ -197,7 +201,7 @@ export class yzwNet{
} }
const net: INetData = { const net: INetData = {
name: 'acceptInvite', name: 'acceptInvite',
uri: `/projectx/${projectId}/invite_1/acceptInvite.do`, uri: `/projectx/${projectId}/invite_1/accept.do`,
type: 'get', type: 'get',
dataType: 'json', dataType: 'json',
hideMsg: true, hideMsg: true,
...@@ -234,7 +238,7 @@ export class yzwNet{ ...@@ -234,7 +238,7 @@ export class yzwNet{
} }
const net: INetData = { const net: INetData = {
name: 'getPassingRecords', name: 'getPassingRecords',
uri: `/projectx/${projectId}/join_2/getPassingRecords.do`, uri: `/projectx/${projectId}/invite_2/passRecord.do`,
type: 'get', type: 'get',
dataType: 'json', dataType: 'json',
hideMsg: true, hideMsg: true,
......
...@@ -174,12 +174,36 @@ export default class PKScene extends Scene{ ...@@ -174,12 +174,36 @@ export default class PKScene extends Scene{
} }
addTeam(){ addTeam(){
window['share'](); yzwNet.genInvite((s)=>{
if(!s){
ToastCtrl.instance.show("网络异常请重试~")
return
}
let data = DataManager.ins.getData('genInvite').data;
window['share'](data);
},window['projectId'])
// window['share']();
} }
askTeam(){ askTeam(){
window['share'](); yzwNet.genInvite((s)=>{
if(!s){
ToastCtrl.instance.show("网络异常请重试~")
return
}
let data = DataManager.ins.getData('genInvite').data;
window['share'](data);
},window['projectId'])
// window['share']();
} }
askOnline(){ askOnline(){
window['share'](); yzwNet.genInvite((s)=>{
if(!s){
ToastCtrl.instance.show("网络异常请重试~")
return
}
let data = DataManager.ins.getData('genInvite').data;
window['share'](data);
},window['projectId'])
// window['share']();
} }
} }
\ No newline at end of file
import Scene from "../views/Scene"; import Scene from "../views/Scene";
import { yzwNet } from "../NetConst";
import ToastCtrl from "../ctrls/toastCtrl";
export default class RecordMapScene extends Scene{ export default class RecordMapScene extends Scene{
protected get skinKey(){return 'RecordMap'} protected get skinKey(){return 'RecordMap'}
...@@ -48,7 +50,16 @@ export default class RecordMapScene extends Scene{ ...@@ -48,7 +50,16 @@ export default class RecordMapScene extends Scene{
} }
sharePic(){ sharePic(){
const arr = ["HZ","AM","XG","TB","RB","HG","CX","MG"];
yzwNet.shareFootprint((s)=>{
if(!s){
ToastCtrl.instance.show("网络异常请重新分享~")
return
}
// ToastCtrl.instance.show()
window['shareImg'](this.level); window['shareImg'](this.level);
},window['projectId'],arr[this.level-1])
} }
} }
\ No newline at end of file
...@@ -196,11 +196,11 @@ const config = { ...@@ -196,11 +196,11 @@ const config = {
data: './yzw/updateAnimationState.json' data: './yzw/updateAnimationState.json'
}, },
//生成队伍 //生成队伍
'/projectx/1/invite_1/createTeam.do': { '/projectx/1/invite_2/genInvite.do': {
data: './yzw/createTeam.json' data: './yzw/genInvite.json'
}, },
//排行榜 //排行榜
'/projectx/1/join_2/join.do': { '/projectx/1/join_1/passRankList.do': {
data: './yzw/rankInfo.json' data: './yzw/rankInfo.json'
}, },
//开启传递 //开启传递
...@@ -220,8 +220,8 @@ const config = { ...@@ -220,8 +220,8 @@ const config = {
data: './yzw/shareFootprint.json' data: './yzw/shareFootprint.json'
}, },
//传递记录 //传递记录
'/projectx/1/join_2/getPassingRecords.do': { '/projectx/1/invite_2/passRecord.do': {
data: './yzw/getPassingRecords.json' data: './yzw/passRecord.json'
}, },
//pk基础信息 //pk基础信息
'/projectx/1/invite_2/getPkBaseInfo.do': { '/projectx/1/invite_2/getPkBaseInfo.do': {
......
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