Commit b21ae6da authored by wildfirecode's avatar wildfirecode

1

parent f8186d2e
egret/resource/assets/rule/ruleBg.png

111 KB | W: | H:

egret/resource/assets/rule/ruleBg.png

99.1 KB | W: | H:

egret/resource/assets/rule/ruleBg.png
egret/resource/assets/rule/ruleBg.png
egret/resource/assets/rule/ruleBg.png
egret/resource/assets/rule/ruleBg.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -3,13 +3,14 @@ ...@@ -3,13 +3,14 @@
<e:Rect width="750" height="1624" fillAlpha="0.7"/> <e:Rect width="750" height="1624" fillAlpha="0.7"/>
<e:Image source="sharefriendwx_jpg"/> <e:Image source="sharefriendwx_jpg"/>
<e:Label id="lvTxt0" text="120" y="319.99" anchorOffsetX="0" anchorOffsetY="0" bold="true" textAlign="center" verticalAlign="middle" size="106" textColor="0xB14D00" x="280" width="189" visible="false"/> <e:Label id="lvTxt0" text="120" y="319.99" anchorOffsetX="0" anchorOffsetY="0" bold="true" textAlign="center" verticalAlign="middle" size="106" textColor="0xB14D00" x="280" width="189" visible="false"/>
<e:Group x="306" y="-8.7"> <e:Group x="288.77" y="322.83">
<e:Image id="avatar" y="0" width="140" height="140" x="0" source=""/> <e:Image id="avatar" y="0" width="150" height="150" x="0" source=""/>
<e:Rect id="avatarMask" width="140" height="140" y="0" ellipseWidth="140" ellipseHeight="140" x="0"/> <e:Rect id="avatarMask" width="150" height="150" y="0" ellipseWidth="150" ellipseHeight="150" x="0"/>
</e:Group> </e:Group>
<e:Group y="123.99" horizontalCenter="-1"> <e:Group y="432.91" horizontalCenter="-8.5">
<e:Image source="sharefriend_png" y="0" x="0"/> <e:Image y="0" x="0" source="commom_share1_png"/>
<e:Label id="nameTxt" text="打发顺丰" width="149" verticalAlign="middle" textAlign="center" size="18" height="45" x="16"/> <e:Label id="nameTxt" text="打发顺丰" width="188" verticalAlign="middle" textAlign="center" size="18" height="42" horizontalCenter="0" y="20"/>
</e:Group> </e:Group>
<e:BitmapLabel id="lvTxt" y="328.38" text="150" font="sharenums_fnt" horizontalCenter="0"/> <e:BitmapLabel id="lvTxt" y="666.23" text="150" font="sharenums_fnt" horizontalCenter="127.5" rotation="5"/>
<e:Label id="ranktxt" text="我在好友中排名第X" width="399" size="25" height="48" x="175.04" y="770.02" scaleX="1" scaleY="1" textAlign="center" verticalAlign="middle"/>
</e:Skin> </e:Skin>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<e:Skin class="RuleSkin" width="750" height="1624" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing"> <e:Skin class="RuleSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image id="ruleBg" source="ruleBg_png" horizontalCenter="0.5" verticalCenter="-231"/> <e:Image id="ruleBg" source="ruleBg_png" horizontalCenter="0.5" y="251"/>
<e:Scroller id="scroller" width="545" x="104.76" height="507" y="377.2"> <e:Scroller id="scroller" width="545" x="104.76" height="507" y="377.2">
<e:Group id="group" width="100%"> <e:Group id="group" width="100%">
<e:Label id="labContent" width="100%" text="" lineSpacing="10" size="30" multiline="true" textColor="0xa54615"/> <e:Label id="labContent" width="100%" text="" lineSpacing="10" size="30" multiline="true" textColor="0xa54615"/>
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
</e:layout> </e:layout>
</e:Group> </e:Group>
</e:Scroller> </e:Scroller>
<e:Button id="closeBtn" label="" x="614" y="280"> <e:Button id="closeBtn" label="" x="604.91" y="246.67">
<e:skinName> <e:skinName>
<e:Skin states="up,down,disabled"> <e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="closeCommonBtn_png" source.down="closeCommonBtn_png" source.disabled="closeCommonBtn_png"/> <e:Image width="100%" height="100%" source="closeCommonBtn_png" source.down="closeCommonBtn_png" source.disabled="closeCommonBtn_png"/>
......
...@@ -6,8 +6,9 @@ import { getNick } from "./mapScene/MapScene"; ...@@ -6,8 +6,9 @@ import { getNick } from "./mapScene/MapScene";
import Loading from "../libs/new_wx/components/Loading"; import Loading from "../libs/new_wx/components/Loading";
class FriendWxShare extends ComponentBase { class FriendWxShare extends ComponentBase {
start() { start(rank) {
const data = getHomeData(); const data = getHomeData();
this['ranktxt'].text =`我在好友中排名第${rank}`;
this['lvTxt'].text = data.levels.length == 0 ? 1 : data.levels.length; this['lvTxt'].text = data.levels.length == 0 ? 1 : data.levels.length;
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');
...@@ -20,19 +21,23 @@ class FriendWxShare extends ComponentBase { ...@@ -20,19 +21,23 @@ class FriendWxShare extends ComponentBase {
const img: any = document.getElementById('pic'); const img: any = document.getElementById('pic');
img.style.display = 'none'; img.style.display = 'none';
export const getFriendShareUrl = async (parent?: egret.DisplayObjectContainer) => { export const getFriendShareUrl = async (parent?: egret.DisplayObjectContainer,rank?) => {
return new Promise(async (r) => { return new Promise(async (r) => {
const pic: egret.Texture = await RES.getResAsync('sharefriendwx_jpg'); const pic: egret.Texture = await RES.getResAsync('sharefriendwx_jpg');
const showoff = new FriendWxShare(); const showoff = new FriendWxShare();
showoff.loadSkin(); showoff.loadSkin();
showoff.start(); showoff.start(rank);
if (parent) parent.addChild(showoff); if (parent) {
parent.addChild(showoff);
showoff.y = showoff.stage.stageHeight/2- showoff.height/2;
};
showoff.visible = false; showoff.visible = false;
img.style.display = 'block'; img.style.display = 'block';
Loading.instace.show(); Loading.instace.show();
setTimeout(() => { setTimeout(() => {
const base64 = getPrintScreenData(showoff, 0, 0, pic.textureWidth, parent.stage.stageHeight); const base64 = getPrintScreenData(showoff, 0, (showoff.height - showoff.stage.stageHeight)/2, pic.textureWidth, parent.stage.stageHeight);
img.src = base64; img.src = base64;
Loading.instace.hide(); Loading.instace.hide();
}, 200); }, 200);
......
...@@ -89,7 +89,7 @@ export default class FriendPanel extends Panel { ...@@ -89,7 +89,7 @@ export default class FriendPanel extends Panel {
console.log('onTapInvite'); console.log('onTapInvite');
if (iswx()) { if (iswx()) {
getFriendShareUrl(this.stage); getFriendShareUrl(this.stage,this.rank);
} else } else
showShare3(this.rank); showShare3(this.rank);
// showShareCodePanel(CodeChannels.RankPlay);//mmp,排行榜的分享又不要口令了 // showShareCodePanel(CodeChannels.RankPlay);//mmp,排行榜的分享又不要口令了
......
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