Commit 7dbf98a1 authored by wildfirecode's avatar wildfirecode

1

parent 03d04ea9
......@@ -6,6 +6,7 @@ import SceneCtrl from "../ctrls/sceneCtrl";
import { ModuleTypes } from "../types/sceneTypes";
import { createData } from "../../../src/startScene/StartScene";
import { DataManager } from "../../tw/manager/DataManager";
import getShowOffPic from "../../../src/getShowOffPic";
export default class NoPrizePanel extends Panel {
_level;
start(data) {
......@@ -14,7 +15,7 @@ export default class NoPrizePanel extends Panel {
this._level = parseInt(data.level + '');
this['shareBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
NetManager.ins.clickLog(getlogItem(16));
getShowOffPic(this.stage);
}, this);
this.showlog();
NetManager.ins.hc_home(() => { }, window['collectRuleId']);
......
......@@ -5,6 +5,8 @@ import { NetManager } from "../../tw/manager/NetManager";
import SceneCtrl from "../ctrls/sceneCtrl";
import { ModuleTypes } from "../types/sceneTypes";
import Panel from "./Panel";
import { callShareApi } from "../../../src/shareCtrl";
import getShowOffPic from "../../../src/getShowOffPic";
export default class PrizePanel extends Panel {
_level;
start(data) {
......@@ -24,7 +26,7 @@ export default class PrizePanel extends Panel {
this['shareBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
NetManager.ins.clickLog(getlogItem(15));
getShowOffPic(this.stage);
}, this);
this['goBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
this.hidePanel();
......
......@@ -2,6 +2,8 @@ import ComponentBase from "../libs/new_wx/components/ComponentBase";
import getHomeData from "./getHomeData";
import { NetManager } from "../libs/tw/manager/NetManager";
import { DataManager } from "../libs/tw/manager/DataManager";
import { iswx } from "./iswx";
import { callShareApi } from "./shareCtrl";
class ShowOff extends ComponentBase {
start() {
......@@ -18,18 +20,21 @@ export const getPrintScreenData = (scene, startX, startY, width, height) => {
const imageData = renderTexture.toDataURL("image/jpg");
return imageData;
}
export default async (parent?: egret.DisplayObjectContainer) => {
return new Promise(async (r) => {
const pic: egret.Texture = await RES.getResAsync('showoff_jpg');
const showoff = new ShowOff();
showoff.loadSkin();
showoff.start();
if (parent) parent.addChild(showoff);
const base64 = getPrintScreenData(showoff, 0, 0, pic.textureWidth, parent.stage.stageHeight);
NetManager.ins.imgUrl((success) => {
const data = DataManager.ins.getData('imgURL');
r(data.data)
}, base64);
})
export default async (stage, parent?: egret.DisplayObjectContainer, ) => {
// return new Promise(async (r) => {
const pic: egret.Texture = await RES.getResAsync('showoff_jpg');
const showoff = new ShowOff();
showoff.loadSkin();
showoff.start();
if (parent) parent.addChild(showoff);
const base64 = getPrintScreenData(showoff, 0, 0, pic.textureWidth, stage.stageHeight);
NetManager.ins.imgUrl((success) => {
const data = DataManager.ins.getData('imgURL');
// r(data.data);
if (!iswx()) {
callShareApi(data.data, 1);
}
}, base64);
// })
}
......@@ -12,6 +12,7 @@ import { playBg, toggleBg, toggleSound } from "../soundCtrl";
import MapBottomPart from "./MapBottomPart";
import MapRpeatPart from "./MapRpeatPart";
import MapTopPart from "./MapTopPart";
import getShowOffPic from "../getShowOffPic";
export default class MapScene extends Scene {
scrollGroup: eui.Group;
......@@ -24,6 +25,10 @@ export default class MapScene extends Scene {
_data;
async start(data?) {
super.start();
// setTimeout(() => {
// getShowOffPic(this.stage,this)
// }, 3000);
this._data = data;
//滚动的背景变黑
this['rectbg'].height = this.stage.stageHeight;
......
......@@ -5,6 +5,7 @@ import { getlogItem } from "../Main";
import SceneCtrl from "../../libs/new_wx/ctrls/sceneCtrl";
import { ModuleTypes } from "../../libs/new_wx/types/sceneTypes";
import setGray from "../setGray";
import getShowOffPic from "../getShowOffPic";
export default class Prize2Panel extends Panel {
_level;
......@@ -19,7 +20,7 @@ export default class Prize2Panel extends Panel {
this['tips'].text = `本次获得元宝:${submitdata.prizeResponse.changeMoney}`;
this['shareBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
NetManager.ins.clickLog(getlogItem(15));
getShowOffPic(this.stage);
}, this);
this['goBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
......
......@@ -11,15 +11,15 @@
"remainProp": [
{
"type": 2,
"num": 1
"num": 0
},
{
"type": 3,
"num": 8
"num": 0
},
{
"type": 4,
"num": 10
"num": 0
}
],
"remainEnargy": 9979,
......
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