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 @@
"globalBackgroundHeight": -1,
"globalBackgroundColor": "#c1c1c1",
"globalBackgroundImage": "",
"globalAutoLayerMarkEnable": false
"globalAutoLayerMarkEnable": true
},
"1667fb18fa6": {
"bindingDataTestObj": [
......
......@@ -169,6 +169,7 @@ export default class MainBase extends eui.UILayer {
RES.getResAsync(`nums2_fnt`);
if (!window['development']) {
RES.getResAsync(`common_json`);
RES.getResAsync(`friendshare_json`);
RES.getResAsync(`inviterulepanel_json`);
}
else {
......@@ -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() {
await Promise.all([
this.getAd(),
this.ajaxElement(),
this.hcHome(),
this.hc_userInfo(),
]);
MapScene.adData = DataManager.ins.getData('hc_advert');
......
import getShowOffPic from "../../../src/getShowOffPic";
import { iswx } from "../../../src/iswx";
import { getlogItem } from "../../../src/Main";
import { addRankFriendList } from "../../../src/mapScene/RankFriendList";
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 { iswx } from "../../../src/iswx";
import { changeMapScene } from "../../../src/startScene/StartScene";
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 {
_level;
start(data) {
......@@ -40,7 +38,7 @@ export default class NoPrizePanel extends Panel {
changeMapScene();
}, this);
addAdComp(84,735.52,this);
addRankFriendList(84,735.52,this);
}
......
import getShowOffPic from "../../../src/getShowOffPic";
import { iswx } from "../../../src/iswx";
import { getlogItem } from "../../../src/Main";
import { addRankFriendList } from "../../../src/mapScene/RankFriendList";
import setGray from "../../../src/setGray";
import { showShare } from "../../../src/shareCtrl";
import { changeMapScene } from "../../../src/startScene/StartScene";
import wait from "../../new_tc/wait";
import { DataManager } from "../../tw/manager/DataManager";
import { NetManager } from "../../tw/manager/NetManager";
import SceneCtrl from "../ctrls/sceneCtrl";
import { ModuleTypes } from "../types/sceneTypes";
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 {
_level;
start(data) {
......@@ -43,7 +41,7 @@ export default class PrizePanel extends Panel {
this.setStar(hc_submitData.stars);
addAdComp(84,938.52,this);
addRankFriendList(84,938.52,this);
}
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 @@
{
"keys": "invateCut_btn_png,invateCut_bg_png",
"name": "invitecuttimepanel"
},
{
"keys": "sharefriend_png",
"name": "share3"
},
{
"keys": "sharefriend_png",
"name": "friendshare"
}
],
"resources": [
......@@ -2236,6 +2244,21 @@
"url": "assets/ad/ad_closebtn.png",
"type": "image",
"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 @@
"resource/skins/FailSkin.exml",
"resource/skins/FriendItem2Skin.exml",
"resource/skins/FriendItemSkin.exml",
"resource/skins/FriendShareSkin.exml",
"resource/skins/FriendSkin.exml",
"resource/skins/H5Skin.exml",
"resource/skins/IconButtonSkin.exml",
......@@ -40,11 +41,13 @@
"resource/skins/Prize2Skin.exml",
"resource/skins/PrizeSkin.exml",
"resource/skins/QuitSkin.exml",
"resource/skins/RankFriendListSkin.exml",
"resource/skins/RankItemSkin.exml",
"resource/skins/RankSkin.exml",
"resource/skins/ReliveSkin.exml",
"resource/skins/RuleSkin.exml",
"resource/skins/Share2Skin.exml",
"resource/skins/Share3Skin.exml",
"resource/skins/ShareSkin.exml",
"resource/skins/ShareTipsSkin.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 @@
</e:Skin>
</e:skinName>
</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:Rect id="avatarMask" width="120" height="120" y="0" ellipseWidth="120" ellipseHeight="120"/>
</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:Rect id="avatarMask0" width="60" height="60" y="0" ellipseWidth="60" ellipseHeight="60"/>
</e:Group>
<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="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"/>
......
......@@ -3,7 +3,7 @@
xmlns:w="http://ns.egret.com/wing">
<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:Button id="closeBtn" label="" x="632" y="317.33">
<e:Button id="closeBtn" label="" x="624" y="313.33">
<e:skinName>
<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"
......
<?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"?>
<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"/>
<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: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"/>
......@@ -61,19 +78,4 @@
</e:List>
<e:Label id="tips" text="在指定步数内消灭目标元素" y="7" size="23" textColor="0x885037" bold="true" horizontalCenter="0"/>
</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>
\ 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
......@@ -22,8 +22,8 @@ import AvatarComp from "./AvatarComp";
import Utils from "../Utils";
import { GDispatcher } from "../../libs/tc/util/GDispatcher";
var doHelpFlag = false;
let doHelpFlag = false;
let adTag = false;
export default class MapScene extends Scene {
static adData;
scrollGroup: eui.Group;
......@@ -37,24 +37,24 @@ export default class MapScene extends Scene {
sendInvite() {
const code = Utils.getRequestByKey('shareCode');
if(!code) return;
if (!code) return;
const dojoin = DataManager.ins.getData('hc_doJoin');
if(!dojoin) return;
if(doHelpFlag){
if (!dojoin) return;
if (doHelpFlag) {
return;
}
NetManager.ins.doHelp((success, res) => {
doHelpFlag = true;
switch(true) {
case (res.code == "444444"): showToast("操作太频繁,请稍后再试");break;
case (res.code == "400017"): showToast("您不是新用户呢~");break;
case (res.code == "0000004"): showToast("缺少必要参数");break;
case (res.code == "0000021"): showToast("无效的分享码");break;
case (res.code == "0000022"): showToast("不可以给自己助力哦~");break;
case (res.code == "0200201"): showToast("邀请任务已结束");break;
case (res.code == "0200202"): showToast("已经给好友助力过了哦~");break;
switch (true) {
case (res.code == "444444"): showToast("操作太频繁,请稍后再试"); break;
case (res.code == "400017"): showToast("您不是新用户呢~"); break;
case (res.code == "0000004"): showToast("缺少必要参数"); break;
case (res.code == "0000021"): showToast("无效的分享码"); break;
case (res.code == "0000022"): showToast("不可以给自己助力哦~"); break;
case (res.code == "0200201"): showToast("邀请任务已结束"); break;
case (res.code == "0200202"): showToast("已经给好友助力过了哦~"); break;
}
if(!success) {
if (!success) {
return;
}
showToast("助力成功");
......@@ -80,7 +80,7 @@ export default class MapScene extends Scene {
// PanelCtrl.instance.show('failed');
}, 1000);
if(getBgOn() && MapScene['firstPlayBgTag'] == true) {
if (getBgOn() && MapScene['firstPlayBgTag'] == true) {
playBg();
}
......@@ -93,29 +93,32 @@ export default class MapScene extends Scene {
const nowTimerStr = date.getTime() + '';
const oldTimerStr = localStorage.getItem('nowTimerStr' + window['CFG'].consumerId);
const nowTimerStr2 = date.getTime() + '';
const oldTimerStr2 = localStorage.getItem('nowTimer2Str' + window['CFG'].consumerId);
// const nowTimerStr2 = date.getTime() + '';
// const oldTimerStr2 = localStorage.getItem('nowTimer2Str' + window['CFG'].consumerId);
const hc_advert = DataManager.ins.getData('hc_advert').data;
let { noticeAdvert} = hc_advert;
if(noticeAdvert==null){
noticeAdvert={enable:false}
let { noticeAdvert } = hc_advert;
if (noticeAdvert == null) {
noticeAdvert = { enable: false }
}
if(oldTimerStr2 != nowTimerStr2 && noticeAdvert && noticeAdvert.enable) {
panels.push('ad');
localStorage.setItem('nowTimer2Str' + window['CFG'].consumerId, nowTimerStr2);
if (noticeAdvert && noticeAdvert.enable) {
if (!adTag) {
panels.push('ad');
adTag = true;
}
// localStorage.setItem('nowTimer2Str' + window['CFG'].consumerId, nowTimerStr2);
}
const {signInfoVO} = DataManager.ins.getData('getSignInfo');
if(signInfoVO.continueDay < 7) {
if(signInfoVO.todaySigned == 0 && oldTimerStr != nowTimerStr) {
const { signInfoVO } = DataManager.ins.getData('getSignInfo');
if (signInfoVO.continueDay < 7) {
if (signInfoVO.todaySigned == 0 && oldTimerStr != nowTimerStr) {
panels.push('sign');
localStorage.setItem('nowTimerStr' + window['CFG'].consumerId, nowTimerStr);
}
}
if(!readCache() && getHomeData().levels.length <= 0) { //引导
if (!readCache() && getHomeData().levels.length <= 0) { //引导
const guide = new GuideCon(() => {
PanelCtrl.instance.showPanels(panels);
......@@ -157,18 +160,18 @@ export default class MapScene extends Scene {
let target;
const homeData = getHomeData();
if(homeData.levels.length == 0) {
if (homeData.levels.length == 0) {
target = 1;
} else if(homeData.levels.length == window['total_level']) {
} else if (homeData.levels.length == window['total_level']) {
target = window['total_level'] + 1;
} else {
target = homeData.levels.length + 1;
}
for(const key in MapScene.iconHash) {
for (const key in MapScene.iconHash) {
const levelOrder = parseInt(key);
const element = MapScene.iconHash[key];
element.addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
if(
if (
(levelOrder > (homeData.levels.length + 1) && levelOrder > 1)
|| (levelOrder > window['last_level'])
) {
......@@ -180,7 +183,7 @@ export default class MapScene extends Scene {
}, this);
}
if(homeData.levels.length < window['total_level']) {
if (homeData.levels.length < window['total_level']) {
const targetIcon = MapScene.iconHash[target];
const light = RES.getRes('lightani_png');
const pic = new egret.Bitmap(light);//76 61
......@@ -190,7 +193,7 @@ export default class MapScene extends Scene {
pic.anchorOffsetY = 61;
pic.x = 50 - 2;
pic.y = 37 + 10;
egret.Tween.get(pic, {loop: true}).to({scaleX: 2, scaleY: 2, alpha: 0}, 1000).wait(1000);
egret.Tween.get(pic, { loop: true }).to({ scaleX: 2, scaleY: 2, alpha: 0 }, 1000).wait(1000);
this['pic'] = pic;
}
......@@ -200,8 +203,8 @@ export default class MapScene extends Scene {
this.showLog();
this.updateBox();
if(data.level) {
if(homeData.remainEnargy == 0)
if (data.level) {
if (homeData.remainEnargy == 0)
PanelCtrl.instance.show('bloodPanel')
else
......@@ -209,8 +212,8 @@ export default class MapScene extends Scene {
}
this.stage.once(egret.TouchEvent.TOUCH_TAP, () => {
if(!MapScene['firstPlayBgTag']) {
if(getBgOn()) {
if (!MapScene['firstPlayBgTag']) {
if (getBgOn()) {
playBg();
}
MapScene['firstPlayBgTag'] = true;
......@@ -218,7 +221,7 @@ export default class MapScene extends Scene {
}, this);
let lastOrder = homeData.levels.length + 1;
if(homeData.levels.length >= window['total_level'])
if (homeData.levels.length >= window['total_level'])
lastOrder = window['total_level'];
this.scroll.viewport.scrollV = this.getScrollV(lastOrder, this.stage.stageHeight);
// console.warn(this.getScrollV(lastOrder, this.stage.stageHeight))
......@@ -228,7 +231,7 @@ export default class MapScene extends Scene {
Promise.all([
RES.getResAsync(`${key}_json`),
RES.getResAsync(`${key}_png`)]);
} catch(error) {
} catch (error) {
}
......@@ -237,26 +240,26 @@ export default class MapScene extends Scene {
updateMyInfo() {
this['avatar'].visible = false;
this['nameTxt'].text = '';
NetManager.ins.hc_userInfo(() => {
// NetManager.ins.hc_userInfo(() => {
this['avatar'].visible = true;
const {data} = DataManager.ins.getData('hc_userInfo');
const { data } = DataManager.ins.getData('hc_userInfo');
this['avatar'].source = data.avatar;
this['nameTxt'].text = getNick(data.nickname);
});
// });
}
updateAdData() {
const hc_advert = DataManager.ins.getData('hc_advert').data;
let {mapAdvert} = hc_advert;
if(mapAdvert == null)
mapAdvert = {enable: false, advertList: []}
let { mapAdvert } = hc_advert;
if (mapAdvert == null)
mapAdvert = { enable: false, advertList: [] }
this['adBtn'].visible = mapAdvert.enable;
if(mapAdvert.enable) {
if (mapAdvert.enable) {
let result;
result = mapAdvert.advertList;
if(Array.isArray(mapAdvert.advertList)) {
if (Array.isArray(mapAdvert.advertList)) {
const index = Math.floor(mapAdvert.advertList.length * Math.random());
result = mapAdvert.advertList[index];
}
......@@ -269,18 +272,18 @@ export default class MapScene extends Scene {
destroy() {
super.destroy();
if(this['pic'])
if (this['pic'])
egret.Tween.removeTweens(this['pic']);
}
getScrollV(lastOrder, stageHeight) {
// lastOrder = 69;
if(lastOrder <= 7) {//顶部的1-7关
if (lastOrder <= 7) {//顶部的1-7关
return this.getScrollV1(lastOrder, stageHeight);
}
if(lastOrder >= window['total_level'] - 10) {//底部的60-70关 70-10
if (lastOrder >= window['total_level'] - 10) {//底部的60-70关 70-10
return this.getScrollV2(lastOrder, stageHeight);
}
//中部的4个循环*13 8~59
......@@ -291,7 +294,7 @@ export default class MapScene extends Scene {
const ylist = [26, 158, 302, 435, 547, 674, 821, 897, 969, 1072, 1137, 1254, 1367];
const y0 = this._data.top.height;//顶部的高度
let a0 = (lastOrder - MapTopPart.LEVEL_NUMS) % MapRpeatPart.LEVEL_NUMS; //减去7后的order 8-7 = 1
if(a0 == 0) a0 = MapRpeatPart.LEVEL_NUMS
if (a0 == 0) a0 = MapRpeatPart.LEVEL_NUMS
const a1 = Math.ceil((lastOrder - MapTopPart.LEVEL_NUMS) / MapRpeatPart.LEVEL_NUMS) - 1;//当前地图repeat的顺序
const y1 = ylist[a0 - 1];
const y2 = y0 + y1 + a1 * this._data.list[0].height;
......@@ -301,7 +304,7 @@ export default class MapScene extends Scene {
getScrollV1(lastOrder, stageHeight) {
const ylist = [492, 550.35, 744, 803, 810, 975, 1089.69].map(i => i + 40);
const targetY = ylist[lastOrder - 1] - stageHeight / 2;
if(targetY <= 0) return 0
if (targetY <= 0) return 0
return targetY;
}
......@@ -313,7 +316,7 @@ export default class MapScene extends Scene {
+ this._data.bottom.height;
const ylist = [44, 148.44, 331, 403, 513, 660, 829.69, 949.69, 1052.69, 1148.69, 1209.69].map(i => i + 40);
const targetY = y0 + ylist[lastOrder - 1] - stageHeight / 2;
if(targetY >= (totalHeight - stageHeight)) return totalHeight - stageHeight
if (targetY >= (totalHeight - stageHeight)) return totalHeight - stageHeight
return targetY;
}
......@@ -335,7 +338,7 @@ export default class MapScene extends Scene {
updateBox() {
const homeData = getHomeData();
if(homeData.canReceiveTreasureBoxNum <= 0)
if (homeData.canReceiveTreasureBoxNum <= 0)
setGray(this['box']);
this['boxiconWrapper'].visible = homeData.canReceiveTreasureBoxNum > 0;
this['totalStarTxt'].text = `${homeData.totalStars}/${homeData.nextRangeStarsNum}`;
......@@ -348,20 +351,23 @@ export default class MapScene extends Scene {
}
addAvatar(level, ele?) {
const item = MapScene.starHash[level];
const item = MapScene.iconHash[level];
const parent = item.parent;
const avatar = new AvatarComp();
avatar.loadSkin();
avatar.start(ele);
parent.addChild(avatar);
avatar.x = item.x;
avatar.y = item.y - avatar.height;
avatar.x = item.x + 10;
avatar.y = item.y - avatar.height-30;
if(!MapScene.starHash[level].visible ) {
avatar.y = item.y - avatar.height;
}
}
updateFriends() {
NetManager.ins.hc_mapRank(() => {
const hc_mapRank= DataManager.ins.getData('hc_mapRank').data;
if(!hc_mapRank)return;
const hc_mapRank = DataManager.ins.getData('hc_mapRank').data;
if (!hc_mapRank) return;
hc_mapRank.forEach((ele) => {
this.addAvatar(ele.levelNum, ele.rank[0]);
});
......@@ -373,24 +379,24 @@ export default class MapScene extends Scene {
this['goldTxt'].text = `${homeData.wealth}`;
for(let j = 1; j < window['total_level']; j++) {
for (let j = 1; j < window['total_level']; j++) {
this.disableIcon(j + 1);
}
for(let i = 0; i < homeData.levels.length; i++) {
for (let i = 0; i < homeData.levels.length; i++) {
const level = homeData.levels[i];
const star = MapScene.starHash[i + 1];
if(level) {
if (level) {
star.setStar(level.stars);
this.enableIcon(level.levelNum);
} else {
this.disableIcon(level.levelNum);
}
}
if(homeData.levels.length == 0) {
if (homeData.levels.length == 0) {
const star = MapScene.starHash[1];
star.setStar(0);
this.enableIcon(1);
} else if(homeData.levels.length == window['last_level']) {
} else if (homeData.levels.length == window['last_level']) {
} else {
const star = MapScene.starHash[homeData.levels.length + 1];
......@@ -404,11 +410,11 @@ export default class MapScene extends Scene {
updateTimerView() {
//更新倒计时
if(this._countDown == null) {
if (this._countDown == null) {
this._countDown = new CountDown(this['countdown']);
}
const data = getHomeData();
if(data.remainEnargy >= BLOOD_NUMS_MAX) { //满了
if (data.remainEnargy >= BLOOD_NUMS_MAX) { //满了
this._countDown.stop();
this['fullTxt'].visible = true;
......@@ -428,26 +434,26 @@ export default class MapScene extends Scene {
onTap_inviteBtn() {
NetManager.ins.getInviteInfo((success, res) => {
if(!success || !res.data) {
if (!success || !res.data) {
return;
}
let flag = res.data.completeFlag;
switch(true) {
switch (true) {
case (flag == 0): // 未完成
PanelCtrl.instance.show('invite', res.data);
break;
case (flag == 1): // 完成未开奖 待领奖 请求领奖接口
try {
if(window['getRST']) window['getRST']();
} catch(error) {
if (window['getRST']) window['getRST']();
} catch (error) {
console.warn(error)
}
NetManager.ins.acceptInvitationPrize((success, res) => {
if(!success) {
if (!success) {
return;
}
console.log(res.data);
if(res.data.completeFlag == 3) {
if (res.data.completeFlag == 3) {
showToast("哎呀,萌狮开小差啦!\n过会再来看吧!");
} else {
PanelCtrl.instance.show('invitePrize', res.data);
......@@ -460,7 +466,7 @@ export default class MapScene extends Scene {
break;
case (flag == 4): // 可以开启下一次发任务
NetManager.ins.acceptInvitationInfo((success, res) => {
if(!success) {
if (!success) {
return;
}
PanelCtrl.instance.show('invite', res.data);
......@@ -481,17 +487,17 @@ export default class MapScene extends Scene {
*/
getInviteInfo() {
NetManager.ins.getInviteInfo((success, res) => {
if(!success || !res.data) {
if (!success || !res.data) {
return;
}
let flag = res.data.completeFlag;
switch(true) {
switch (true) {
case (flag == 0): // 未完成 显示倒计时
this["inviteGroup"].visible = true;
this["inviteTipsBg"].visible = true;
this["inviteTips"].visible = true;
this.cutTime = res.data.endTime - res.data.sysTime + 1000;
if(this.timer) {
if (this.timer) {
this.timer.stop();
}
this.timer = new egret.Timer(1000, 0);
......@@ -535,7 +541,7 @@ export default class MapScene extends Scene {
// 倒计时
private cutTimer() {
let timer = this.convertTime(this.cutTime -= 1000);
if(timer.hour === "00"
if (timer.hour === "00"
&& timer.min === "00"
&& timer.sec === "00") {
this.timer.stop();
......@@ -622,9 +628,9 @@ export default class MapScene extends Scene {
async onTap_boxLayer() {
NetManager.ins.clickLog(getlogItem(1));
const data = getHomeData();
if(data.canReceiveTreasureBoxNum > 0) {
if (data.canReceiveTreasureBoxNum > 0) {
this['boxLayer'].visible = true;
if(!this._mc)
if (!this._mc)
this._mc = await loadSvga(getResPath() + 'resource/assets/svgas/box.svga', this['boxani']);
this._mc.stop();
this._mc.gotoAndStop(1);
......@@ -636,18 +642,18 @@ export default class MapScene extends Scene {
await wait(50);
this._mc.visible = true;
const a = 100, b = 10;
egret.Tween.get(this._mc, {loop: true}).set({rotation: b})
.to({rotation: -b}, a).to({rotation: b}, a)
.to({rotation: -b}, a).to({rotation: b}, a)
.to({rotation: -b}, a).to({rotation: b}, a)
.to({rotation: 0}, a / 2)
egret.Tween.get(this._mc, { loop: true }).set({ rotation: b })
.to({ rotation: -b }, a).to({ rotation: b }, a)
.to({ rotation: -b }, a).to({ rotation: b }, a)
.to({ rotation: -b }, a).to({ rotation: b }, a)
.to({ rotation: 0 }, a / 2)
.wait(1000);
}
}
async playAni() {
if(this._mc) {
if (this._mc) {
egret.Tween.removeTweens(this._mc);
this._mc.gotoAndPlay(1, true);
await this.onPlaySTOP();
......@@ -658,7 +664,7 @@ export default class MapScene extends Scene {
async onPlaySTOP() {
return new Promise((r) => {
const func = () => {
if(this._mc.currentFrame >= 100) {
if (this._mc.currentFrame >= 100) {
this._mc.removeEventListener(egret.Event.ENTER_FRAME, func, this);
this._mc.stop();
r();
......@@ -677,14 +683,14 @@ export default class MapScene extends Scene {
this['boxani'].touchChildren = false;
await this.playAni();
try {
if(window['getRST']) window['getRST']();
} catch(error) {
if (window['getRST']) window['getRST']();
} catch (error) {
console.warn(error)
}
NetManager.ins.hc_openTreasureBox((success) => {
this['boxani'].touchEnabled = true;
this['boxani'].touchChildren = true;
if(success) {
if (success) {
const boxdata = DataManager.ins.getData('hc_openTreasureBox').data;
const homeData = DataManager.ins.getData('hc_home').data;
homeData.canReceiveTreasureBoxNum = boxdata.canReceiveTreasureBoxNum;
......@@ -694,19 +700,19 @@ export default class MapScene extends Scene {
this.updateBox();
const data = DataManager.ins.getData('hc_openTreasureBox').data;
NetManager.ins.getPlugOrderStatus((s) => {
if(s) {
const data = DataManager.ins.getData('getPlugOrderStatus');
//区分奖品
if(data.lottery && data.lottery.type != 'thanks') {
PanelCtrl.instance.show('box');
} else {
showToast('哎呀!奖励与您擦肩而过!快继续闯关!');
}
if (s) {
const data = DataManager.ins.getData('getPlugOrderStatus');
//区分奖品
if (data.lottery && data.lottery.type != 'thanks') {
PanelCtrl.instance.show('box');
} else {
showToast('哎呀!奖励与您擦肩而过!快继续闯关!');
}
},
} else {
showToast('哎呀!奖励与您擦肩而过!快继续闯关!');
}
},
data.orderNum,
() => {
return DataManager.ins.getData('getPlugOrderStatus').result == 0
......@@ -740,7 +746,7 @@ export default class MapScene extends Scene {
onTap_bloodBtn() {
NetManager.ins.clickLog(getlogItem(2));
if(getHomeData().remainEnargy > 0)
if (getHomeData().remainEnargy > 0)
PanelCtrl.instance.show('bloodPanel')
else
PanelCtrl.instance.show('blood2Panel')
......@@ -762,10 +768,10 @@ export default class MapScene extends Scene {
return 'Map'
}
}
export const getNick = (nickname,max=4) => {
if(!nickname) return nickname;
export const getNick = (nickname, max = 4) => {
if (!nickname) return nickname;
if(nickname.length > max)
if (nickname.length > max)
return nickname.slice(0, max) + '...';
return nickname;
}
\ No newline at end of file
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 getHomeData, { BLOOD_NUMS_MAX } from "../getHomeData";
import { NetManager } from "../../libs/tw/manager/NetManager";
import SceneCtrl from "../../libs/new_wx/ctrls/sceneCtrl";
import { showToast } from "../../libs/new_wx/ctrls/toastCtrl";
import { getlogItem } from "../Main";
import wait from "../../libs/new_tc/wait";
import { showShare } from "../shareCtrl";
import { updateMainTimer } from "../../libs/new_wx/MainBase";
import { NetManager } from "../../libs/tw/manager/NetManager";
import getHomeData, { BLOOD_NUMS_MAX } from "../getHomeData";
import { getShareUrl } from "../getSharePic";
import { iswx } from "../iswx";
import getShowOffPic from "../getShowOffPic";
import getSharePic, { getShareUrl } from "../getSharePic";
import { getlogItem } from "../Main";
import CountDown from "../mapScene/CountDown";
import { updateMainTimer } from "../../libs/new_wx/MainBase";
import { showShare } from "../shareCtrl";
export default class BloodPanel extends Panel {
start(data) {
......
import wait from "../../libs/new_tc/wait";
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 { showToast } from "../../libs/new_wx/ctrls/toastCtrl";
import { getlogItem } from "../Main";
import wait from "../../libs/new_tc/wait";
import { showShare } from "../shareCtrl";
import { updateMainTimer } from "../../libs/new_wx/MainBase";
import { NetManager } from "../../libs/tw/manager/NetManager";
import getHomeData, { BLOOD_NUMS_MAX } from "../getHomeData";
import { getShareUrl } from "../getSharePic";
import { iswx } from "../iswx";
import getShowOffPic from "../getShowOffPic";
import getSharePic, { getShareUrl } from "../getSharePic";
import { getlogItem } from "../Main";
import CountDown from "../mapScene/CountDown";
import { updateMainTimer } from "../../libs/new_wx/MainBase";
import { showShare } from "../shareCtrl";
export default class BloodPanel2 extends Panel {
start(data) {
......
import Panel from "../../libs/new_wx/components/Panel";
import { DataManager } from "../../libs/tw/manager/DataManager";
import { NetManager } from "../../libs/tw/manager/NetManager";
import { getlogItem } from "../Main";
import { DataManager } from "../../libs/tw/manager/DataManager";
import AdSmallComp from "../mapScene/AdSmallComp";
export default class BoxPanel extends 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 { addRankFriendList } from "../mapScene/RankFriendList";
import { changeMapScene } from "../startScene/StartScene";
import { addAdComp } from "./BoxPanel";
export default class FailedPanel extends Panel {
_level;
......@@ -22,7 +20,7 @@ export default class FailedPanel extends Panel {
}, this);
addAdComp(84,674.52,this);
addRankFriendList(84,674.52,this);
}
onTouchTap_closeBtn() {
......
......@@ -24,7 +24,7 @@ export default class FriendItemRenderer extends eui.ItemRenderer {
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['star'].text = `X${this.data.stars}`;
this.progress.textFlow = (new egret.HtmlTextParser).parser(
......
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 { NetManager } from "../../libs/tw/manager/NetManager";
import { iswx } from "../iswx";
import { getNick } from "../mapScene/MapScene";
import { showShare3 } from "../shareCtrl3";
import FriendItemRenderer from "./FriendItemRenderer";
import { getFriendShareUrl } from "../getFriendSharePic";
export default class FriendPanel extends Panel {
public list: eui.List;
......@@ -23,17 +26,17 @@ export default class FriendPanel extends Panel {
this['empty'].visible = false;
NetManager.ins.hc_totalNumRank(() => {
let { data: hc_totalNumRank } = DataManager.ins.getData('hc_totalNumRank');
if(hc_totalNumRank==null) {
if (hc_totalNumRank == null) {
hc_totalNumRank = {}
}
const { rank, userRank } = hc_totalNumRank;
const { rank, userRank } = hc_totalNumRank;
if (userRank) {
this.progress.textFlow = (new egret.HtmlTextParser).parser(
`第<font color=0xfff000><b>${userRank.levelNum}</b></font>关`);
this.score.textFlow = (new egret.HtmlTextParser).parser(
`<font color=0xfff000><b>${userRank.maxScore}</b></font>分`);
this['rankTxt'].text = userRank.rank
this['star'].text = `X${userRank.stars}`
this['rankTxt'].text = userRank.rank
this['star'].text = `X${userRank.stars}`
}
if (rank && rank.length > 0) {
......@@ -53,15 +56,15 @@ export default class FriendPanel extends Panel {
this['avatar0'].visible = false;
this['nameTxt'].text = '';
this['nameTxt0'].text = '';
NetManager.ins.hc_userInfo(() => {
this['avatar'].visible = true;
this['avatar0'].visible = true;
const { data } = DataManager.ins.getData('hc_userInfo');
this['avatar'].source = this['avatar0'].source = data.avatar;
this['nameTxt'].text = getNick(data.nickname);
this['nameTxt0'].text = getNick(data.nickname,10);
this['nameTxt'].text = getNick(data.nickname,10);
this['nameTxt0'].text = getNick(data.nickname, 10);
});
}
......@@ -77,7 +80,12 @@ export default class FriendPanel extends Panel {
}
onTapInvite() {
console.log('onTapInvite')
console.log('onTapInvite');
if (iswx()) {
getFriendShareUrl(this.stage);
} else
showShare3();
}
protected get closeBtns(): eui.Button[] { return [this['closeBtn']] }
......
import wait from "../../libs/new_tc/wait";
import Panel from "../../libs/new_wx/components/Panel";
import { DataManager } from "../../libs/tw/manager/DataManager";
import { NetManager } from "../../libs/tw/manager/NetManager";
import getShowOffPic from "../getShowOffPic";
import { iswx } from "../iswx";
import { getlogItem } from "../Main";
import SceneCtrl from "../../libs/new_wx/ctrls/sceneCtrl";
import { ModuleTypes } from "../../libs/new_wx/types/sceneTypes";
import { addRankFriendList } from "../mapScene/RankFriendList";
import setGray from "../setGray";
import getShowOffPic from "../getShowOffPic";
import { showShare } from "../shareCtrl";
import { iswx } from "../iswx";
import wait from "../../libs/new_tc/wait";
import { changeMapScene } from "../startScene/StartScene";
import { addAdComp } from "./BoxPanel";
export default class Prize2Panel extends Panel {
_level;
......@@ -47,7 +45,7 @@ export default class Prize2Panel extends Panel {
const hc_submitData = DataManager.ins.getData('hc_submit').data;
this.setStar(hc_submitData.stars);
addAdComp(84,849.52,this);
addRankFriendList(84,849.52,this);
}
showlog() {
......
......@@ -16,41 +16,24 @@ import { showShare } from "../shareCtrl";
import { Chapters } from "../something/Chapters";
import { ElementType } from "../something/enum/ElementType";
import { PassType } from "../something/enum/PassType";
import FriendItem2Renderer from "./FriendItem2Renderer";
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 {
static currlevel;
private _level;
private list: eui.List;
public friendlist: eui.List;
start(data) {
super.start();
this.friendlist.useVirtualLayout = false;
this.friendlist.itemRenderer = FriendItem2Renderer;
this.friendlist.visible = false;
this['empty'].visible = false;
const homedata = getHomeData();
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)
if (data > homedata.levels.length) {
addAdComp(84, 925, this)
}
else
addRankFriendList(84, 925, this,data);
setGlow(this['levelTxt'], 0xfa4b09, 1);
this['levelTxt'].text = `第${data}关`;
......@@ -148,6 +131,7 @@ export default class StartPanel extends Panel {
// Loading.instace.hide();
this.hidePanel();
SceneCtrl.instance.change(ModuleTypes.MAIN_SCENE, { chapter: this._level });
StartPanel.currlevel=this._level
}
}, this._level);
......
......@@ -3,21 +3,21 @@ import layers from "../libs/new_wx/views/layers";
import getHomeData from "./getHomeData";
import { iswx } from "./iswx";
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');
img.style.display = 'none';
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() {
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.height = this.stage.stageHeight;
}, this);
......@@ -27,45 +27,39 @@ class Share3 extends ComponentBase {
}, this);
const data = getHomeData();
this['tipsTxt0'].text = `超过了${Math.ceil(Math.random() * 100)}%的好友`;
this['lvTxt'].text = data.levels.length == 0 ? 1 : data.levels.length;
this['lvTxt0'].text = data.levels.length;
this['btn1'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
if(iswx()) { //微信端
if (iswx()) { //微信端
} else {//端内
this.getFunc('2');//朋友圈
this.shareFunc('2');//朋友圈
}
hideShare3();
}, this);
this['btn2'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
if(iswx()) { //微信端
if (iswx()) { //微信端
} else {//端内
this.getFunc('1');//好友微信
this.shareFunc('1');//好友微信
}
hideShare3();
}, this);
}
//channel 1 好友 2 朋友圈
getFunc(channel: string) {
// let base64;
// if(this.type==1)
// base64= getPrintScreenData(this['pic' + this.type], 0, 0, 579, 866);
// else
// base64= getPrintScreenData(this['pic' + this.type], 0, 0, 600, 965);
// NetManager.ins.imgUrl((success) => {
// const data = DataManager.ins.getData('imgURL');
shareFunc(channel: string) {
Loading.instace.show();
const base64 = getPrintScreenData(this['pic'], 0, 0, 579, 864);
NetManager.ins.imgUrl((success) => {
const data = DataManager.ins.getData('imgURL');
img.src = data.data;
// img.src = base64;
// img.src = data.data;
if(this.type==1)
callShareApi('https://yun.duiba.com.cn/db_games/xxshareshare2.jpg', channel);
else
callShareApi('https://yun.duiba.com.cn/db_games/xxlshare.jpg', channel);
// }, base64);
callShareApi(data.data, channel);
Loading.instace.hide();
}, base64);
}
get skinKey() {
......@@ -83,15 +77,15 @@ const initShare = () => {
layer.addChild(share);
_share = share;
};
const showShare3 = (type) => {
if(!inited) {
export const showShare3 = () => {
if (!inited) {
initShare();
inited = true;
}
_share.setType(type);
layers.shareLayer.visible = true;
}
const hideShare3 = () => {
export const hideShare3 = () => {
layers.shareLayer.visible = false;
}
......@@ -5,7 +5,7 @@
"timestamp":1566199822308,
"data":{
"popupAdvert":{
"enable":true,
"enable":0,
"advertList":[
{
"img":"http://yun.dui88.com/images/201909/lsh4tdkp5n.jpg",
......@@ -18,7 +18,7 @@
]
},
"noticeAdvert":{
"enable":true,
"enable":0,
"advertList":[
{
"img":"http://yun.dui88.com/images/201909/lsh4tdkp5n.jpg",
......@@ -31,7 +31,7 @@
]
},
"mapAdvert":{
"enable":false,
"enable":0,
"advertList":[
{
"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