Commit d58ce7f5 authored by zhangjinzhou's avatar zhangjinzhou

Merge branch '拆home接口分页' of http://gitlab2.dui88.com/wanghongyuan/xiaoxiaole into dev

parents 673bf820 a1677f30
...@@ -82,6 +82,7 @@ import HelpBloodPanel from "../../src/panels/help/HelpBloodPanel"; ...@@ -82,6 +82,7 @@ import HelpBloodPanel from "../../src/panels/help/HelpBloodPanel";
import HelpInvitePanel from "../../src/panels/help/HelpInvitePanel"; import HelpInvitePanel from "../../src/panels/help/HelpInvitePanel";
import HelpScratchPanel from "../../src/panels/help/HelpScratchPanel"; import HelpScratchPanel from "../../src/panels/help/HelpScratchPanel";
import HelpInvitePanel2 from "../../src/panels/help/HelpInvitePanel2"; import HelpInvitePanel2 from "../../src/panels/help/HelpInvitePanel2";
import levelHomeData from "../../src/levelHomeData";
export default class MainBase extends eui.UILayer { export default class MainBase extends eui.UILayer {
constructor() { constructor() {
...@@ -97,7 +98,7 @@ export default class MainBase extends eui.UILayer { ...@@ -97,7 +98,7 @@ export default class MainBase extends eui.UILayer {
// 功能。 // 功能。
// 0:隐藏 // 0:隐藏
// 1:不隐藏 // 1:不隐藏
window['SNNativeClient']&&window['SNNativeClient'].setNavigationHiden(0); window['SNNativeClient'] && window['SNNativeClient'].setNavigationHiden(0);
} else { } else {
// 1.页面引入 // 1.页面引入
// http://res.suning.cn/project/mvs/RES/common/script/android/sneapp.js // http://res.suning.cn/project/mvs/RES/common/script/android/sneapp.js
...@@ -339,7 +340,7 @@ export default class MainBase extends eui.UILayer { ...@@ -339,7 +340,7 @@ export default class MainBase extends eui.UILayer {
RES.getResAsync("ele46_6_png"); RES.getResAsync("ele46_6_png");
RES.getResAsync("ele46_sz_png"); RES.getResAsync("ele46_sz_png");
for (var i = 1; i <= 27; i++) { for (var i = 1; i <= 27; i++) {
RES.getResAsync("bonusFra" + i + "_png") RES.getResAsync("bonusFra" + i + "_png")
} }
...@@ -553,7 +554,7 @@ export default class MainBase extends eui.UILayer { ...@@ -553,7 +554,7 @@ export default class MainBase extends eui.UILayer {
return new Promise((r) => { return new Promise((r) => {
NetManager.ins.hc_advert(() => { NetManager.ins.hc_advert(() => {
r(); r();
},3) }, 3)
}); });
} }
...@@ -605,11 +606,15 @@ export default class MainBase extends eui.UILayer { ...@@ -605,11 +606,15 @@ export default class MainBase extends eui.UILayer {
} }
protected async createGameScene() { protected async createGameScene() {
window['getaward'] = () => { getRedBombAward((param) => { console.log(param) }) }; window['getaward'] = () => { getRedBombAward((param) => { console.log(param) }) };
localStorage.setItem('taskCenter' + window['CFG'].consumerId, 'true'); // 任务中心强提示,每次进入游戏只强提示一次 localStorage.setItem('taskCenter' + window['CFG'].consumerId, 'true'); // 任务中心强提示,每次进入游戏只强提示一次
await this.hcHome(); await this.hcHome();
let playerlevel = getHomeData().playerlevel;
console.error("玩家level===>", playerlevel);
await levelHomeData.initMapLevelData();
console.log("获取到玩家level数据==>");
await Promise.all([ await Promise.all([
// this.getAd(), // this.getAd(),
this.ajaxElement(), this.ajaxElement(),
...@@ -621,25 +626,25 @@ export default class MainBase extends eui.UILayer { ...@@ -621,25 +626,25 @@ export default class MainBase extends eui.UILayer {
this.hbRainBaseInfo(), this.hbRainBaseInfo(),
]); ]);
if(GFun.isIOS){ if (GFun.isIOS) {
}else{ } else {
console.log("苏宁安卓开始准备"); console.log("苏宁安卓开始准备");
if(!window['baseApi']){ if (!window['baseApi']) {
await new Promise((resolve,reject)=>{ await new Promise((resolve, reject) => {
// let t1 = setTimeout(() => { // let t1 = setTimeout(() => {
// console.log("苏宁准备失败"); // console.log("苏宁准备失败");
// resolve(); // resolve();
// }, 6000); // }, 6000);
document.addEventListener("deviceready", function() { document.addEventListener("deviceready", function () {
console.log("苏宁baseapi准备完毕222"); console.log("苏宁baseapi准备完毕222");
// clearTimeout(t1); // clearTimeout(t1);
resolve(); resolve();
}.bind(this), false); }.bind(this), false);
}) })
console.log("游戏继续"); console.log("游戏继续");
}else{ } else {
console.log("已经获得baseapi,游戏继续"); console.log("已经获得baseapi,游戏继续");
} }
} }
...@@ -655,6 +660,10 @@ export default class MainBase extends eui.UILayer { ...@@ -655,6 +660,10 @@ export default class MainBase extends eui.UILayer {
/////////// ///////////
SceneCtrl.instance.change(ModuleTypes.START_SCENE, this.svgaList); SceneCtrl.instance.change(ModuleTypes.START_SCENE, this.svgaList);
NetManager.ins.hc_home((s, data) => {
console.log("更新用户信息", s, data)
}, window['collectRuleId']);
NetManager.ins.getShareInfo(() => { NetManager.ins.getShareInfo(() => {
const result = DataManager.ins.getData('getShareInfo'); const result = DataManager.ins.getData('getShareInfo');
window['registerWX'](result); window['registerWX'](result);
...@@ -676,6 +685,7 @@ export default class MainBase extends eui.UILayer { ...@@ -676,6 +685,7 @@ export default class MainBase extends eui.UILayer {
// if(timerInit) { // if(timerInit) {
NetManager.ins.hc_home(() => { NetManager.ins.hc_home(() => {
updateMainTimer(); updateMainTimer();
//更新bloodpanel和mapscene //更新bloodpanel和mapscene
const currentScene = SceneCtrl.instance.currentScene; const currentScene = SceneCtrl.instance.currentScene;
...@@ -745,8 +755,13 @@ export const updateMainTimer = () => { ...@@ -745,8 +755,13 @@ export const updateMainTimer = () => {
} }
} }
export const updateMainTimerAfterGetData = () => { export const updateMainTimerAfterGetData = (chapter = -1) => {
NetManager.ins.hc_home(() => { NetManager.ins.hc_home(() => {
if (chapter != -1) {
//更新地图关卡数据
levelHomeData.updateLevelData(chapter)
}
updateMainTimer(); updateMainTimer();
}, window['collectRuleId']); }, window['collectRuleId']);
} }
\ No newline at end of file
...@@ -105,14 +105,13 @@ export default class SceneCtrl { ...@@ -105,14 +105,13 @@ export default class SceneCtrl {
scene.start(data); scene.start(data);
if(oldScene){ if(oldScene){
console.log("移除scene------------",oldScene.skinName);
oldScene.parent&&oldScene.parent.removeChild(oldScene); oldScene.parent&&oldScene.parent.removeChild(oldScene);
oldScene.destroy(); oldScene.destroy();
oldScene = null; oldScene = null;
} }
}, this); }, this);
scene.onLoad().then(() => { scene.onLoad().then(() => {
// console.log("onLoad---after",scene.skinName);
this.addToStage(scene); this.addToStage(scene);
onComplete && onComplete(); onComplete && onComplete();
}); });
......
...@@ -629,6 +629,7 @@ export class DataManager extends ABDataManager { ...@@ -629,6 +629,7 @@ export class DataManager extends ABDataManager {
} }
getData(name) { getData(name) {
// console.log(name,this[this.getKey(name)]);
return this[this.getKey(name)] return this[this.getKey(name)]
} }
......
...@@ -486,7 +486,7 @@ export class NetManager extends ABNetManager { ...@@ -486,7 +486,7 @@ export class NetManager extends ABNetManager {
var sgin = this.encrypt(JSON.stringify(data)); var sgin = this.encrypt(JSON.stringify(data));
const net: INetData = { const net: INetData = {
name: 'hc_submit', name: 'hc_submit',
uri: window['duiba'] + '/hdtool/happyclear/submit', uri: window['duiba'] + '/hdtool/happyclear/submitNew',
type: 'post', type: 'post',
dataType: 'json', dataType: 'json',
param: { param: {
...@@ -510,7 +510,7 @@ export class NetManager extends ABNetManager { ...@@ -510,7 +510,7 @@ export class NetManager extends ABNetManager {
hc_openTreasureBox(callback: Function): void { hc_openTreasureBox(callback: Function): void {
const net: INetData = { const net: INetData = {
name: 'hc_openTreasureBox', name: 'hc_openTreasureBox',
uri: window['duiba'] + '/customActivity/happyclear/openTreasureBox', uri: window['duiba'] + '/customActivity/happyclear/openTreasureBoxNew',//openTreasureBox
type: 'post', type: 'post',
dataType: 'json', dataType: 'json',
param: { param: {
...@@ -872,7 +872,7 @@ export class NetManager extends ABNetManager { ...@@ -872,7 +872,7 @@ export class NetManager extends ABNetManager {
public hc_home(callback: Function, collectRuleId: number): void { public hc_home(callback: Function, collectRuleId: number): void {
const net: INetData = { const net: INetData = {
name: 'hc_home', name: 'hc_home',
uri: window['duiba'] + '/customActivity/happyclear/home', uri: window['duiba'] + '/customActivity/happyclear/homeNew',//home
type: 'get', type: 'get',
dataType: 'json', dataType: 'json',
param: { param: {
...@@ -1194,7 +1194,7 @@ export class NetManager extends ABNetManager { ...@@ -1194,7 +1194,7 @@ export class NetManager extends ABNetManager {
const net: INetData = { const net: INetData = {
name: 'hc_doJoin', name: 'hc_doJoin',
uri: window['duiba'] + '/hdtool/happyclear/doJoin', uri: window['duiba'] + '/hdtool/happyclear/doJoinNew',
type: 'post', type: 'post',
dataType: 'json', dataType: 'json',
param: param, param: param,
...@@ -1403,7 +1403,7 @@ export class NetManager extends ABNetManager { ...@@ -1403,7 +1403,7 @@ export class NetManager extends ABNetManager {
public hc_totalNumRank(callback: Function): void { public hc_totalNumRank(callback: Function): void {
const net: INetData = { const net: INetData = {
name: 'hc_totalNumRank', name: 'hc_totalNumRank',
uri: window['duiba'] + '/customActivity/happyclear/totalNumRank', uri: window['duiba'] + '/customActivity/happyclear/totalNumRankNew',
type: 'get', type: 'get',
dataType: 'json', dataType: 'json',
param: { param: {
...@@ -1418,7 +1418,7 @@ export class NetManager extends ABNetManager { ...@@ -1418,7 +1418,7 @@ export class NetManager extends ABNetManager {
public hc_mapRank(callback: Function): void { public hc_mapRank(callback: Function): void {
const net: INetData = { const net: INetData = {
name: 'hc_mapRank', name: 'hc_mapRank',
uri: window['duiba'] + '/customActivity/happyclear/mapRank', uri: window['duiba'] + '/customActivity/happyclear/mapRankNew',
type: 'get', type: 'get',
dataType: 'json', dataType: 'json',
param: { param: {
...@@ -2605,4 +2605,21 @@ export class NetManager extends ABNetManager { ...@@ -2605,4 +2605,21 @@ export class NetManager extends ABNetManager {
}; };
this.send(net); this.send(net);
} }
public hc_levelhome(callback: Function, pageNo:Number,pageSize:Number): void {
let reqpageno = Number(pageNo)+1;
const net: INetData = {
name: 'hc_levelhome',
uri: window['duiba'] + '/customActivity/happyclear/findConsumerRecords',
type: 'get',
dataType: 'json',
param: {
activityId: DataManager.ins.customCfgData.actId,
pageNo:reqpageno,
pageSize:pageSize
},
callback: callback
};
this.send(net);
}
} }
\ No newline at end of file
...@@ -9,7 +9,7 @@ class FriendWxShare extends ComponentBase { ...@@ -9,7 +9,7 @@ class FriendWxShare extends ComponentBase {
start(rank) { start(rank) {
const data = getHomeData(); const data = getHomeData();
this['ranktxt'].text =`我在好友中排名第${rank}`; this['ranktxt'].text =`我在好友中排名第${rank}`;
this['lvTxt'].text = data.levels.length == 0 ? 1 : data.levels.length; this['lvTxt'].text = data.playerlevel == 0 ? 1 : data.playerlevel;
this['avatar'].mask = this['avatarMask']; this['avatar'].mask = this['avatarMask'];
const { data: user } = DataManager.ins.getData('hc_userInfo'); const { data: user } = DataManager.ins.getData('hc_userInfo');
this['avatar'].source = user.avatar; this['avatar'].source = user.avatar;
......
import { DataManager } from "../libs/tw/manager/DataManager"; import { DataManager } from "../libs/tw/manager/DataManager";
interface IHomeData { interface IHomeData {
levels:{levelNum,maxScore,stars}[]; // levels:{levelNum,maxScore,stars}[];
playerlevel:number;
totalStars; totalStars;
canReceiveTreasureBoxNum; canReceiveTreasureBoxNum;
isGetAllTreasureBox; isGetAllTreasureBox;
......
...@@ -7,7 +7,7 @@ import { DataManager } from "../libs/tw/manager/DataManager"; ...@@ -7,7 +7,7 @@ import { DataManager } from "../libs/tw/manager/DataManager";
class Share extends ComponentBase { class Share extends ComponentBase {
start() { start() {
const data = getHomeData(); const data = getHomeData();
this['lvTxt'].text = data.levels.length ==0 ? 1 : data.levels.length; this['lvTxt'].text = data.playerlevel ==0 ? 1 : data.playerlevel;
} }
get skinKey() { return 'Share' } get skinKey() { return 'Share' }
......
...@@ -5,7 +5,7 @@ class ShowOff extends ComponentBase { ...@@ -5,7 +5,7 @@ class ShowOff extends ComponentBase {
pic; pic;
start() { start() {
const data = getHomeData(); const data = getHomeData();
this['lvTxt'].text = data.levels.length; this['lvTxt'].text = data.playerlevel;
this['tipsTxt'].text = `超过了${Math.ceil(Math.random() * 100)}%的好友`; this['tipsTxt'].text = `超过了${Math.ceil(Math.random() * 100)}%的好友`;
} }
......
import SceneCtrl from "../libs/new_wx/ctrls/sceneCtrl";
import { NetManager } from "../libs/tw/manager/NetManager";
import getHomeData from "./getHomeData";
import MapBottomPart from "./mapScene/MapBottomPart";
import MapRpeatPart from "./mapScene/MapRpeatPart";
import MapTopPart from "./mapScene/MapTopPart";
export default class levelHomeData {
static leveldata = {};
static getlevelData(idx) {
idx += 1;
if (this.leveldata[idx]) {
return this.leveldata[idx].stars;
} else {
console.error("未取到对应数据===》", idx);
return 1;
}
}
static async getPageLevelData(idx, pagesize = 30) {
return new Promise((r) => {
let playerlevel = getHomeData().playerlevel;
if(idx>playerlevel){
return r();
}
let chalevel = playerlevel - idx;
let pageno = Math.floor(chalevel / pagesize);
let startidx = playerlevel - pageno * pagesize;
let endidx = startidx - pagesize;
if (endidx < 0) {
endidx = 0;
}
let shouldget = false;
for (let i1 = endidx+1; i1 < startidx; i1++) {
if (!this.leveldata[i1]) {
// console.log("33",this.leveldata[i1],this.leveldata,i1);
shouldget = true;
break;
}
}
if (!shouldget) {
// console.error("已存在,不必请求");
return r();
}else{
// console.error("还需要请求=====》",endidx,startidx,idx,this.leveldata);
}
NetManager.ins.hc_levelhome((s, data) => {
// console.error("hc_levelhome",s,data);
if (s) {
if (data && data.data) {
let levels = data.data;
let levelsleng = levels.length - 1;
let j=0;
for (let i = levelsleng; i > -1; i--) {
let idata = levels[i];
this.leveldata[startidx-j] = idata;
j++;
}
if(idx==8){
if(!this.leveldata[1]){
this.getPageLevelData(1);
}
}
}
// console.log("getPageLevelData",this.leveldata);
// console.error("请求一次page", pageno);
// console.log("获取levelData===>", this.leveldata.length, pageno);
}
r();
}, pageno, pagesize);
return;
})
}
static updateLevelData(idx, pagesize = 30) {
let playerlevel = getHomeData().playerlevel;
let chalevel = playerlevel-idx;
let pageno = Math.floor(chalevel/pagesize);
let startidx = playerlevel-pageno*pagesize;
NetManager.ins.hc_levelhome((s,data)=>{
if(s){
if(data&&data.data){
let levels = data.data;
let levelsleng = levels.length-1;
let j=0;
for(let i=levelsleng;i>-1;i--){
let idata = levels[i];
this.leveldata[startidx-j]=idata;
j++;
}
}
// console.log("updateLevelData",this.leveldata);
// try{
// if(SceneCtrl.instance.mapscene){
// // console.log("updateLevelData更新mapscene");
// // SceneCtrl.instance.mapscene.updateScene();
// }
// }catch(e){
// }
}
},pageno,pagesize);
return;
// let pageno = Math.ceil(idx / pagesize);
// let startidx = pagesize * (pageno - 1);
// NetManager.ins.hc_levelhome((s, data1) => {
// if (s) {
// let data = data1;
// if (data && data.data && data.data.levels) {
// let levels = data.data.levels;
// let levelsleng = levels.length - 1;
// for (let i = levelsleng; i > -1; i--) {
// let idata = levels[i];
// this.leveldata[i + startidx] = idata;
// }
// }
// }
// }, pageno, pagesize);
}
static async initMapLevelData() {
let playerlevel = getHomeData().playerlevel;
if(playerlevel>30){
if(playerlevel>60){
await this.getPageLevelData(8);
}
await this.getPageLevelData(playerlevel-30);
}
await this.getPageLevelData(playerlevel);
}
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
...@@ -64,12 +64,12 @@ export default class HbNoPrize extends Panel { ...@@ -64,12 +64,12 @@ export default class HbNoPrize extends Panel {
onTouchOK() { onTouchOK() {
NetManager.ins.clickLog(getlogItem(60)); NetManager.ins.clickLog(getlogItem(60));
if((getHomeData().levels.length + 1) > window['last_level']) { if((getHomeData().playerlevel + 1) > window['last_level']) {
changeMapScene(); changeMapScene();
super.hidePanel(); super.hidePanel();
return; return;
} }
PanelCtrl.instance.show("StartPanel", getHomeData().levels.length + 1); PanelCtrl.instance.show("StartPanel", getHomeData().playerlevel + 1);
} }
protected get closeBtns(): eui.Button[] { protected get closeBtns(): eui.Button[] {
......
...@@ -50,12 +50,12 @@ export default class HbNoPrize extends Panel { ...@@ -50,12 +50,12 @@ export default class HbNoPrize extends Panel {
onTouchOK() { onTouchOK() {
NetManager.ins.clickLog(getlogItem(60)); NetManager.ins.clickLog(getlogItem(60));
if((getHomeData().levels.length + 1) > window['last_level']) { if((getHomeData().playerlevel + 1) > window['last_level']) {
changeMapScene(); changeMapScene();
super.hidePanel(); super.hidePanel();
return; return;
} }
PanelCtrl.instance.show("StartPanel", getHomeData().levels.length + 1); PanelCtrl.instance.show("StartPanel", getHomeData().playerlevel + 1);
} }
protected get closeBtns(): eui.Button[] { protected get closeBtns(): eui.Button[] {
......
...@@ -94,12 +94,12 @@ export default class HbPrize extends Panel { ...@@ -94,12 +94,12 @@ export default class HbPrize extends Panel {
onTouchOK() { onTouchOK() {
NetManager.ins.clickLog(getlogItem(59)); NetManager.ins.clickLog(getlogItem(59));
if ((getHomeData().levels.length + 1) > window['last_level']) { if ((getHomeData().playerlevel + 1) > window['last_level']) {
changeMapScene(); changeMapScene();
super.hidePanel(); super.hidePanel();
return; return;
} }
PanelCtrl.instance.show("StartPanel", getHomeData().levels.length + 1); PanelCtrl.instance.show("StartPanel", getHomeData().playerlevel + 1);
} }
protected get closeBtns(): eui.Button[] { protected get closeBtns(): eui.Button[] {
......
...@@ -49,13 +49,13 @@ export default class InviteCutTimePanel extends Panel { ...@@ -49,13 +49,13 @@ export default class InviteCutTimePanel extends Panel {
} }
onTouchOK() { onTouchOK() {
if((getHomeData().levels.length + 1) > window['last_level']) { if((getHomeData().playerlevel + 1) > window['last_level']) {
changeMapScene(); changeMapScene();
super.hidePanel(); super.hidePanel();
return; return;
} }
GDispatcher.dispatchEvent("getInviteInfo"); GDispatcher.dispatchEvent("getInviteInfo");
PanelCtrl.instance.show("StartPanel", getHomeData().levels.length + 1); PanelCtrl.instance.show("StartPanel", getHomeData().playerlevel + 1);
} }
initUI() { initUI() {
......
...@@ -50,13 +50,13 @@ export default class InvitePrizePanel extends Panel { ...@@ -50,13 +50,13 @@ export default class InvitePrizePanel extends Panel {
} }
onTouchOK() { onTouchOK() {
if((getHomeData().levels.length + 1) > window['last_level']) { if((getHomeData().playerlevel + 1) > window['last_level']) {
changeMapScene(); changeMapScene();
super.hidePanel(); super.hidePanel();
return; return;
} }
GDispatcher.dispatchEvent("getInviteInfo"); GDispatcher.dispatchEvent("getInviteInfo");
PanelCtrl.instance.show("StartPanel", getHomeData().levels.length + 1); PanelCtrl.instance.show("StartPanel", getHomeData().playerlevel + 1);
} }
onTapGoPrize() { onTapGoPrize() {
......
...@@ -56,12 +56,12 @@ export default class ScratchPrizePanel extends Panel { ...@@ -56,12 +56,12 @@ export default class ScratchPrizePanel extends Panel {
window.location.href = window['__link__']; window.location.href = window['__link__'];
break; break;
case (e.target == this.game_btn): // 继续闯关 case (e.target == this.game_btn): // 继续闯关
if((getHomeData().levels.length + 1) > window['last_level']) { if((getHomeData().playerlevel + 1) > window['last_level']) {
changeMapScene(); changeMapScene();
super.hidePanel(); super.hidePanel();
return; return;
} }
PanelCtrl.instance.show("StartPanel", getHomeData().levels.length + 1); PanelCtrl.instance.show("StartPanel", getHomeData().playerlevel + 1);
break; break;
default: default:
......
...@@ -44,7 +44,7 @@ export default class StartPanel extends Panel { ...@@ -44,7 +44,7 @@ export default class StartPanel extends Panel {
}, DataManager.ins.getData("getUserShareCode").data) }, DataManager.ins.getData("getUserShareCode").data)
} }
if(data > homedata.levels.length) { if(data > homedata.playerlevel) {
addAdComp(68, 890+10, this, 29); addAdComp(68, 890+10, this, 29);
NetManager.ins.showLog(getlogItem(29)); NetManager.ins.showLog(getlogItem(29));
} else } else
......
...@@ -32,12 +32,12 @@ export default class TaskCenterNoPrize extends Panel { ...@@ -32,12 +32,12 @@ export default class TaskCenterNoPrize extends Panel {
this.btn.addEventListener(egret.TouchEvent.TOUCH_TAP, () => { this.btn.addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
if(taskData.status == 1) { if(taskData.status == 1) {
// 去闯关 // 去闯关
if((getHomeData().levels.length + 1) > window['last_level']) { if((getHomeData().playerlevel + 1) > window['last_level']) {
changeMapScene(); changeMapScene();
super.hidePanel(); super.hidePanel();
return; return;
} }
PanelCtrl.instance.show("StartPanel", getHomeData().levels.length + 1); PanelCtrl.instance.show("StartPanel", getHomeData().playerlevel + 1);
} else { } else {
window.open(taskData.appIncompletelink); window.open(taskData.appIncompletelink);
super.hidePanel(); super.hidePanel();
......
...@@ -35,12 +35,12 @@ export default class TaskCenterPrize extends Panel { ...@@ -35,12 +35,12 @@ export default class TaskCenterPrize extends Panel {
if(taskData.status == 1) { if(taskData.status == 1) {
NetManager.ins.clickLog(getlogItem(66)); NetManager.ins.clickLog(getlogItem(66));
// 去闯关 // 去闯关
if((getHomeData().levels.length + 1) > window['last_level']) { if((getHomeData().playerlevel + 1) > window['last_level']) {
changeMapScene(); changeMapScene();
super.hidePanel(); super.hidePanel();
return; return;
} }
PanelCtrl.instance.show("StartPanel", getHomeData().levels.length + 1); PanelCtrl.instance.show("StartPanel", getHomeData().playerlevel + 1);
} else { } else {
window.location.href = taskData.appIncompletelink; window.location.href = taskData.appIncompletelink;
super.hidePanel(); super.hidePanel();
......
...@@ -7,7 +7,7 @@ import PanelCtrl from "../../libs/new_wx/ctrls/panelCtrl"; ...@@ -7,7 +7,7 @@ import PanelCtrl from "../../libs/new_wx/ctrls/panelCtrl";
export const gotoNextLevel = (currentLevel?) => { export const gotoNextLevel = (currentLevel?) => {
    if (!currentLevel) {     if (!currentLevel) {
        currentLevel = getHomeData().levels.length;         currentLevel = getHomeData().playerlevel;
    }     }
    const onMapScene = SceneCtrl.instance.currentScene instanceof MapScene;     const onMapScene = SceneCtrl.instance.currentScene instanceof MapScene;
......
...@@ -31,8 +31,8 @@ class Share2 extends ComponentBase { ...@@ -31,8 +31,8 @@ class Share2 extends ComponentBase {
const data = getHomeData(); const data = getHomeData();
this['tipsTxt0'].text = `超过了${Math.ceil(Math.random() * 100)}%的好友`; this['tipsTxt0'].text = `超过了${Math.ceil(Math.random() * 100)}%的好友`;
this['lvTxt'].text = data.levels.length == 0 ? 1 : data.levels.length; this['lvTxt'].text = data.playerlevel == 0 ? 1 : data.playerlevel;
this['lvTxt0'].text = data.levels.length; this['lvTxt0'].text = data.playerlevel;
this['btn1'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => { this['btn1'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
if(iswx()) { //微信端 if(iswx()) { //微信端
......
...@@ -30,7 +30,7 @@ class Share3 extends ComponentBase { ...@@ -30,7 +30,7 @@ class Share3 extends ComponentBase {
const data = getHomeData(); const data = getHomeData();
this['lvTxt'].text = data.levels.length == 0 ? 1 : data.levels.length; this['lvTxt'].text = data.playerlevel == 0 ? 1 : data.playerlevel;
this['btn1'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => { this['btn1'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
if (iswx()) { //微信端 if (iswx()) { //微信端
......
...@@ -166,7 +166,9 @@ export const changeMapScene = (p?) => { ...@@ -166,7 +166,9 @@ export const changeMapScene = (p?) => {
const data = createData(); const data = createData();
if (p) if (p)
data.level = p.level; data.level = p.level;
SceneCtrl.instance.change(ModuleTypes.MAP_SCENE, data); SceneCtrl.instance.change(ModuleTypes.MAP_SCENE, data,function(){
SceneCtrl.instance.mapscene.awakeShow();
});
} }
let _startSceneData; let _startSceneData;
......
...@@ -27,7 +27,7 @@ const config = { ...@@ -27,7 +27,7 @@ const config = {
'/customActivity/happyclear/bigWheel/dojoin': { '/customActivity/happyclear/bigWheel/dojoin': {
data: './happyclear/turnabledojoin.json' data: './happyclear/turnabledojoin.json'
}, },
'/customActivity/happyclear/totalNumRank': { '/customActivity/happyclear/totalNumRankNew': {
data: './happyclear/totalNumRank.json' data: './happyclear/totalNumRank.json'
}, },
'/customActivity/happyclear/userInfo': { '/customActivity/happyclear/userInfo': {
...@@ -36,7 +36,7 @@ const config = { ...@@ -36,7 +36,7 @@ const config = {
'/customActivity/happyclear/levelNumRank': { '/customActivity/happyclear/levelNumRank': {
data: './happyclear/levelNumRank.json' data: './happyclear/levelNumRank.json'
}, },
'/customActivity/happyclear/mapRank': { '/customActivity/happyclear/mapRankNew': {
data: './happyclear/mapRank.json' data: './happyclear/mapRank.json'
}, },
'/customActivity/happyclear/advert': { '/customActivity/happyclear/advert': {
...@@ -54,10 +54,10 @@ const config = { ...@@ -54,10 +54,10 @@ const config = {
'/wechatShare/getShareInfo/v2': { '/wechatShare/getShareInfo/v2': {
data: './happyclear/openTreasureBox.json' data: './happyclear/openTreasureBox.json'
}, },
'/customActivity/happyclear/openTreasureBox': { '/customActivity/happyclear/openTreasureBoxNew': {
data: './happyclear/openTreasureBox.json' data: './happyclear/openTreasureBox.json'
}, },
'/customActivity/happyclear/home': { '/customActivity/happyclear/homeNew': {
data: './happyclear/home.json' data: './happyclear/home.json'
}, },
'/customActivity/happyclear/getLevelInfo': { '/customActivity/happyclear/getLevelInfo': {
...@@ -75,10 +75,10 @@ const config = { ...@@ -75,10 +75,10 @@ const config = {
'/customActivity/happyclear/useProp': { '/customActivity/happyclear/useProp': {
data: './happyclear/useProp.json' data: './happyclear/useProp.json'
}, },
'/hdtool/happyclear/submit': { '/hdtool/happyclear/submitNew': {
data: './happyclear/submit.json' data: './happyclear/submit.json'
}, },
'/hdtool/happyclear/doJoin': { '/hdtool/happyclear/doJoinNew': {
data: './happyclear/doJoin.json' data: './happyclear/doJoin.json'
}, },
'/aaw/music/category': { '/aaw/music/category': {
...@@ -210,6 +210,9 @@ const config = { ...@@ -210,6 +210,9 @@ const config = {
'/customActivity/happyclear/getConfigInfo':{ '/customActivity/happyclear/getConfigInfo':{
data:'./happyclear/getConfigInfo.json' data:'./happyclear/getConfigInfo.json'
}, },
'/customActivity/happyclear/findConsumerRecords': {
data: './happyclear/homelevel.json'
},
}; };
for (let item in config) { for (let item in config) {
......
This diff is collapsed.
{
"success": true,
"code": "0000000000",
"desc": "OK",
"timestamp": 1603675924466,
"data": [
{
"levelNum": 1,
"maxScore": 35170,
"stars": 3
},
{
"levelNum": 2,
"maxScore": 14500,
"stars": 3
},
{
"levelNum": 3,
"maxScore": 18260,
"stars": 3
},
{
"levelNum": 4,
"maxScore": 11230,
"stars": 3
},
{
"levelNum": 5,
"maxScore": 8000,
"stars": 3
},
{
"levelNum": 6,
"maxScore": 64660,
"stars": 3
},
{
"levelNum": 7,
"maxScore": 27070,
"stars": 3
},
{
"levelNum": 8,
"maxScore": 17930,
"stars": 1
},
{
"levelNum": 9,
"maxScore": 63880,
"stars": 3
},
{
"levelNum": 10,
"maxScore": 11320,
"stars": 1
},
{
"levelNum": 11,
"maxScore": 10760,
"stars": 3
},
{
"levelNum": 12,
"maxScore": 36280,
"stars": 3
},
{
"levelNum": 13,
"maxScore": 75450,
"stars": 3
},
{
"levelNum": 14,
"maxScore": 11270,
"stars": 2
},
{
"levelNum": 15,
"maxScore": 32810,
"stars": 3
},
{
"levelNum": 16,
"maxScore": 22060,
"stars": 3
},
{
"levelNum": 17,
"maxScore": 53670,
"stars": 3
},
{
"levelNum": 18,
"maxScore": 78630,
"stars": 3
},
{
"levelNum": 19,
"maxScore": 96690,
"stars": 3
},
{
"levelNum": 20,
"maxScore": 45790,
"stars": 3
},
{
"levelNum": 21,
"maxScore": 49630,
"stars": 3
},
{
"levelNum": 22,
"maxScore": 54060,
"stars": 3
},
{
"levelNum": 23,
"maxScore": 14170,
"stars": 3
},
{
"levelNum": 24,
"maxScore": 14300,
"stars": 3
}
]
}
\ 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