Commit a2ff3fd5 authored by wangzhujun's avatar wangzhujun

3333123

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