Commit f8186d2e authored by wildfirecode's avatar wildfirecode

1

parent bafe6b43
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
<e:Skin class="Share2Skin" width="750" height="1624" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing"> <e:Skin class="Share2Skin" width="750" height="1624" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<w:Config id="16cd6d4c8ff"/> <w:Config id="16cd6d4c8ff"/>
<e:Rect width="750" height="1624" fillAlpha="0.7"/> <e:Rect width="750" height="1624" fillAlpha="0.7"/>
<e:Group id="pic" x="86" y="46"> <e:Group id="pic" x="86" y="46" width="600" height="963">
<e:Group y="0" x="0"> <e:Group y="0" x="0">
<e:Image x="0" y="0" source="sharefriend_jpg" scaleX="0.8" scaleY="0.8"/> <e:Image x="0" y="0" source="sharefriend_jpg" scaleX="0.8" scaleY="0.8"/>
<e:Label id="lvTxt1" text="120" y="286.58" anchorOffsetX="0" anchorOffsetY="0" bold="true" textAlign="center" verticalAlign="middle" size="90" textColor="0xb14d00" horizontalCenter="0" visible="false"/> <e:Label id="lvTxt1" text="120" y="286.58" anchorOffsetX="0" anchorOffsetY="0" bold="true" textAlign="center" verticalAlign="middle" size="90" textColor="0xb14d00" horizontalCenter="0" visible="false"/>
<e:BitmapLabel rotation="5" id="lvTxt" y="372.86" text="123456" font="sharenums_fnt" horizontalCenter="103.5" scaleX="0.8" scaleY="0.8"/> <e:BitmapLabel rotation="5" id="lvTxt" y="371.34" text="123" font="sharenums_fnt" horizontalCenter="103.5" scaleX="0.8" scaleY="0.8"/>
</e:Group> </e:Group>
<e:Group x="236.86" y="44.78"> <e:Group x="236.86" y="44.78">
<e:Image id="avatar" y="44.85" width="130" height="130" x="-7.82" source=""/> <e:Image id="avatar" y="44.85" width="130" height="130" x="-7.82" source=""/>
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
<e:Label id="nameTxt" text="打发顺丰" width="149" verticalAlign="middle" textAlign="center" size="18" height="35" x="12.96" y="15.64"/> <e:Label id="nameTxt" text="打发顺丰" width="149" verticalAlign="middle" textAlign="center" size="18" height="35" x="12.96" y="15.64"/>
</e:Group> </e:Group>
</e:Group> </e:Group>
<e:Label id="ranktxt" text="我在好友中排名第X" width="350" verticalAlign="middle" textAlign="center" size="22" height="42" x="122.03999999999999" y="448.02" scaleX="1" scaleY="1"/>
</e:Group> </e:Group>
<e:Group id="inviteGroup" x="0" bottom="0" locked="true"> <e:Group id="inviteGroup" x="0" bottom="0" locked="true">
<e:Image source="朋友圈中间分享蒙层1_jpg" y="0" x="0"/> <e:Image source="朋友圈中间分享蒙层1_jpg" y="0" x="0"/>
...@@ -38,5 +39,4 @@ ...@@ -38,5 +39,4 @@
</e:Button> </e:Button>
</e:Group> </e:Group>
</e:Group> </e:Group>
<e:Label id="ranktxt" text="我在好友中排名第X" width="350" verticalAlign="middle" textAlign="center" size="18" height="42" x="208.04" y="492.5"/>
</e:Skin> </e:Skin>
\ No newline at end of file
...@@ -37,7 +37,7 @@ export default class FriendPanel extends Panel { ...@@ -37,7 +37,7 @@ export default class FriendPanel extends Panel {
`第<font color=0xfff000><b>${userRank.levelNum}</b></font>关`); `第<font color=0xfff000><b>${userRank.levelNum}</b></font>关`);
this.score.textFlow = (new egret.HtmlTextParser).parser( this.score.textFlow = (new egret.HtmlTextParser).parser(
`<font color=0xfff000><b>${userRank.maxScore}</b></font>分`); `<font color=0xfff000><b>${userRank.maxScore}</b></font>分`);
this['rankTxt'].text = userRank.rank this.rank = this['rankTxt'].text = userRank.rank;
this['star'].text = `X${userRank.stars}` this['star'].text = `X${userRank.stars}`
} }
...@@ -91,7 +91,7 @@ export default class FriendPanel extends Panel { ...@@ -91,7 +91,7 @@ export default class FriendPanel extends Panel {
if (iswx()) { if (iswx()) {
getFriendShareUrl(this.stage); getFriendShareUrl(this.stage);
} else } else
showShare3(); showShare3(this.rank);
// showShareCodePanel(CodeChannels.RankPlay);//mmp,排行榜的分享又不要口令了 // showShareCodePanel(CodeChannels.RankPlay);//mmp,排行榜的分享又不要口令了
} }
......
...@@ -13,7 +13,8 @@ const img: any = document.getElementById('pic'); ...@@ -13,7 +13,8 @@ const img: any = document.getElementById('pic');
img.style.display = 'none'; img.style.display = 'none';
class Share3 extends ComponentBase { class Share3 extends ComponentBase {
start() { start(rank) {
this['ranktxt'].text =`我在好友中排名第${rank}`;
this['avatar'].mask = this['avatarMask']; this['avatar'].mask = this['avatarMask'];
const { data: user } = DataManager.ins.getData('hc_userInfo'); const { data: user } = DataManager.ins.getData('hc_userInfo');
this['avatar'].source = user.avatar; this['avatar'].source = user.avatar;
...@@ -52,11 +53,12 @@ class Share3 extends ComponentBase { ...@@ -52,11 +53,12 @@ class Share3 extends ComponentBase {
//channel 1 好友 2 朋友圈 //channel 1 好友 2 朋友圈
shareFunc(channel: string) { shareFunc(channel: string) {
Loading.instace.show(); Loading.instace.show();
const base64 = getPrintScreenData(this['pic'], 0, 0, 579, 864); const base64 = getPrintScreenData(this['pic'], 0, 0, 600, 963);
console.log(base64);
// img.src = base64;
NetManager.ins.imgUrl((success) => { NetManager.ins.imgUrl((success) => {
const data = DataManager.ins.getData('imgURL'); const data = DataManager.ins.getData('imgURL');
img.src = data.data; img.src = data.data;
// img.src = base64;
callShareApi(data.data, channel); callShareApi(data.data, channel);
Loading.instace.hide(); Loading.instace.hide();
}, base64); }, base64);
...@@ -69,17 +71,17 @@ class Share3 extends ComponentBase { ...@@ -69,17 +71,17 @@ class Share3 extends ComponentBase {
let inited = false; let inited = false;
let _share: Share3; let _share: Share3;
const initShare = () => { const initShare = (rank) => {
const layer = layers.shareLayer; const layer = layers.shareLayer;
const share = new Share3(); const share = new Share3();
share.loadSkin(); share.loadSkin();
share.start(); share.start(rank);
layer.addChild(share); layer.addChild(share);
_share = share; _share = share;
}; };
export const showShare3 = () => { export const showShare3 = (rank) => {
if (!inited) { if (!inited) {
initShare(); initShare(rank);
inited = true; inited = 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