Commit e32a30b9 authored by wjf's avatar wjf

l

parents 264dd604 983aa8d0
......@@ -16,7 +16,7 @@ export default class NoPrizePanel extends Panel {
this._level = parseInt(data.level + '');
this['shareBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
NetManager.ins.clickLog(getlogItem(16));
showShare()
showShare(2)
}, this);
this.showlog();
NetManager.ins.hc_home(() => { }, window['collectRuleId']);
......
......@@ -26,7 +26,7 @@ export default class PrizePanel extends Panel {
this['shareBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
NetManager.ins.clickLog(getlogItem(15));
showShare();
showShare(2);
}, this);
this['goBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
this.hidePanel();
......
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"preload","version":5,"files":["..\\assets\\common\\prizePanelbg.png"]}
\ No newline at end of file
<<<<<<< HEAD
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"preload","version":5,"files":["..\\assets\\common\\prizePanelbg.png"]}
=======
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"preload","version":5,"files":["../assets/common/prizePanelbg.png"]}
>>>>>>> 983aa8d0e137ab6ac947ff8d15f79d5e2a402b74
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"prize","version":5,"files":["..\\assets\\prize\\PrizePanelX.png","..\\assets\\prize\\prizePanelUseBtn.png","..\\assets\\prize\\点亮.png","..\\assets\\prize\\点亮 副本 2.png"]}
\ No newline at end of file
<<<<<<< HEAD
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"prize","version":5,"files":["..\\assets\\prize\\PrizePanelX.png","..\\assets\\prize\\prizePanelUseBtn.png","..\\assets\\prize\\点亮.png","..\\assets\\prize\\点亮 副本 2.png"]}
=======
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"prize","version":5,"files":["../assets/prize/PrizePanelX.png","../assets/prize/prizePanelUseBtn.png","../assets/prize/点亮.png","../assets/prize/点亮 副本 2.png"]}
>>>>>>> 983aa8d0e137ab6ac947ff8d15f79d5e2a402b74
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"prize2","version":5,"files":["..\\assets\\prize2\\prize2_icon.png"]}
\ No newline at end of file
<<<<<<< HEAD
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"prize2","version":5,"files":["..\\assets\\prize2\\prize2_icon.png"]}
=======
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"prize2","version":5,"files":["../assets/prize2/prize2_icon.png"]}
>>>>>>> 983aa8d0e137ab6ac947ff8d15f79d5e2a402b74
......@@ -75,10 +75,6 @@
{
"keys": "prize2_icon_png",
"name": "prize2"
},
{
"name": "preload",
"keys": "prizePanelbg_png"
}
],
"resources": [
......@@ -1518,9 +1514,9 @@
"name": "prize2_icon_png"
},
{
"name": "prizePanelbg_png",
"url": "assets/common/prizePanelbg.png",
"type": "image",
"url": "assets/common/prizePanelbg.png"
"name": "prizePanelbg_png"
}
]
}
\ No newline at end of file
......@@ -29,6 +29,6 @@
<e:Image id="pic1" source="点亮 副本 2_png" x="142" y="191"/>
<e:Image id="pic3" source="点亮 副本 2_png" x="608" y="191" scaleX="-1"/>
<e:Image id="pic2" source="点亮_png" y="142" horizontalCenter="0"/>
<e:Label id="tips" text="X30" y="637" x="497" size="46" textColor="0xb7592a"/>
<e:Image source="prize2_icon_png" y="518.53" horizontalCenter="0.5"/>
<e:Label id="tips" text="X30" y="637" x="481.85" size="46" textColor="0xb7592a"/>
<e:Image source="prize2_icon_png" y="518.53" horizontalCenter="-26.5"/>
</e:Skin>
\ No newline at end of file
......@@ -2,9 +2,14 @@
<e:Skin class="Share2Skin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<w:Config id="16cd6d4c8ff"/>
<e:Rect width="750" height="1624" fillAlpha="0.7"/>
<e:Group id="pic" x="86" y="46">
<e:Group id="pic1" x="86" y="46" visible="false">
<e:Image source="share3_jpg" y="0" x="0"/>
<e:Label id="lvTxt" text="22" x="247.65" y="719.82" size="16" anchorOffsetX="0" width="61.33" textAlign="center" verticalAlign="middle" textColor="0xEA2917"/>
<e:Label id="lvTxt" text="188" x="247.65" y="719.82" size="14" anchorOffsetX="0" width="61.33" textAlign="center" verticalAlign="middle" textColor="0xEA2917"/>
</e:Group>
<e:Group id="pic2" y="15" horizontalCenter="0" visible="false">
<e:Image source="showoff_jpg" x="0" y="0" height="931" width="579"/>
<e:Label id="lvTxt0" text="888" x="146.97" y="208.25" anchorOffsetX="0" width="179" anchorOffsetY="0" bold="true" textColor="0xEC1F09" textAlign="center" verticalAlign="middle" size="106"/>
<e:Label id="tipsTxt0" text="超过了60%的好友" y="324.22" anchorOffsetX="0" anchorOffsetY="0" textColor="0xEC1F09" textAlign="center" verticalAlign="middle" size="29" horizontalCenter="0"/>
</e:Group>
<e:Image source="朋友圈中间分享蒙层1_jpg" y="899.88" horizontalCenter="0"/>
<e:Group y="965.88" horizontalCenter="0">
......
......@@ -52,7 +52,7 @@ this['price1Txt'].text = window['price1']
}
onTapInvite() {
showShare();
showShare(1);
NetManager.ins.clickLog(getlogItem(4));
const data = getHomeData();
if (data.askForEnergy) {
......
......@@ -19,7 +19,7 @@ export default class Prize2Panel extends Panel {
this['tips'].text = `X${submitdata.prizeResponse.changeMoney}`;
this['shareBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
NetManager.ins.clickLog(getlogItem(15));
showShare();
showShare(2);
}, this);
this['goBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
......
......@@ -10,6 +10,13 @@ const img: any = document.getElementById('pic');
img.style.display = 'none';
class Share2 extends ComponentBase {
type;
setType(type: any) {
this.type=type;
this['pic1'].visible=false;
this['pic2'].visible=false;
this['pic'+type].visible=true;
}
start() {
const data = getHomeData();
this['lvTxt'].text = data.levels.length;
......@@ -34,10 +41,11 @@ class Share2 extends ComponentBase {
}
//channel 1 好友 2 朋友圈
getFunc(type: string) {
const base64 = getPrintScreenData(this['pic'], 0, 0, 579, 866);
const base64 = getPrintScreenData(this['pic'+this.type], 0, 0, 579, 866);
NetManager.ins.imgUrl((success) => {
const data = DataManager.ins.getData('imgURL');
img.src = data.data;
img.src = base64;
// img.src = data.data;
callShareApi(data.data, type);
}, base64);
}
......@@ -47,18 +55,21 @@ class Share2 extends ComponentBase {
}
}
let inited = false;
let _share:Share2;
const initShare = () => {
const layer = layers.shareLayer;
const share = new Share2();
share.loadSkin();
share.start();
layer.addChild(share);
_share=share;
};
export const showShare = () => {
export const showShare = (type) => {
if (!inited) {
initShare();
inited = true;
}
_share.setType(type);
layers.shareLayer.visible = true;
}
......
......@@ -7,7 +7,7 @@
"prizeType":2,
"prizeResponse":{
"errorCode":null,
"changeMoney":30,
"changeMoney":90,
"balanceAmount":30,
"errorMsg":null,
"success":true
......
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