Commit b880964a authored by 邱旭's avatar 邱旭

Merge branch 'dev' of http://gitlab2.dui88.com/wanghongyuan/xiaoxiaole into dev

parents f1fb1b46 39e989e0
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
"globalBackgroundHeight": -1, "globalBackgroundHeight": -1,
"globalBackgroundColor": "#c1c1c1", "globalBackgroundColor": "#c1c1c1",
"globalBackgroundImage": "", "globalBackgroundImage": "",
"globalAutoLayerMarkEnable": false "globalAutoLayerMarkEnable": true
}, },
"1667fb18fa6": { "1667fb18fa6": {
"bindingDataTestObj": [ "bindingDataTestObj": [
......
...@@ -169,6 +169,7 @@ export default class MainBase extends eui.UILayer { ...@@ -169,6 +169,7 @@ export default class MainBase extends eui.UILayer {
RES.getResAsync(`nums2_fnt`); RES.getResAsync(`nums2_fnt`);
if (!window['development']) { if (!window['development']) {
RES.getResAsync(`common_json`); RES.getResAsync(`common_json`);
RES.getResAsync(`friendshare_json`);
RES.getResAsync(`inviterulepanel_json`); RES.getResAsync(`inviterulepanel_json`);
} }
else { else {
...@@ -340,11 +341,20 @@ export default class MainBase extends eui.UILayer { ...@@ -340,11 +341,20 @@ export default class MainBase extends eui.UILayer {
}); });
} }
hc_userInfo() {
return new Promise((r) => {
NetManager.ins.hc_userInfo(() => {
r()
});
})
}
protected async createGameScene() { protected async createGameScene() {
await Promise.all([ await Promise.all([
this.getAd(), this.getAd(),
this.ajaxElement(), this.ajaxElement(),
this.hcHome(), this.hcHome(),
this.hc_userInfo(),
]); ]);
MapScene.adData = DataManager.ins.getData('hc_advert'); MapScene.adData = DataManager.ins.getData('hc_advert');
......
import getShowOffPic from "../../../src/getShowOffPic";
import { iswx } from "../../../src/iswx";
import { getlogItem } from "../../../src/Main"; import { getlogItem } from "../../../src/Main";
import { addRankFriendList } from "../../../src/mapScene/RankFriendList";
import setGray from "../../../src/setGray"; import setGray from "../../../src/setGray";
import { NetManager } from "../../tw/manager/NetManager";
import Panel from "./Panel";
import SceneCtrl from "../ctrls/sceneCtrl";
import { ModuleTypes } from "../types/sceneTypes";
import { createData, changeMapScene } from "../../../src/startScene/StartScene";
import { DataManager } from "../../tw/manager/DataManager";
import getShowOffPic from "../../../src/getShowOffPic";
import { showShare } from "../../../src/shareCtrl"; import { showShare } from "../../../src/shareCtrl";
import { iswx } from "../../../src/iswx"; import { changeMapScene } from "../../../src/startScene/StartScene";
import wait from "../../new_tc/wait"; import wait from "../../new_tc/wait";
import { addAdComp } from "../../../src/panels/BoxPanel"; import { DataManager } from "../../tw/manager/DataManager";
import { NetManager } from "../../tw/manager/NetManager";
import Panel from "./Panel";
export default class NoPrizePanel extends Panel { export default class NoPrizePanel extends Panel {
_level; _level;
start(data) { start(data) {
...@@ -40,7 +38,7 @@ export default class NoPrizePanel extends Panel { ...@@ -40,7 +38,7 @@ export default class NoPrizePanel extends Panel {
changeMapScene(); changeMapScene();
}, this); }, this);
addAdComp(84,735.52,this); addRankFriendList(84,735.52,this);
} }
......
import getShowOffPic from "../../../src/getShowOffPic";
import { iswx } from "../../../src/iswx"; import { iswx } from "../../../src/iswx";
import { getlogItem } from "../../../src/Main"; import { getlogItem } from "../../../src/Main";
import { addRankFriendList } from "../../../src/mapScene/RankFriendList";
import setGray from "../../../src/setGray"; import setGray from "../../../src/setGray";
import { showShare } from "../../../src/shareCtrl"; import { showShare } from "../../../src/shareCtrl";
import { changeMapScene } from "../../../src/startScene/StartScene";
import wait from "../../new_tc/wait";
import { DataManager } from "../../tw/manager/DataManager"; import { DataManager } from "../../tw/manager/DataManager";
import { NetManager } from "../../tw/manager/NetManager"; import { NetManager } from "../../tw/manager/NetManager";
import SceneCtrl from "../ctrls/sceneCtrl";
import { ModuleTypes } from "../types/sceneTypes";
import Panel from "./Panel"; import Panel from "./Panel";
import getShowOffPic from "../../../src/getShowOffPic";
import wait from "../../new_tc/wait";
import { changeMapScene } from "../../../src/startScene/StartScene";
import { addAdComp } from "../../../src/panels/BoxPanel";
export default class PrizePanel extends Panel { export default class PrizePanel extends Panel {
_level; _level;
start(data) { start(data) {
...@@ -43,7 +41,7 @@ export default class PrizePanel extends Panel { ...@@ -43,7 +41,7 @@ export default class PrizePanel extends Panel {
this.setStar(hc_submitData.stars); this.setStar(hc_submitData.stars);
addAdComp(84,938.52,this); addRankFriendList(84,938.52,this);
} }
showlog() { showlog() {
......
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"friendshare","version":5,"files":["../assets/sharefriend/sharefriend.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"share3","version":5,"files":["../assets/sharefriend/sharefriend.png"]}
\ No newline at end of file
...@@ -119,6 +119,14 @@ ...@@ -119,6 +119,14 @@
{ {
"keys": "invateCut_btn_png,invateCut_bg_png", "keys": "invateCut_btn_png,invateCut_bg_png",
"name": "invitecuttimepanel" "name": "invitecuttimepanel"
},
{
"keys": "sharefriend_png",
"name": "share3"
},
{
"keys": "sharefriend_png",
"name": "friendshare"
} }
], ],
"resources": [ "resources": [
...@@ -2236,6 +2244,21 @@ ...@@ -2236,6 +2244,21 @@
"url": "assets/ad/ad_closebtn.png", "url": "assets/ad/ad_closebtn.png",
"type": "image", "type": "image",
"name": "ad_closebtn_png" "name": "ad_closebtn_png"
},
{
"url": "assets/sharefriend.jpg",
"type": "image",
"name": "sharefriend_jpg"
},
{
"url": "assets/sharefriend/sharefriend.png",
"type": "image",
"name": "sharefriend_png"
},
{
"url": "assets/sharefriendwx.jpg",
"type": "image",
"name": "sharefriendwx_jpg"
} }
] ]
} }
\ No newline at end of file
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
"resource/skins/FailSkin.exml", "resource/skins/FailSkin.exml",
"resource/skins/FriendItem2Skin.exml", "resource/skins/FriendItem2Skin.exml",
"resource/skins/FriendItemSkin.exml", "resource/skins/FriendItemSkin.exml",
"resource/skins/FriendShareSkin.exml",
"resource/skins/FriendSkin.exml", "resource/skins/FriendSkin.exml",
"resource/skins/H5Skin.exml", "resource/skins/H5Skin.exml",
"resource/skins/IconButtonSkin.exml", "resource/skins/IconButtonSkin.exml",
...@@ -40,11 +41,13 @@ ...@@ -40,11 +41,13 @@
"resource/skins/Prize2Skin.exml", "resource/skins/Prize2Skin.exml",
"resource/skins/PrizeSkin.exml", "resource/skins/PrizeSkin.exml",
"resource/skins/QuitSkin.exml", "resource/skins/QuitSkin.exml",
"resource/skins/RankFriendListSkin.exml",
"resource/skins/RankItemSkin.exml", "resource/skins/RankItemSkin.exml",
"resource/skins/RankSkin.exml", "resource/skins/RankSkin.exml",
"resource/skins/ReliveSkin.exml", "resource/skins/ReliveSkin.exml",
"resource/skins/RuleSkin.exml", "resource/skins/RuleSkin.exml",
"resource/skins/Share2Skin.exml", "resource/skins/Share2Skin.exml",
"resource/skins/Share3Skin.exml",
"resource/skins/ShareSkin.exml", "resource/skins/ShareSkin.exml",
"resource/skins/ShareTipsSkin.exml", "resource/skins/ShareTipsSkin.exml",
"resource/skins/ShopSkin.exml", "resource/skins/ShopSkin.exml",
......
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="FriendShareSkin" width="750" height="1624" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Rect width="750" height="1624" fillAlpha="0.7"/>
<e:Image source="sharefriendwx_jpg"/>
<e:Label id="lvTxt" text="70" y="377.58" anchorOffsetX="0" anchorOffsetY="0" bold="true" textAlign="center" verticalAlign="middle" size="106" textColor="0xB14D00" x="280" width="189"/>
<e:Group x="306" y="55">
<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>
<e:Group y="174" 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>
</e:Skin>
\ No newline at end of file
...@@ -41,16 +41,16 @@ ...@@ -41,16 +41,16 @@
</e:Skin> </e:Skin>
</e:skinName> </e:skinName>
</e:Button> </e:Button>
<e:Group x="323.87" y="104.79"> <e:Group x="313.87" y="104.79">
<e:Image id="avatar" y="0" width="120" height="120" x="0" source=""/> <e:Image id="avatar" y="0" width="120" height="120" x="0" source=""/>
<e:Rect id="avatarMask" width="120" height="120" y="0" ellipseWidth="120" ellipseHeight="120"/> <e:Rect id="avatarMask" width="120" height="120" y="0" ellipseWidth="120" ellipseHeight="120"/>
</e:Group> </e:Group>
<e:Group x="226.87" y="308.79"> <e:Group x="214.87" y="308.79">
<e:Image id="avatar0" y="0" width="60" height="60" x="0" source=""/> <e:Image id="avatar0" y="0" width="60" height="60" x="0" source=""/>
<e:Rect id="avatarMask0" width="60" height="60" y="0" ellipseWidth="60" ellipseHeight="60"/> <e:Rect id="avatarMask0" width="60" height="60" y="0" ellipseWidth="60" ellipseHeight="60"/>
</e:Group> </e:Group>
<e:Label id="nameTxt0" text="nickname" y="245" textColor="0x784325" horizontalCenter="6.5"/> <e:Label id="nameTxt0" text="nickname" y="245" textColor="0x784325" horizontalCenter="6.5"/>
<e:Label id="rankTxt" text="-" x="112" y="311" width="86" textAlign="center" verticalAlign="middle" height="52" size="48"/> <e:Label id="rankTxt" text="-" x="112" y="311" width="86" textAlign="center" verticalAlign="middle" height="52" size="44"/>
<e:Label id="nameTxt" text="-" x="306" y="307" size="24"/> <e:Label id="nameTxt" text="-" x="306" y="307" size="24"/>
<e:Label id="progress" text="第1关" x="306" y="340.79" size="24"/> <e:Label id="progress" text="第1关" x="306" y="340.79" size="24"/>
<e:Label id="score" text="分数:0分" x="414" y="340.79" size="24" anchorOffsetX="0" anchorOffsetY="0"/> <e:Label id="score" text="分数:0分" x="414" y="340.79" size="24" anchorOffsetX="0" anchorOffsetY="0"/>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
xmlns:w="http://ns.egret.com/wing"> xmlns:w="http://ns.egret.com/wing">
<e:Image y="45.33" horizontalCenter="0" source="invitePrize_bg_png"/> <e:Image y="45.33" horizontalCenter="0" source="invitePrize_bg_png"/>
<e:Image id="prizeImg" y="426.77" source="" horizontalCenter="0" width="510" height="228"/> <e:Image id="prizeImg" y="426.77" source="" horizontalCenter="0" width="510" height="228"/>
<e:Button id="closeBtn" label="" x="632" y="317.33"> <e:Button id="closeBtn" label="" x="624" y="313.33">
<e:skinName> <e:skinName>
<e:Skin states="up,down,disabled" xmlns:w="http://ns.egret.com/wing"> <e:Skin states="up,down,disabled" xmlns:w="http://ns.egret.com/wing">
<e:Image width="100%" height="100%" source="closeCommonBtn_png" source.down="closeCommonBtn_png" <e:Image width="100%" height="100%" source="closeCommonBtn_png" source.down="closeCommonBtn_png"
......
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="RankFriendListSkin" width="582" height="203" xmlns:e="http://ns.egret.com/eui">
<e:Image source="startpanel_bg2_png" y="0" x="0"/>
<e:List id="friendlist" itemRendererSkinName="FriendItem2Skin" y="48" horizontalCenter="0">
<e:ArrayCollection>
<e:Array>
<e:Object a="null"/>
<e:Object a="null"/>
<e:Object a="null"/>
<e:Object a="null"/>
<e:Object a="null"/>
</e:Array>
</e:ArrayCollection>
<e:layout>
<e:HorizontalLayout/>
</e:layout>
</e:List>
<e:Label id="empty" text="该关卡没有好友通关" y="97" textColor="0xC33700" size="26" x="174"/>
</e:Skin>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<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"/>
<e:Rect width="750" height="1624" fillAlpha="0.7"/>
<e:Group id="pic" x="86" y="46">
<e:Group y="0" x="0">
<e:Image x="0" y="0" source="sharefriend_jpg"/>
<e:Label id="lvTxt" text="14" y="270.58" anchorOffsetX="0" anchorOffsetY="0" bold="true" textAlign="center" verticalAlign="middle" size="106" textColor="0xb14d00" horizontalCenter="0"/>
</e:Group>
<e:Group x="236.86" y="44.78">
<e:Image id="avatar" y="0" width="108" height="108" x="0" source=""/>
<e:Rect id="avatarMask" width="108" height="108" y="0" ellipseWidth="108" ellipseHeight="108"/>
<e:Group x="-26.75" y="87">
<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>
</e:Group>
</e:Group>
<e:Group id="inviteGroup" x="0" bottom="0" locked="true">
<e:Image source="朋友圈中间分享蒙层1_jpg" y="0" x="0"/>
<e:Group y="66" x="261">
<e:Button id="btn1" label="" x="0" y="0">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="share_btn1_png" source.down="share_btn1_png" source.disabled="share_btn1_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Button id="btn2" label="" x="152">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="share_btn2_png" source.down="share_btn2_png" source.disabled="share_btn2_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
</e:Group>
</e:Group>
</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="StartPanelSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing"> <e:Skin class="StartPanelSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<w:Config id="16cd285c715"/> <w:Config id="16cd285c715"/>
<e:Image source="startpanel_bg2_png" y="925" horizontalCenter="0"/> <e:Group x="84" y="925" visible="false">
<e:Image source="startpanel_bg2_png" y="0" x="0"/>
<e:List id="friendlist" itemRendererSkinName="FriendItem2Skin" y="48" x="9">
<e:ArrayCollection>
<e:Array>
<e:Object a="null"/>
<e:Object a="null"/>
<e:Object a="null"/>
<e:Object a="null"/>
<e:Object a="null"/>
</e:Array>
</e:ArrayCollection>
<e:layout>
<e:HorizontalLayout/>
</e:layout>
</e:List>
<e:Label id="empty" text="该关卡没有好友通关" y="97" textColor="0xc33700" size="26" x="174"/>
</e:Group>
<e:Image y="52" horizontalCenter="0" source="startpanel通关条件_png"/> <e:Image y="52" horizontalCenter="0" source="startpanel通关条件_png"/>
<e:Label id="levelTxt" text="第一关" y="204" horizontalCenter="0" size="42"/> <e:Label id="levelTxt" text="第一关" y="204" horizontalCenter="0" size="42"/>
<e:Label id="targetTxt" text="在规定的步数内\n消除足够数量目标" y="332" width="444" x="157" textAlign="center" lineSpacing="15" verticalAlign="middle" height="156" anchorOffsetX="0" textColor="0xa32020" visible="false"/> <e:Label id="targetTxt" text="在规定的步数内\n消除足够数量目标" y="332" width="444" x="157" textAlign="center" lineSpacing="15" verticalAlign="middle" height="156" anchorOffsetX="0" textColor="0xa32020" visible="false"/>
...@@ -61,19 +78,4 @@ ...@@ -61,19 +78,4 @@
</e:List> </e:List>
<e:Label id="tips" text="在指定步数内消灭目标元素" y="7" size="23" textColor="0x885037" bold="true" horizontalCenter="0"/> <e:Label id="tips" text="在指定步数内消灭目标元素" y="7" size="23" textColor="0x885037" bold="true" horizontalCenter="0"/>
</e:Group> </e:Group>
<e:List id="friendlist" itemRendererSkinName="FriendItem2Skin" horizontalCenter="0" y="973" visible="false">
<e:ArrayCollection>
<e:Array>
<e:Object a="null"/>
<e:Object a="null"/>
<e:Object a="null"/>
<e:Object a="null"/>
<e:Object a="null"/>
</e:Array>
</e:ArrayCollection>
<e:layout>
<e:HorizontalLayout/>
</e:layout>
</e:List>
<e:Label id="empty" text="该关卡没有好友通关" y="1022" horizontalCenter="0" textColor="0xc33700" size="26"/>
</e:Skin> </e:Skin>
\ No newline at end of file
import ComponentBase from "../libs/new_wx/components/ComponentBase";
import getHomeData from "./getHomeData";
import { getPrintScreenData } from "./getShowOffPic";
import { DataManager } from "../libs/tw/manager/DataManager";
import { getNick } from "./mapScene/MapScene";
import Loading from "../libs/new_wx/components/Loading";
class FriendWxShare extends ComponentBase {
start() {
const data = getHomeData();
this['lvTxt'].text = data.levels.length ==0 ? 1 : data.levels.length;
this['avatar'].mask = this['avatarMask'];
const { data: user } = DataManager.ins.getData('hc_userInfo');
this['avatar'].source = user.avatar;
this['nameTxt'].text = getNick(user.nickname);
}
get skinKey() { return 'FriendShare' }
}
const img: any = document.getElementById('pic');
img.style.display = 'none';
export const getFriendShareUrl = async (parent?: egret.DisplayObjectContainer) => {
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.visible = false;
img.style.display = 'block';
Loading.instace.show();
setTimeout(() => {
const base64 = getPrintScreenData(showoff, 0, 0, pic.textureWidth, parent.stage.stageHeight);
img.src = base64;
Loading.instace.hide();
}, 200);
})
}
\ No newline at end of file
This diff is collapsed.
import ComponentBase from "../../libs/new_wx/components/ComponentBase";
import { DataManager } from "../../libs/tw/manager/DataManager";
import { NetManager } from "../../libs/tw/manager/NetManager";
import FriendItem2Renderer from "../panels/FriendItem2Renderer";
import StartPanel from "../panels/StartPanel";
export default class RankFriendList extends ComponentBase {
public friendlist: eui.List;
start(data?) {
this.friendlist.useVirtualLayout = false;
this.friendlist.itemRenderer = FriendItem2Renderer;
this.friendlist.visible = false;
this['empty'].visible = false;
NetManager.ins.hc_levelNumRank(() => {
let friends = DataManager.ins.getData('hc_levelNumRank').data;
if (friends == null)
friends = { rank: [] };
friends = friends.rank;
if (friends && friends.length > 0) {
this.friendlist.visible = true;
if (friends.length > 5)
friends.length = 5;
friends.forEach((ele, index) => {
ele.rank = index + 1;
});
const ac = new eui.ArrayCollection(friends);
this.friendlist.dataProvider = ac;
}
else {
this['empty'].visible = true;
}
}, data)
}
get skinKey(): string { return 'RankFriendList' }
}
export const addRankFriendList = (x, y, parent: egret.DisplayObjectContainer,level?) => {
if(!level)
level = StartPanel.currlevel;
const comp = new RankFriendList();
comp.loadSkin();
comp.start(level);
parent.addChildAt(comp, 0);
comp.x = x;
comp.y = y;
}
import wait from "../../libs/new_tc/wait";
import Panel from "../../libs/new_wx/components/Panel"; import Panel from "../../libs/new_wx/components/Panel";
import getHomeData, { BLOOD_NUMS_MAX } from "../getHomeData";
import { NetManager } from "../../libs/tw/manager/NetManager";
import SceneCtrl from "../../libs/new_wx/ctrls/sceneCtrl"; import SceneCtrl from "../../libs/new_wx/ctrls/sceneCtrl";
import { showToast } from "../../libs/new_wx/ctrls/toastCtrl"; import { showToast } from "../../libs/new_wx/ctrls/toastCtrl";
import { getlogItem } from "../Main"; import { updateMainTimer } from "../../libs/new_wx/MainBase";
import wait from "../../libs/new_tc/wait"; import { NetManager } from "../../libs/tw/manager/NetManager";
import { showShare } from "../shareCtrl"; import getHomeData, { BLOOD_NUMS_MAX } from "../getHomeData";
import { getShareUrl } from "../getSharePic";
import { iswx } from "../iswx"; import { iswx } from "../iswx";
import getShowOffPic from "../getShowOffPic"; import { getlogItem } from "../Main";
import getSharePic, { getShareUrl } from "../getSharePic";
import CountDown from "../mapScene/CountDown"; import CountDown from "../mapScene/CountDown";
import { updateMainTimer } from "../../libs/new_wx/MainBase"; import { showShare } from "../shareCtrl";
export default class BloodPanel extends Panel { export default class BloodPanel extends Panel {
start(data) { start(data) {
......
import wait from "../../libs/new_tc/wait";
import Panel from "../../libs/new_wx/components/Panel"; import Panel from "../../libs/new_wx/components/Panel";
import getHomeData, { BLOOD_NUMS_MAX } from "../getHomeData";
import { NetManager } from "../../libs/tw/manager/NetManager";
import SceneCtrl from "../../libs/new_wx/ctrls/sceneCtrl"; import SceneCtrl from "../../libs/new_wx/ctrls/sceneCtrl";
import { showToast } from "../../libs/new_wx/ctrls/toastCtrl"; import { showToast } from "../../libs/new_wx/ctrls/toastCtrl";
import { getlogItem } from "../Main"; import { updateMainTimer } from "../../libs/new_wx/MainBase";
import wait from "../../libs/new_tc/wait"; import { NetManager } from "../../libs/tw/manager/NetManager";
import { showShare } from "../shareCtrl"; import getHomeData, { BLOOD_NUMS_MAX } from "../getHomeData";
import { getShareUrl } from "../getSharePic";
import { iswx } from "../iswx"; import { iswx } from "../iswx";
import getShowOffPic from "../getShowOffPic"; import { getlogItem } from "../Main";
import getSharePic, { getShareUrl } from "../getSharePic";
import CountDown from "../mapScene/CountDown"; import CountDown from "../mapScene/CountDown";
import { updateMainTimer } from "../../libs/new_wx/MainBase"; import { showShare } from "../shareCtrl";
export default class BloodPanel2 extends Panel { export default class BloodPanel2 extends Panel {
start(data) { start(data) {
......
import Panel from "../../libs/new_wx/components/Panel"; import Panel from "../../libs/new_wx/components/Panel";
import { DataManager } from "../../libs/tw/manager/DataManager";
import { NetManager } from "../../libs/tw/manager/NetManager"; import { NetManager } from "../../libs/tw/manager/NetManager";
import { getlogItem } from "../Main"; import { getlogItem } from "../Main";
import { DataManager } from "../../libs/tw/manager/DataManager";
import AdSmallComp from "../mapScene/AdSmallComp"; import AdSmallComp from "../mapScene/AdSmallComp";
export default class BoxPanel extends Panel { export default class BoxPanel extends Panel {
......
import Panel from "../../libs/new_wx/components/Panel"; import Panel from "../../libs/new_wx/components/Panel";
import SceneCtrl from "../../libs/new_wx/ctrls/sceneCtrl";
import { ModuleTypes } from "../../libs/new_wx/types/sceneTypes";
import { NetManager } from "../../libs/tw/manager/NetManager"; import { NetManager } from "../../libs/tw/manager/NetManager";
import { addRankFriendList } from "../mapScene/RankFriendList";
import { changeMapScene } from "../startScene/StartScene"; import { changeMapScene } from "../startScene/StartScene";
import { addAdComp } from "./BoxPanel";
export default class FailedPanel extends Panel { export default class FailedPanel extends Panel {
_level; _level;
...@@ -22,7 +20,7 @@ export default class FailedPanel extends Panel { ...@@ -22,7 +20,7 @@ export default class FailedPanel extends Panel {
}, this); }, this);
addAdComp(84,674.52,this); addRankFriendList(84,674.52,this);
} }
onTouchTap_closeBtn() { onTouchTap_closeBtn() {
......
...@@ -24,7 +24,7 @@ export default class FriendItemRenderer extends eui.ItemRenderer { ...@@ -24,7 +24,7 @@ export default class FriendItemRenderer extends eui.ItemRenderer {
this['rankTxt'].visible = true; this['rankTxt'].visible = true;
} }
this['nameTxt'].text = getNick(this.data.nickName) ; this['nameTxt'].text = getNick(this.data.nickName,10) ;
this['avatar'].source = this.data.avatar; this['avatar'].source = this.data.avatar;
this['star'].text = `X${this.data.stars}`; this['star'].text = `X${this.data.stars}`;
this.progress.textFlow = (new egret.HtmlTextParser).parser( this.progress.textFlow = (new egret.HtmlTextParser).parser(
......
import Panel from "../../libs/new_wx/components/Panel"; import Panel from "../../libs/new_wx/components/Panel";
import FriendItemRenderer from "./FriendItemRenderer";
import { NetManager } from "../../libs/tw/manager/NetManager";
import { DataManager } from "../../libs/tw/manager/DataManager"; import { DataManager } from "../../libs/tw/manager/DataManager";
import { NetManager } from "../../libs/tw/manager/NetManager";
import { iswx } from "../iswx";
import { getNick } from "../mapScene/MapScene"; import { getNick } from "../mapScene/MapScene";
import { showShare3 } from "../shareCtrl3";
import FriendItemRenderer from "./FriendItemRenderer";
import { getFriendShareUrl } from "../getFriendSharePic";
export default class FriendPanel extends Panel { export default class FriendPanel extends Panel {
public list: eui.List; public list: eui.List;
...@@ -23,7 +26,7 @@ export default class FriendPanel extends Panel { ...@@ -23,7 +26,7 @@ export default class FriendPanel extends Panel {
this['empty'].visible = false; this['empty'].visible = false;
NetManager.ins.hc_totalNumRank(() => { NetManager.ins.hc_totalNumRank(() => {
let { data: hc_totalNumRank } = DataManager.ins.getData('hc_totalNumRank'); let { data: hc_totalNumRank } = DataManager.ins.getData('hc_totalNumRank');
if(hc_totalNumRank==null) { if (hc_totalNumRank == null) {
hc_totalNumRank = {} hc_totalNumRank = {}
} }
const { rank, userRank } = hc_totalNumRank; const { rank, userRank } = hc_totalNumRank;
...@@ -60,8 +63,8 @@ export default class FriendPanel extends Panel { ...@@ -60,8 +63,8 @@ export default class FriendPanel extends Panel {
const { data } = DataManager.ins.getData('hc_userInfo'); const { data } = DataManager.ins.getData('hc_userInfo');
this['avatar'].source = this['avatar0'].source = data.avatar; this['avatar'].source = this['avatar0'].source = data.avatar;
this['nameTxt'].text = getNick(data.nickname); this['nameTxt'].text = getNick(data.nickname,10);
this['nameTxt0'].text = getNick(data.nickname,10); this['nameTxt0'].text = getNick(data.nickname, 10);
}); });
} }
...@@ -77,7 +80,12 @@ export default class FriendPanel extends Panel { ...@@ -77,7 +80,12 @@ export default class FriendPanel extends Panel {
} }
onTapInvite() { onTapInvite() {
console.log('onTapInvite') console.log('onTapInvite');
if (iswx()) {
getFriendShareUrl(this.stage);
} else
showShare3();
} }
protected get closeBtns(): eui.Button[] { return [this['closeBtn']] } protected get closeBtns(): eui.Button[] { return [this['closeBtn']] }
......
import wait from "../../libs/new_tc/wait";
import Panel from "../../libs/new_wx/components/Panel"; import Panel from "../../libs/new_wx/components/Panel";
import { DataManager } from "../../libs/tw/manager/DataManager"; import { DataManager } from "../../libs/tw/manager/DataManager";
import { NetManager } from "../../libs/tw/manager/NetManager"; import { NetManager } from "../../libs/tw/manager/NetManager";
import getShowOffPic from "../getShowOffPic";
import { iswx } from "../iswx";
import { getlogItem } from "../Main"; import { getlogItem } from "../Main";
import SceneCtrl from "../../libs/new_wx/ctrls/sceneCtrl"; import { addRankFriendList } from "../mapScene/RankFriendList";
import { ModuleTypes } from "../../libs/new_wx/types/sceneTypes";
import setGray from "../setGray"; import setGray from "../setGray";
import getShowOffPic from "../getShowOffPic";
import { showShare } from "../shareCtrl"; import { showShare } from "../shareCtrl";
import { iswx } from "../iswx";
import wait from "../../libs/new_tc/wait";
import { changeMapScene } from "../startScene/StartScene"; import { changeMapScene } from "../startScene/StartScene";
import { addAdComp } from "./BoxPanel";
export default class Prize2Panel extends Panel { export default class Prize2Panel extends Panel {
_level; _level;
...@@ -47,7 +45,7 @@ export default class Prize2Panel extends Panel { ...@@ -47,7 +45,7 @@ export default class Prize2Panel extends Panel {
const hc_submitData = DataManager.ins.getData('hc_submit').data; const hc_submitData = DataManager.ins.getData('hc_submit').data;
this.setStar(hc_submitData.stars); this.setStar(hc_submitData.stars);
addAdComp(84,849.52,this); addRankFriendList(84,849.52,this);
} }
showlog() { showlog() {
......
...@@ -16,41 +16,24 @@ import { showShare } from "../shareCtrl"; ...@@ -16,41 +16,24 @@ import { showShare } from "../shareCtrl";
import { Chapters } from "../something/Chapters"; import { Chapters } from "../something/Chapters";
import { ElementType } from "../something/enum/ElementType"; import { ElementType } from "../something/enum/ElementType";
import { PassType } from "../something/enum/PassType"; import { PassType } from "../something/enum/PassType";
import FriendItem2Renderer from "./FriendItem2Renderer";
import TargetItemRenderer from "./TargetItemRenderer"; import TargetItemRenderer from "./TargetItemRenderer";
import { DataManager } from "../../libs/tw/manager/DataManager"; import { addRankFriendList } from "../mapScene/RankFriendList";
import { addAdComp } from "./BoxPanel";
export default class StartPanel extends Panel { export default class StartPanel extends Panel {
static currlevel;
private _level; private _level;
private list: eui.List; private list: eui.List;
public friendlist: eui.List;
start(data) { start(data) {
super.start(); super.start();
this.friendlist.useVirtualLayout = false; const homedata = getHomeData();
this.friendlist.itemRenderer = FriendItem2Renderer;
this.friendlist.visible = false;
this['empty'].visible = false;
NetManager.ins.hc_levelNumRank(() => { if (data > homedata.levels.length) {
let friends = DataManager.ins.getData('hc_levelNumRank').data; addAdComp(84, 925, this)
if (friends == null)
friends = { rank: [] };
friends = friends.rank;
if (friends && friends.length > 0) {
this.friendlist.visible = true;
if (friends.length > 5)
friends.length = 5;
friends.forEach((ele, index) => {
ele.rank = index + 1;
});
const ac = new eui.ArrayCollection(friends);
this.friendlist.dataProvider = ac;
} }
else { else
this['empty'].visible = true; addRankFriendList(84, 925, this,data);
}
}, data)
setGlow(this['levelTxt'], 0xfa4b09, 1); setGlow(this['levelTxt'], 0xfa4b09, 1);
this['levelTxt'].text = `第${data}关`; this['levelTxt'].text = `第${data}关`;
...@@ -148,6 +131,7 @@ export default class StartPanel extends Panel { ...@@ -148,6 +131,7 @@ export default class StartPanel extends Panel {
// Loading.instace.hide(); // Loading.instace.hide();
this.hidePanel(); this.hidePanel();
SceneCtrl.instance.change(ModuleTypes.MAIN_SCENE, { chapter: this._level }); SceneCtrl.instance.change(ModuleTypes.MAIN_SCENE, { chapter: this._level });
StartPanel.currlevel=this._level
} }
}, this._level); }, this._level);
......
...@@ -3,21 +3,21 @@ import layers from "../libs/new_wx/views/layers"; ...@@ -3,21 +3,21 @@ import layers from "../libs/new_wx/views/layers";
import getHomeData from "./getHomeData"; import getHomeData from "./getHomeData";
import { iswx } from "./iswx"; import { iswx } from "./iswx";
import { callShareApi } from "./shareCtrl"; import { callShareApi } from "./shareCtrl";
import { DataManager } from "../libs/tw/manager/DataManager";
import { getNick } from "./mapScene/MapScene";
import { getPrintScreenData } from "./getShowOffPic";
import { NetManager } from "../libs/tw/manager/NetManager";
import Loading from "../libs/new_wx/components/Loading";
const img: any = document.getElementById('pic'); const img: any = document.getElementById('pic');
img.style.display = 'none'; img.style.display = 'none';
class Share3 extends ComponentBase { class Share3 extends ComponentBase {
type;
setType(type: any) {
this.type = type;
this['pic1'].visible = false;
this['pic2'].visible = false;
this['pic' + type].visible = true;
}
start() { start() {
this['avatar'].mask = this['avatarMask'];
const { data: user } = DataManager.ins.getData('hc_userInfo');
this['avatar'].source = user.avatar;
this['nameTxt'].text = getNick(user.nickname);
this.once(egret.TouchEvent.ADDED_TO_STAGE, () => { this.once(egret.TouchEvent.ADDED_TO_STAGE, () => {
this.height = this.stage.stageHeight; this.height = this.stage.stageHeight;
}, this); }, this);
...@@ -27,45 +27,39 @@ class Share3 extends ComponentBase { ...@@ -27,45 +27,39 @@ class Share3 extends ComponentBase {
}, this); }, this);
const data = getHomeData(); const data = getHomeData();
this['tipsTxt0'].text = `超过了${Math.ceil(Math.random() * 100)}%的好友`;
this['lvTxt'].text = data.levels.length == 0 ? 1 : data.levels.length; this['lvTxt'].text = data.levels.length == 0 ? 1 : data.levels.length;
this['lvTxt0'].text = data.levels.length;
this['btn1'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => { this['btn1'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
if(iswx()) { //微信端 if (iswx()) { //微信端
} else {//端内 } else {//端内
this.getFunc('2');//朋友圈 this.shareFunc('2');//朋友圈
} }
hideShare3(); hideShare3();
}, this); }, this);
this['btn2'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => { this['btn2'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
if(iswx()) { //微信端 if (iswx()) { //微信端
} else {//端内 } else {//端内
this.getFunc('1');//好友微信 this.shareFunc('1');//好友微信
} }
hideShare3(); hideShare3();
}, this); }, this);
} }
//channel 1 好友 2 朋友圈 //channel 1 好友 2 朋友圈
getFunc(channel: string) { shareFunc(channel: string) {
// let base64; Loading.instace.show();
// if(this.type==1) const base64 = getPrintScreenData(this['pic'], 0, 0, 579, 864);
// base64= getPrintScreenData(this['pic' + this.type], 0, 0, 579, 866); NetManager.ins.imgUrl((success) => {
// else const data = DataManager.ins.getData('imgURL');
// base64= getPrintScreenData(this['pic' + this.type], 0, 0, 600, 965); img.src = data.data;
// NetManager.ins.imgUrl((success) => {
// const data = DataManager.ins.getData('imgURL');
// img.src = base64; // img.src = base64;
// img.src = data.data; callShareApi(data.data, channel);
if(this.type==1) Loading.instace.hide();
callShareApi('https://yun.duiba.com.cn/db_games/xxshareshare2.jpg', channel); }, base64);
else
callShareApi('https://yun.duiba.com.cn/db_games/xxlshare.jpg', channel);
// }, base64);
} }
get skinKey() { get skinKey() {
...@@ -83,15 +77,15 @@ const initShare = () => { ...@@ -83,15 +77,15 @@ const initShare = () => {
layer.addChild(share); layer.addChild(share);
_share = share; _share = share;
}; };
const showShare3 = (type) => { export const showShare3 = () => {
if(!inited) { if (!inited) {
initShare(); initShare();
inited = true; inited = true;
} }
_share.setType(type);
layers.shareLayer.visible = true; layers.shareLayer.visible = true;
} }
const hideShare3 = () => { export const hideShare3 = () => {
layers.shareLayer.visible = false; layers.shareLayer.visible = false;
} }
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
"timestamp":1566199822308, "timestamp":1566199822308,
"data":{ "data":{
"popupAdvert":{ "popupAdvert":{
"enable":true, "enable":0,
"advertList":[ "advertList":[
{ {
"img":"http://yun.dui88.com/images/201909/lsh4tdkp5n.jpg", "img":"http://yun.dui88.com/images/201909/lsh4tdkp5n.jpg",
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
] ]
}, },
"noticeAdvert":{ "noticeAdvert":{
"enable":true, "enable":0,
"advertList":[ "advertList":[
{ {
"img":"http://yun.dui88.com/images/201909/lsh4tdkp5n.jpg", "img":"http://yun.dui88.com/images/201909/lsh4tdkp5n.jpg",
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
] ]
}, },
"mapAdvert":{ "mapAdvert":{
"enable":false, "enable":0,
"advertList":[ "advertList":[
{ {
"img":"http://yun.dui88.com/images/201909/lsh4tdkp5n.jpg", "img":"http://yun.dui88.com/images/201909/lsh4tdkp5n.jpg",
......
{"success":true,"code":"0000000000","desc":"OK","timestamp":1571045294822,"data":null} {
\ No newline at end of file "success": true,
"code": "0000000000",
"desc": "OK",
"timestamp": 1571044339755,
"data": {
"levelNum": 1,
"rank": [
{
"nickName": "https://wx.qlogo.cn/mmopen/vi_32/5icsJibet91SjpqD2GygMAA5twUoqVTiaOqS3NQNia0Jbuia2fZxlh03AIyiaaVTRRKOxo1Ym17icjBBkiaMhicv3zhXgRQ/132",
"avatar": "https://wx.qlogo.cn/mmopen/vi_32/5icsJibet91SjpqD2GygMAA5twUoqVTiaOqS3NQNia0Jbuia2fZxlh03AIyiaaVTRRKOxo1Ym17icjBBkiaMhicv3zhXgRQ/132",
"stars": 3,
"maxScore": 31940,
"rank": null,
"levelNum": null,
"consumerId": null
}
,
{
"nickName": "https://wx.qlogo.cn/mmopen/vi_32/5icsJibet91SjpqD2GygMAA5twUoqVTiaOqS3NQNia0Jbuia2fZxlh03AIyiaaVTRRKOxo1Ym17icjBBkiaMhicv3zhXgRQ/132",
"avatar": "https://wx.qlogo.cn/mmopen/vi_32/5icsJibet91SjpqD2GygMAA5twUoqVTiaOqS3NQNia0Jbuia2fZxlh03AIyiaaVTRRKOxo1Ym17icjBBkiaMhicv3zhXgRQ/132",
"stars": 3,
"maxScore": 31940,
"rank": null,
"levelNum": null,
"consumerId": null
}
]
}
}
\ No newline at end of file
{"success":true,"code":"0000000000","desc":"OK","timestamp":1571055191222,"data":null} {
\ No newline at end of file "code": "0000000000",
"data": [
{
"levelNum": 71,
"rank": [
{
"levelNum": null,
"consumerId": 992,
"nickName": "",
"rank": null,
"avatar": "http://yun.duiba.com.cn/duibaManagerWeb/7fen28siy4.png",
"stars": 3,
"maxScore": 43510
}
]
}
],
"success": true,
"desc": "OK",
"timestamp": 1571208152743
}
\ No newline at end of file
{"success":true,"code":"0000000000","desc":"OK","timestamp":1571055816178,"data":null} {
\ No newline at end of file "success": true,
"code": null,
"desc": null,
"timestamp": 1566199822308,
"data": {
"userRank": {
"levelNum": 555,
"nickName": "奈何本人没文化,一句卧槽行天下",
"avatar": "http://yun.dui88.com/images/201604/c6s5l4dgea.jpg",
"stars": 666,
"maxScore": 1234567,
"rank": 123
},
"rank":[
{
"levelNum": 11,
"nickName": "1奈何本人没文化,一句卧槽行天下",
"avatar": "http://yun.dui88.com/images/201604/c6s5l4dgea.jpg",
"stars": 11,
"maxScore": 111111,
"rank": 1
},
{
"levelNum": 22,
"nickName": "2奈何本人没文化,一句卧槽行天下",
"avatar": "http://yun.dui88.com/images/201604/c6s5l4dgea.jpg",
"stars": 22,
"maxScore": 222222,
"rank": 2
},
{
"levelNum": 33,
"nickName": "3奈何本人没文化,一句卧槽行天下",
"avatar": "http://yun.dui88.com/images/201604/c6s5l4dgea.jpg",
"stars": 33,
"maxScore": 33333,
"rank": 3
},
{
"levelNum": 44,
"nickName": "3奈何本人没文化,一句卧槽行天下",
"avatar": "http://yun.dui88.com/images/201604/c6s5l4dgea.jpg",
"stars": 44,
"maxScore": 4444444,
"rank": 4
},
{
"levelNum": 55,
"nickName": "3奈何本人没文化,一句卧槽行天下",
"avatar": "http://yun.dui88.com/images/201604/c6s5l4dgea.jpg",
"stars": 55,
"maxScore": 1234567,
"rank": 5
},
{
"levelNum": 55,
"nickName": "3奈何本人没文化,一句卧槽行天下",
"avatar": "http://yun.dui88.com/images/201604/c6s5l4dgea.jpg",
"stars": 55,
"maxScore": 1234567,
"rank": 5
},
{
"levelNum": 9999,
"nickName": "99奈何本人没文化,一句卧槽行天下",
"avatar": "http://yun.dui88.com/images/201604/c6s5l4dgea.jpg",
"stars": 55,
"maxScore": 1234567,
"rank": 999
}
]
}
}
\ No newline at end of file
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