Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Y
yyh
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wildfirecode13
yyh
Commits
a2ff3fd5
Commit
a2ff3fd5
authored
Dec 09, 2019
by
wangzhujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
3333123
parent
8a03b90c
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
19 deletions
+58
-19
NetConst.ts
egret/src/NetConst.ts
+14
-10
PKScene.ts
egret/src/yazuwei/PKScene.ts
+27
-3
RecordMapScene.ts
egret/src/yazuwei/RecordMapScene.ts
+12
-1
config.js
mock/config.js
+5
-5
No files found.
egret/src/NetConst.ts
View file @
a2ff3fd5
...
@@ -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/accept
Invite
.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
,
...
...
egret/src/yazuwei/PKScene.ts
View file @
a2ff3fd5
...
@@ -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
egret/src/yazuwei/RecordMapScene.ts
View file @
a2ff3fd5
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
mock/config.js
View file @
a2ff3fd5
...
@@ -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'
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment