Commit d39c7d69 authored by wildfirecode's avatar wildfirecode

1

parent 40d1e5c8
......@@ -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>
......
......@@ -23,7 +23,8 @@ export default async (parent?: egret.DisplayObjectContainer) => {
return getPrintScreenData(showoff, 0, 0, pic.textureWidth, pic.textureHeight);
})
}
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');
......@@ -31,10 +32,11 @@ export const getShareUrl = async (parent?: egret.DisplayObjectContainer) => {
showoff.loadSkin();
showoff.start();
if (parent) parent.addChild(showoff);
const base64 = getPrintScreenData(showoff, 0, 0, pic.textureWidth, pic.textureHeight);
NetManager.ins.imgUrl((success)=>{
const base64 = getPrintScreenData(showoff, 0, 0, pic.textureWidth, parent.stage.stageHeight);
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
......@@ -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, pic.textureHeight);
NetManager.ins.imgUrl((success)=>{
const base64 = getPrintScreenData(showoff, 0, 0, pic.textureWidth, parent.stage.stageHeight);
NetManager.ins.imgUrl((success) => {
const data = DataManager.ins.getData('imgURL');
r(data)
},base64)
}, base64);
})
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment