Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xiaoxiaole
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
xiaoxiaole
Commits
d39c7d69
Commit
d39c7d69
authored
Aug 20, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
40d1e5c8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
9 deletions
+12
-9
index.html
egret/index.html
+1
-0
getSharePic.ts
egret/src/getSharePic.ts
+8
-6
getShowOffPic.ts
egret/src/getShowOffPic.ts
+3
-3
No files found.
egret/index.html
View file @
d39c7d69
...
...
@@ -59,6 +59,7 @@
return
b
;
}
</script>
<img
id=
"pic"
style=
"width:100%;position: absolute;z-index: 999"
src=
"https://yun.duiba.com.cn/db_games/activity/game/1565600901/resource/assets/startScene/startscenebg.jpg"
/>
<script
src=
"output.js"
></script>
</body>
...
...
egret/src/getSharePic.ts
View file @
d39c7d69
...
...
@@ -23,18 +23,20 @@ export default async (parent?: egret.DisplayObjectContainer) => {
return
getPrintScreenData
(
showoff
,
0
,
0
,
pic
.
textureWidth
,
pic
.
textureHeight
);
})
}
export
const
getShareUrl
=
async
(
parent
?:
egret
.
DisplayObjectContainer
)
=>
{
const
img
:
any
=
document
.
getElementById
(
'pic'
);
img
.
style
.
display
=
'none'
;
export
const
getShareUrl
=
async
(
parent
?:
egret
.
DisplayObjectContainer
)
=>
{
return
new
Promise
(
async
(
r
)
=>
{
const
pic
:
egret
.
Texture
=
await
RES
.
getResAsync
(
'share2_jpg'
);
const
showoff
=
new
Share
();
showoff
.
loadSkin
();
showoff
.
start
();
if
(
parent
)
parent
.
addChild
(
showoff
);
const
base64
=
getPrintScreenData
(
showoff
,
0
,
0
,
pic
.
textureWidth
,
p
ic
.
textur
eHeight
);
NetManager
.
ins
.
imgUrl
((
success
)
=>
{
const
base64
=
getPrintScreenData
(
showoff
,
0
,
0
,
pic
.
textureWidth
,
p
arent
.
stage
.
stag
eHeight
);
NetManager
.
ins
.
imgUrl
((
success
)
=>
{
const
data
=
DataManager
.
ins
.
getData
(
'imgURL'
);
r
(
data
)
},
base64
);
img
.
src
=
data
;
r
(
data
);
},
base64
);
})
}
\ No newline at end of file
egret/src/getShowOffPic.ts
View file @
d39c7d69
...
...
@@ -25,11 +25,11 @@ export default async (parent?: egret.DisplayObjectContainer) => {
showoff
.
loadSkin
();
showoff
.
start
();
if
(
parent
)
parent
.
addChild
(
showoff
);
const
base64
=
getPrintScreenData
(
showoff
,
0
,
0
,
pic
.
textureWidth
,
p
ic
.
textur
eHeight
);
NetManager
.
ins
.
imgUrl
((
success
)
=>
{
const
base64
=
getPrintScreenData
(
showoff
,
0
,
0
,
pic
.
textureWidth
,
p
arent
.
stage
.
stag
eHeight
);
NetManager
.
ins
.
imgUrl
((
success
)
=>
{
const
data
=
DataManager
.
ins
.
getData
(
'imgURL'
);
r
(
data
)
},
base64
)
},
base64
);
})
}
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