Commit d584849b authored by wangzhujun's avatar wangzhujun

123

parent 4ede3aaf
...@@ -30,7 +30,8 @@ ...@@ -30,7 +30,8 @@
"resource/skins/PKSkin.exml", "resource/skins/PKSkin.exml",
"resource/skins/HeadItemSkin.exml", "resource/skins/HeadItemSkin.exml",
"resource/skins/PKRuleSkin.exml", "resource/skins/PKRuleSkin.exml",
"resource/skins/PKPrizeSkin.exml" "resource/skins/PKPrizeSkin.exml",
"resource/skins/PKScoreSkin.exml"
], ],
"path": "resource/default.thm.json" "path": "resource/default.thm.json"
......
...@@ -35,6 +35,7 @@ import NoCreditsPanel from './yazuwei/NoCreditsPanel'; ...@@ -35,6 +35,7 @@ import NoCreditsPanel from './yazuwei/NoCreditsPanel';
import PKScene from './yazuwei/PKScene'; import PKScene from './yazuwei/PKScene';
import PKRulePanel from './yazuwei/PKRulePanel'; import PKRulePanel from './yazuwei/PKRulePanel';
import PKPrizePanel from './yazuwei/PKPrizePanel'; import PKPrizePanel from './yazuwei/PKPrizePanel';
import PKScorePanel from './yazuwei/PKScorePanel';
class Main extends MainBase { class Main extends MainBase {
...@@ -67,7 +68,8 @@ class Main extends MainBase { ...@@ -67,7 +68,8 @@ class Main extends MainBase {
PanelCtrl.instance.registerClass(ModuleTypes.PLACE_PANEL,PlacePanel) PanelCtrl.instance.registerClass(ModuleTypes.PLACE_PANEL,PlacePanel)
PanelCtrl.instance.registerClass(ModuleTypes.NOCREDITS_PANEL,NoCreditsPanel) PanelCtrl.instance.registerClass(ModuleTypes.NOCREDITS_PANEL,NoCreditsPanel)
PanelCtrl.instance.registerClass(ModuleTypes.PKRULE_PANEL,PKRulePanel); PanelCtrl.instance.registerClass(ModuleTypes.PKRULE_PANEL,PKRulePanel);
PanelCtrl.instance.registerClass(ModuleTypes.PKPRIZE_PANEL,PKPrizePanel) PanelCtrl.instance.registerClass(ModuleTypes.PKPRIZE_PANEL,PKPrizePanel);
PanelCtrl.instance.registerClass(ModuleTypes.PKSCORE_PANEL,PKScorePanel);
// NetManager.ins.onNotSuccess = (msg) => { // NetManager.ins.onNotSuccess = (msg) => {
// showAlertPanel(msg) // showAlertPanel(msg)
......
import Panel from "../views/Panel"; import Panel from "../views/Panel";
import Waiting from "../waiting/Waiting"; import Waiting from "../waiting/Waiting";
import NetConst from "../NetConst"; import NetConst, { yzwNet } from "../NetConst";
import SceneCtrl from "../ctrls/sceneCtrl"; import SceneCtrl from "../ctrls/sceneCtrl";
import { ModuleTypes } from "../types/sceneTypes"; import { ModuleTypes } from "../types/sceneTypes";
import { DataManager } from "../../libs/tw/manager/DataManager"; import { DataManager } from "../../libs/tw/manager/DataManager";
import submitAfterDostart from "../../libs/new_tw/ctrls/submitAfterDostart"; import submitAfterDostart from "../../libs/new_tw/ctrls/submitAfterDostart";
import ToastCtrl from "../ctrls/toastCtrl";
export default class RankPanel extends Panel{ export default class RankPanel extends Panel{
protected get skinKey() { return 'Rank' } protected get skinKey() { return 'Rank' }
public rankList:eui.Scroller; public rankList:eui.Scroller;
public rankGroup:eui.Group; public rankGroup:eui.Group;
public closeBtn:eui.Button; public closeBtn:eui.Button;
public myrank:eui.Label; public myrank:eui.Component;
public myscore:eui.Label;
public mycake:eui.Label;
constructor(){ constructor(){
super(); super();
...@@ -28,11 +27,16 @@ export default class RankPanel extends Panel{ ...@@ -28,11 +27,16 @@ export default class RankPanel extends Panel{
onTap_closeBtn(e) { onTap_closeBtn(e) {
Waiting.instance.show(); Waiting.instance.show();
NetConst.ajaxElement((s) => { yzwNet.homeBaseInfo((s)=>{
if(!s){
ToastCtrl.instance.show("网络异常请重试~");
return;
}
Waiting.instance.hide(); Waiting.instance.hide();
this.hidePanel(); let data = DataManager.ins.getData("homeBaseInfo").data;
// SceneCtrl.instance.change(ModuleTypes.START_SCENE); this.hidePanel()
}) SceneCtrl.instance.change(ModuleTypes.START_SCENE,data);
},window['projectId'])
} }
showPanel(){ showPanel(){
if(DataManager.ins.getData('recentRankList').data){ if(DataManager.ins.getData('recentRankList').data){
...@@ -122,17 +126,7 @@ export default class RankPanel extends Panel{ ...@@ -122,17 +126,7 @@ export default class RankPanel extends Panel{
} }
if(DataManager.ins.getData('recentRankList').data.currentRankList.currentUserRankInfo){
if(DataManager.ins.getData('recentRankList').data.currentRankList.currentUserRankInfo.rank<=5000){
this.myrank.size = 36
this.myrank.text = DataManager.ins.getData('recentRankList').data.currentRankList.currentUserRankInfo.rank;
}else{
this.myrank.size = 24;
this.myrank.text = "暂未上榜";
}
this.mycake.text = DataManager.ins.getData('recentRankList').data.currentRankList.currentUserRankInfo.maxScore;
}
} }
} }
......
...@@ -91,7 +91,17 @@ export default class StartScene extends Scene { ...@@ -91,7 +91,17 @@ export default class StartScene extends Scene {
} }
} }
//显示PK结果弹窗
if(data.pkResult){
let now = new Date();
let year = now.getFullYear();
let mon = now.getMonth()+1;
let day = now.getDate();
if(!GCache.readCache((year+"/"+mon+"/"+day))){
GCache.writeCache((year+"/"+mon+"/"+day),true)
PanelCtrl.instance.show(ModuleTypes.PKSCORE_PANEL,this.startdata);
}
}
} }
noCredits(){ noCredits(){
......
...@@ -35,6 +35,7 @@ export enum ModuleTypes { ...@@ -35,6 +35,7 @@ export enum ModuleTypes {
PK_SCENE, PK_SCENE,
PKRULE_PANEL, PKRULE_PANEL,
PKPRIZE_PANEL, PKPRIZE_PANEL,
PKSCORE_PANEL,
......
import Panel from "../views/Panel";
export default class PKScorePanel extends Panel{
protected get skinKey(){return 'PKScore'}
constructor(data){
super();
this.initUI(data);
}
initUI(data){
}
}
\ No newline at end of file
...@@ -4,7 +4,31 @@ ...@@ -4,7 +4,31 @@
"currentLevel":5, "currentLevel":5,
"treasureBoxNum":1, "treasureBoxNum":1,
"currentScore":1, "currentScore":1,
"pkResult":"后续补上", "pkResult":{
"myTeamSteps":100,
"enemyTeamSteps":2000,
"pkResult":1,
"myTeamMembers":[
{
"steps":122,
"phone":182677888,
"score":10,
"myFlag":0
},
{
"steps":122,
"phone":182677888,
"score":10,
"myFlag":1
},
{
"steps":122,
"phone":182677888,
"score":10,
"myFlag":1
}
]
},
"nextLevelScore":11111, "nextLevelScore":11111,
"activityJoinNum":1 "activityJoinNum":1
}, },
......
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