Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
db-game-template
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
崔立强
db-game-template
Commits
4f83d660
Commit
4f83d660
authored
Sep 07, 2019
by
任建锋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--
parent
6a9041fb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
110 additions
and
0 deletions
+110
-0
HelpScene_20190904175936.ts
.history/egret/src/helpScene/HelpScene_20190904175936.ts
+108
-0
HelpScene.ts
egret/src/helpScene/HelpScene.ts
+2
-0
No files found.
.history/egret/src/helpScene/HelpScene_20190904175936.ts
0 → 100644
View file @
4f83d660
import
{
NetManager
}
from
'./../../libs/tw/manager/NetManager'
;
import
{
Buried
}
from
'./../../libs/tw/util/Buried'
;
import
Scene
from
"../views/Scene"
;
import
GameConst
from
"../GameConst"
;
import
TopLayerCtrl
from
'../ctrls/topLayerCtrl'
;
import
{
ModuleTypes
}
from
'../types/sceneTypes'
;
export
default
class
HelpScene
extends
Scene
{
public
get
skinKey
()
{
return
"Help"
}
public
get
groupName
()
{
return
"help_Scene"
}
public
helpBtn
:
eui
.
Button
;
public
shareTips
:
eui
.
Group
;
private
shareCode
:
string
;
onSkinComplete
()
{
super
.
onSkinComplete
();
this
[
"loop"
].
play
(
0
)
this
[
"loop"
].
items
.
forEach
((
item
)
=>
{
item
.
tween
.
loop
=
true
;
})
this
.
shareCode
=
GameConst
.
getQueryString
(
"shareCode"
);
// console.log(shareCode)
this
.
initBuired
();
this
.
shareTips
.
visible
=
false
;
}
exposure
=
[]
dpm
=
[]
dcm
=
[]
initBuired
()
{
Buried
.
init
();
this
.
dpm
[
"21"
]
=
Buried
.
connectDpm
(
110
,
21
,
1
);
this
.
dcm
[
"21"
]
=
Buried
.
connectDcm
(
202
,
0
,
0
);
this
.
exposure
[
"21"
]
=
Buried
.
createExposure
(
this
.
dpm
[
"21"
],
this
.
dcm
[
"21"
]);
NetManager
.
ins
.
showLog
(
this
.
exposure
[
"21"
]);
}
initEvents
()
{
super
.
initEvents
();
this
.
helpBtn
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_helpBtn
,
this
);
}
is_weixn_qq
(){
var
ua
=
navigator
.
userAgent
.
toLowerCase
();
if
(
ua
.
match
(
/MicroMessenger/i
))
{
return
"weixin"
;
}
else
if
(
ua
.
match
(
/mqqbrowser/i
))
{
return
false
;
}
else
if
(
ua
.
match
(
/QQ/i
))
{
return
"QQ"
;
}
else
if
(
ua
.
match
(
/dingtalk/i
))
{
return
"dingtalk"
;
}
else
if
(
ua
.
match
(
/WeiBo/i
))
{
return
"WeiBo"
;
}
else
if
(
ua
.
match
(
/youku/i
))
{
return
"youku"
;
}
return
false
;
}
onTap_helpBtn
()
{
NetManager
.
ins
.
clickLog
(
this
.
exposure
[
"21"
])
// window.location.href = `${window["shareUrl"]}&sharecode=${this.shareCode}`
if
(
this
.
is_weixn_qq
()){
//TopLayerCtrl.instance.show(ModuleTypes.TOAST_PANEL, { msg: "请复制当前网页在浏览器打开~" });
this
.
shareTips
.
visible
=
true
;
return
;
}
else
{
setTimeout
(()
=>
{
window
.
location
.
href
=
'http://t.shuqi.com/?#!/ac/in/ct/download'
;
},
1000
)
}
console
.
log
(
"this.shareCode"
)
console
.
log
(
this
.
shareCode
)
console
.
log
(
`
${
window
[
"shareUrl"
]}
&shareCode=
${
this
.
shareCode
}
`
)
if
(
GameConst
.
isIOS
())
{
console
.
log
(
"ios"
)
console
.
log
(
window
[
"shareUrl"
])
window
.
location
.
href
=
'shuqireader://internal?module=bookstore&action=openwebview&minver=2.5.0.0¶ms='
+
encodeURIComponent
(
JSON
.
stringify
({
url
:
`
${
window
[
"shareUrl"
]}
&shareCode=
${
this
.
shareCode
}
`
}));
}
else
{
console
.
log
(
"安卓"
)
console
.
log
(
window
[
"shareUrl"
])
window
.
location
.
href
=
'shuqi://openapp?params='
+
encodeURIComponent
(
JSON
.
stringify
({
pageName
:
'browser'
,
params
:
{
// pageTitle: '书旗叠小七',
targetUrl
:
`
${
window
[
"shareUrl"
]}
&shareCode=
${
this
.
shareCode
}
`
}
}));
}
}
removeEvents
()
{
super
.
removeEvents
();
this
.
helpBtn
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_helpBtn
,
this
);
}
}
\ No newline at end of file
egret/src/helpScene/HelpScene.ts
View file @
4f83d660
...
...
@@ -57,6 +57,8 @@ export default class HelpScene extends Scene {
return
"dingtalk"
;
}
else
if
(
ua
.
match
(
/WeiBo/i
))
{
return
"WeiBo"
;
}
else
if
(
ua
.
match
(
/youku/i
))
{
return
"youku"
;
}
return
false
;
}
...
...
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