Commit e3bf7fae authored by 邱旭's avatar 邱旭
parents faca4cb5 8392da50
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 @@
<e:Rect width="750" height="1624" fillAlpha="0.7"/>
<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:Group x="306" y="-8.7">
<e:Image id="avatar" y="0" width="140" height="140" x="0" source=""/>
<e:Rect id="avatarMask" width="140" height="140" y="0" ellipseWidth="140" ellipseHeight="140" x="0"/>
<e:Group x="288.77" y="322.83">
<e:Image id="avatar" y="0" width="150" height="150" x="0" source=""/>
<e:Rect id="avatarMask" width="150" height="150" y="0" ellipseWidth="150" ellipseHeight="150" x="0"/>
</e:Group>
<e:Group y="123.99" horizontalCenter="-1">
<e:Image source="sharefriend_png" y="0" x="0"/>
<e:Label id="nameTxt" text="打发顺丰" width="149" verticalAlign="middle" textAlign="center" size="18" height="45" x="16"/>
<e:Group y="432.91" horizontalCenter="-8.5">
<e:Image y="0" x="0" source="commom_share1_png"/>
<e:Label id="nameTxt" text="打发顺丰" width="188" verticalAlign="middle" textAlign="center" size="18" height="42" horizontalCenter="0" y="20"/>
</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>
\ No newline at end of file
<?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:Image id="ruleBg" source="ruleBg_png" horizontalCenter="0.5" verticalCenter="-231"/>
<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" y="251"/>
<e:Scroller id="scroller" width="545" x="104.76" height="507" y="377.2">
<e:Group id="group" width="100%">
<e:Label id="labContent" width="100%" text="" lineSpacing="10" size="30" multiline="true" textColor="0xa54615"/>
......@@ -9,7 +9,7 @@
</e:layout>
</e:Group>
</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:Skin states="up,down,disabled">
<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";
import Loading from "../libs/new_wx/components/Loading";
class FriendWxShare extends ComponentBase {
start() {
start(rank) {
const data = getHomeData();
this['ranktxt'].text =`我在好友中排名第${rank}`;
this['lvTxt'].text = data.levels.length == 0 ? 1 : data.levels.length;
this['avatar'].mask = this['avatarMask'];
const { data: user } = DataManager.ins.getData('hc_userInfo');
......@@ -20,19 +21,23 @@ class FriendWxShare extends ComponentBase {
const img: any = document.getElementById('pic');
img.style.display = 'none';
export const getFriendShareUrl = async (parent?: egret.DisplayObjectContainer) => {
export const getFriendShareUrl = async (parent?: egret.DisplayObjectContainer,rank?) => {
return new Promise(async (r) => {
const pic: egret.Texture = await RES.getResAsync('sharefriendwx_jpg');
const showoff = new FriendWxShare();
showoff.loadSkin();
showoff.start();
if (parent) parent.addChild(showoff);
showoff.start(rank);
if (parent) {
parent.addChild(showoff);
showoff.y = showoff.stage.stageHeight/2- showoff.height/2;
};
showoff.visible = false;
img.style.display = 'block';
Loading.instace.show();
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;
Loading.instace.hide();
}, 200);
......
......@@ -89,7 +89,7 @@ export default class FriendPanel extends Panel {
console.log('onTapInvite');
if (iswx()) {
getFriendShareUrl(this.stage);
getFriendShareUrl(this.stage,this.rank);
} else
showShare3(this.rank);
// 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