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
911b16ee
Commit
911b16ee
authored
Dec 11, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
311b914f
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
54 additions
and
19 deletions
+54
-19
index.html
egret/index.html
+2
-1
Main.ts
egret/src/Main.ts
+3
-0
JoinShareScene.ts
egret/src/yazuwei/JoinShareScene.ts
+20
-0
Share2Scene.ts
egret/src/yazuwei/Share2Scene.ts
+12
-4
ShareStarterScene.ts
egret/src/yazuwei/ShareStarterScene.ts
+1
-1
TransScene.ts
egret/src/yazuwei/TransScene.ts
+16
-13
No files found.
egret/index.html
View file @
911b16ee
...
...
@@ -53,7 +53,8 @@
<script>
// window['pageID'] = 'TeamShareScene';
// window['pageID'] = 'JoinShareScene';
// window['pageID'] = 'TransScene';
window
[
'pageID'
]
=
'TransScene'
;
// window['pageID'] = 'Share2Scene';
window
[
'TransLink'
]
=
''
;
window
[
'projectId'
]
=
"1"
;
window
[
'playwayId'
]
=
"join_1"
;
...
...
egret/src/Main.ts
View file @
911b16ee
...
...
@@ -183,6 +183,9 @@ class Main extends MainBase {
// }
Waiting
.
instance
.
hide
();
if
(
window
[
'pageID'
]
==
'Share2Scene'
)
{
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
Share2Scene
);
}
if
(
window
[
'pageID'
]
==
'JoinShareScene'
)
{
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
JoinShareScene
);
}
...
...
egret/src/yazuwei/JoinShareScene.ts
View file @
911b16ee
...
...
@@ -42,5 +42,25 @@ export default class JoinShareScene extends Scene {
export
const
deeplink
=
(
activeUrl
)
=>
{
let
state
=
false
;
window
.
location
.
href
=
'esports://openapp?url=http://aghzact.zjkczn.com/h5/defaultActive.html?activeUrl='
+
encodeURIComponent
(
activeUrl
);
state
=
true
;
let
timer
=
setTimeout
(()
=>
{
state
=
false
;
window
.
location
.
href
=
'http://a.app.qq.com/o/simple.jsp?pkgname=com.fan.asiangameshz'
;
},
3000
);
// 唤端成功清除定时器
document
.
addEventListener
(
'visibilitychange'
,
function
()
{
if
(
document
.
visibilityState
===
'hidden'
)
{
if
(
state
)
{
if
(
timer
)
{
clearTimeout
(
timer
)
timer
=
null
;
}
state
=
false
;
}
}
});
}
\ No newline at end of file
egret/src/yazuwei/Share2Scene.ts
View file @
911b16ee
import
Scene
from
"../views/Scene"
;
import
iswx
from
"../iswx"
;
import
GameConst
from
"../GameConst"
;
import
{
deeplink
}
from
"./JoinShareScene"
;
export
default
class
Share2Scene
extends
Scene
{
protected
get
skinKey
()
{
return
'Share2'
}
...
...
@@ -15,10 +18,15 @@ export default class Share2Scene extends Scene {
}
onTap_btn
()
{
if
(
iswx
())
{
this
[
'sharemask'
].
visible
=
true
;
this
[
'sharemask'
].
once
(
egret
.
TouchEvent
.
TOUCH_TAP
,()
=>
{
this
[
'sharemask'
].
once
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
this
[
'sharemask'
].
visible
=
false
;
},
this
);
},
this
);
}
else
{
const
url
=
`
${
window
[
'TransLink'
]}
?shareCode=
${
GameConst
.
getQueryString
(
"shareCode"
)}
`
deeplink
(
url
);
}
}
initEvents
()
{
...
...
egret/src/yazuwei/ShareStarterScene.ts
View file @
911b16ee
...
...
@@ -94,7 +94,7 @@ export default class ShareStarterScene extends Scene {
title
:
'寻找2022个亚运梦想活动火热进行中'
,
content
:
'快来为我的亚运梦想充能吧'
,
imgUrl
:
'https://yun.duiba.com.cn/db_games/yyhlogo2.png'
,
url
:
window
[
'
Trans
Link'
]
+
'?shareCode='
+
sharecode
,
type
:
'3'
url
:
window
[
'
share
Link'
]
+
'?shareCode='
+
sharecode
,
type
:
'3'
});
}
catch
(
error
)
{
...
...
egret/src/yazuwei/TransScene.ts
View file @
911b16ee
...
...
@@ -21,6 +21,16 @@ export default class TransScene extends Scene {
constructor
(
data
)
{
super
();
yzwNet
.
accept
((
success
)
=>
{
if
(
success
)
{
}
else
{
location
.
href
=
window
[
'indexUrl'
];
}
},
window
[
'projectId'
],
GameConst
.
getQueryString
(
"shareCode"
));
this
.
initUI
(
data
);
GCache
.
writeCache
(
"isGuide2"
,
true
);
GCache
.
writeCache
(
"isGuide"
,
true
);
...
...
@@ -139,13 +149,6 @@ export default class TransScene extends Scene {
}
onTap_btn
()
{
if
(
iswx
())
{
this
[
'sharemask'
].
visible
=
true
;
this
[
'sharemask'
].
once
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
this
[
'sharemask'
].
visible
=
false
;
},
this
);
return
;
}
this
[
'title'
].
visible
=
false
;
...
...
@@ -156,15 +159,15 @@ export default class TransScene extends Scene {
panel
.
once
(
'onDestroy'
,
()
=>
{
this
[
'shareTips'
].
visible
=
true
;
//进入页面后发送确认消息
yzwNet
.
accept
((
success
)
=>
{
if
(
success
)
{
//
yzwNet.accept((success) => {
//
if (success) {
yzwNet
.
openPass
(()
=>
{
this
.
addShareEvent
();
},
window
[
'projectId'
],
GameConst
.
getQueryString
(
"shareCode"
))
}
else
{
location
.
href
=
window
[
'indexUrl'
];
}
},
window
[
'projectId'
],
GameConst
.
getQueryString
(
"shareCode"
));
//
} else {
//
location.href = window['indexUrl'];
//
}
//
}, window['projectId'], GameConst.getQueryString("shareCode"));
setTimeout
(()
=>
{
this
.
onshake
();
...
...
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