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
634fa5e8
Commit
634fa5e8
authored
Dec 10, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
970c6cf0
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
60 additions
and
15 deletions
+60
-15
index.html
egret/index.html
+2
-2
NetConst.ts
egret/src/NetConst.ts
+24
-7
ConfirmPanel.ts
egret/src/yazuwei/ConfirmPanel.ts
+14
-0
JoinShareScene.ts
egret/src/yazuwei/JoinShareScene.ts
+9
-5
ShareStarterScene.ts
egret/src/yazuwei/ShareStarterScene.ts
+1
-1
config.js
mock/config.js
+4
-0
joinPkTeam.json
mock/yzw/joinPkTeam.json
+6
-0
No files found.
egret/index.html
View file @
634fa5e8
...
...
@@ -52,9 +52,9 @@
<script
src=
"http://yun.duiba.com.cn/db_games/svga.egret.min.new.js"
></script>
<script>
// window['pageID'] = 'TeamShareScene';
//
window['pageID'] = 'JoinShareScene';
window
[
'pageID'
]
=
'JoinShareScene'
;
// window['pageID'] = 'Share2Scene';
window
[
'pageID'
]
=
'TransScene'
;
//
window['pageID'] = 'TransScene';
window
[
'TransLink'
]
=
''
;
window
[
'projectId'
]
=
"1"
;
window
[
'playwayId'
]
=
"join_1"
;
...
...
egret/src/NetConst.ts
View file @
634fa5e8
...
...
@@ -191,16 +191,33 @@ export class yzwNet{
};
NetManager
.
ins
.
send
(
net
);
}
/**
* 1.10加入队伍
* @param callback 回调
*/
public
static
acceptInvite
(
callback
,
projectId
){
// /**
// * 1.10加入队伍
// * @param callback 回调
// */
// 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
=
{
inviteCode
:
inviteCode
}
const
net
:
INetData
=
{
name
:
'
acceptInvite
'
,
uri
:
`/projectx/
${
projectId
}
/invite_
1/accept
.do`
,
name
:
'
joinPkTeam
'
,
uri
:
`/projectx/
${
projectId
}
/invite_
2/joinPkTeam
.do`
,
type
:
'get'
,
dataType
:
'json'
,
hideMsg
:
true
,
...
...
egret/src/yazuwei/ConfirmPanel.ts
View file @
634fa5e8
...
...
@@ -4,6 +4,9 @@ import Panel from "../views/Panel";
import
PanelCtrl
from
"../ctrls/panelCtrl"
;
import
{
GCache
}
from
"../../libs/tc/util/GCache"
;
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
{
...
...
@@ -26,5 +29,16 @@ export default class ConfirmPanel extends Panel {
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
egret/src/yazuwei/JoinShareScene.ts
View file @
634fa5e8
import
iswx
from
"../iswx"
;
import
Scene
from
"../views/Scene"
;
import
PanelCtrl
from
"../ctrls/panelCtrl"
;
import
{
ModuleTypes
}
from
"../types/sceneTypes"
;
import
GameConst
from
"../GameConst"
;
import
iswx
from
"../iswx"
;
export
default
class
JoinShareScene
extends
Scene
{
protected
get
skinKey
()
{
return
'JoinShare'
}
...
...
@@ -24,9 +22,10 @@ export default class JoinShareScene extends Scene {
this
[
'sharemask'
].
once
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
this
[
'sharemask'
].
visible
=
false
;
},
this
);
}
else
{
PanelCtrl
.
instance
.
show
(
ModuleTypes
.
ConfirmPanel
);
const
url
=
`
${
window
[
'indexUrl'
]}
?joinTeamCode=
${
GameConst
.
getQueryString
(
"shareCode"
)}
`
deeplink
(
url
);
// PanelCtrl.instance.show(ModuleTypes.ConfirmPanel);
}
}
...
...
@@ -34,3 +33,8 @@ export default class JoinShareScene extends Scene {
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
egret/src/yazuwei/ShareStarterScene.ts
View file @
634fa5e8
...
...
@@ -88,7 +88,7 @@ export default class ShareStarterScene extends Scene {
title
:
'寻找2022个亚运梦想活动火热进行中'
,
content
:
'快来为我的亚运梦想充能吧'
,
imgUrl
:
'https://yun.duiba.com.cn/db_games/yyhlogo2.png'
,
url
:
window
[
'
shareUrl
'
],
type
:
'3'
url
:
window
[
'
TransLink
'
],
type
:
'3'
});
}
catch
(
error
)
{
...
...
mock/config.js
View file @
634fa5e8
...
...
@@ -215,6 +215,10 @@ const config = {
'/projectx/1/invite_1/acceptInvite.do'
:
{
data
:
'./yzw/acceptInvite.json'
},
//加入队伍
'/projectx/1/invite_2/joinPkTeam.do'
:
{
data
:
'./yzw/joinPkTeam.json'
},
//分享足迹
'/projectx/1/join_1/shareFootprint.do'
:
{
data
:
'./yzw/shareFootprint.json'
...
...
mock/yzw/joinPkTeam.json
0 → 100644
View file @
634fa5e8
{
"code"
:
null
,
"data"
:
123456
,
"message"
:
null
,
"success"
:
true
}
\ No newline at end of file
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