Commit 42bff44d authored by wangzhujun's avatar wangzhujun

123

parent 2c6b36c8
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"preload_2","version":5,"files":["..\\assets\\mainscene\\title.png","..\\assets\\mainscene\\btnbg.png","..\\assets\\mainscene\\daka.png","..\\assets\\mainscene\\btn.png","..\\assets\\mainscene\\bglight.png","..\\assets\\mainscene\\numBG.png","..\\assets\\mainscene\\line.png","..\\assets\\mainscene\\ruleBtn.png","..\\assets\\mainscene\\rulebg.png","..\\assets\\mainscene\\logo.png","..\\assets\\mainscene\\closebtn.png","..\\assets\\mainscene\\tu3.png","..\\assets\\mainscene\\tu1.png","..\\assets\\mainscene\\tu2.png","..\\assets\\mainscene\\yi.png","..\\assets\\mainscene\\ai.png","..\\assets\\mainscene\\cardbg.png","..\\assets\\mainscene\\huan.png","..\\assets\\mainscene\\jian.png","..\\assets\\mainscene\\jiao.png","..\\assets\\mainscene\\jie.png","..\\assets\\mainscene\\kuang.png","..\\assets\\mainscene\\qi.png","..\\assets\\mainscene\\ye.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"preload_2","version":5,"files":["..\\assets\\guide\\hand.png","..\\assets\\guide\\hand2.png","..\\assets\\guide\\ydlight.png","..\\assets\\guide\\ydlight2.png","..\\assets\\guide\\ydline.png","..\\assets\\map\\mapBtn.png","..\\assets\\map\\maphz.png","..\\assets\\map\\mappass.png","..\\assets\\myrecord\\mram.png","..\\assets\\myrecord\\mrbg.png","..\\assets\\myrecord\\mrcx.png","..\\assets\\myrecord\\mrhg.png","..\\assets\\myrecord\\mrhz.png","..\\assets\\myrecord\\mrmg.png","..\\assets\\myrecord\\mrrb.png","..\\assets\\myrecord\\mrtb.png","..\\assets\\myrecord\\mrtitle.png","..\\assets\\myrecord\\mrxg.png","..\\assets\\pk\\pkadd.png","..\\assets\\pk\\pkagainBtn.png","..\\assets\\pk\\pkaskBtn.png","..\\assets\\pk\\pkBG.png","..\\assets\\pk\\pkBtn.png","..\\assets\\pk\\pkcirle.png","..\\assets\\pk\\pkloselight.png","..\\assets\\pk\\pkloselogo.png","..\\assets\\pk\\pkmyline.png","..\\assets\\pk\\pkotherline.png","..\\assets\\pk\\pkprizebg.png","..\\assets\\pk\\pkprizeBtn.png","..\\assets\\pk\\pkrulebg.png","..\\assets\\pk\\pkrulebtn.png","..\\assets\\pk\\pkscorebg.png","..\\assets\\pk\\pkwinbg.png","..\\assets\\pk\\pkwinBtn.png","..\\assets\\pk\\pkwinlogo.png","..\\assets\\pop\\finishbg.png","..\\assets\\pop\\finishBtn.png","..\\assets\\pop\\finishlight.png","..\\assets\\pop\\finishlogo.png","..\\assets\\pop\\lessscorebg.png","..\\assets\\pop\\lessscoreBtn.png","..\\assets\\pop\\rankbg.png","..\\assets\\pop\\rankbg2.png","..\\assets\\pop\\rankline.png","..\\assets\\pop\\rankmybg.png","..\\assets\\pop\\rulebg.png","..\\assets\\share\\sharebg.png","..\\assets\\share\\shareBtn.png","..\\assets\\share\\sharelab.png","..\\assets\\share\\sharerecordbg.png","..\\assets\\share\\sharerecordBtn.png","..\\assets\\share\\背景@2x.png","..\\assets\\startScene\\BG.png","..\\assets\\startScene\\chaoxian.png","..\\assets\\startScene\\CHNaomen.png","..\\assets\\startScene\\CHNhangzhou.png","..\\assets\\startScene\\CHNtaiwan.png","..\\assets\\startScene\\CHNxianggang.png","..\\assets\\startScene\\closeBtn.png","..\\assets\\startScene\\fireBtn.png","..\\assets\\startScene\\getBtn.png","..\\assets\\startScene\\hanguo.png","..\\assets\\startScene\\horn.png","..\\assets\\startScene\\littletitle.png","..\\assets\\startScene\\lockBtn.png","..\\assets\\startScene\\menggu.png","..\\assets\\startScene\\prizeBtn.png","..\\assets\\startScene\\rankBtn.png","..\\assets\\startScene\\recordBtn.png","..\\assets\\startScene\\riben.png","..\\assets\\startScene\\ruleBtn.png","..\\assets\\startScene\\startBtn.png","..\\assets\\startScene\\starttitle.png","..\\assets\\startScene\\teamBtn.png","..\\assets\\startScene\\unchaoxian.png","..\\assets\\startScene\\unCHNaomen.png","..\\assets\\startScene\\unCHNhangzhou.png","..\\assets\\startScene\\unCHNtaiwan.png","..\\assets\\startScene\\unCHNxianggang.png","..\\assets\\startScene\\unhanguo.png","..\\assets\\startScene\\unmenggu.png","..\\assets\\startScene\\unriben.png","..\\assets\\startScene\\waitBtn.png","..\\assets\\startScene\\yylogo.png","..\\assets\\xuanshi\\closeBtn.png","..\\assets\\xuanshi\\xuanshiBG.png","..\\assets\\xuanshi\\xuanshiBtn.png","..\\assets\\pop\\ranklight.png","..\\assets\\pk\\pknoton.png","..\\assets\\pk\\box.png","..\\assets\\pk\\head1.png","..\\assets\\pk\\pkpeacelight.png","..\\assets\\pk\\pkwinlight.png","..\\assets\\pk\\pkendbg.png","..\\assets\\map\\mapshareBtn.png","..\\assets\\pk\\pkscorebg2.png","..\\assets\\guide\\hand.png","..\\assets\\guide\\hand2.png","..\\assets\\guide\\ydlight.png","..\\assets\\guide\\ydlight2.png","..\\assets\\guide\\ydline.png","..\\assets\\map\\mapBtn.png","..\\assets\\map\\maphz.png","..\\assets\\map\\mappass.png","..\\assets\\map\\mapshareBtn.png","..\\assets\\myrecord\\mram.png","..\\assets\\myrecord\\mrbg.png","..\\assets\\myrecord\\mrcx.png","..\\assets\\myrecord\\mrhg.png","..\\assets\\myrecord\\mrhz.png","..\\assets\\myrecord\\mrmg.png","..\\assets\\myrecord\\mrrb.png","..\\assets\\myrecord\\mrtb.png","..\\assets\\myrecord\\mrtitle.png","..\\assets\\myrecord\\mrxg.png","..\\assets\\pk\\box.png","..\\assets\\pk\\head1.png","..\\assets\\pk\\pkadd.png","..\\assets\\pk\\pkagainBtn.png","..\\assets\\pk\\pkaskBtn.png","..\\assets\\pk\\pkBG.png","..\\assets\\pk\\pkBtn.png","..\\assets\\pk\\pkcirle.png","..\\assets\\pk\\pkendbg.png","..\\assets\\pk\\pkloselight.png","..\\assets\\pk\\pkloselogo.png","..\\assets\\pk\\pkmyline.png","..\\assets\\pk\\pknoton.png","..\\assets\\pk\\pkotherline.png","..\\assets\\pk\\pkpeacelight.png","..\\assets\\pk\\pkprizebg.png","..\\assets\\pk\\pkprizeBtn.png","..\\assets\\pk\\pkrulebg.png","..\\assets\\pk\\pkrulebtn.png","..\\assets\\pk\\pkscorebg.png","..\\assets\\pk\\pkscorebg2.png","..\\assets\\pk\\pkwinbg.png","..\\assets\\pk\\pkwinBtn.png","..\\assets\\pk\\pkwinlight.png","..\\assets\\pk\\pkwinlogo.png","..\\assets\\pop\\finishbg.png","..\\assets\\pop\\finishBtn.png","..\\assets\\pop\\finishlight.png","..\\assets\\pop\\finishlogo.png","..\\assets\\pop\\lessscorebg.png","..\\assets\\pop\\lessscoreBtn.png","..\\assets\\pop\\rankbg.png","..\\assets\\pop\\rankbg2.png","..\\assets\\pop\\ranklight.png","..\\assets\\pop\\rankline.png","..\\assets\\pop\\rankmybg.png","..\\assets\\pop\\rulebg.png","..\\assets\\share\\sharebg.png","..\\assets\\share\\shareBtn.png","..\\assets\\share\\sharelab.png","..\\assets\\share\\sharerecordbg.png","..\\assets\\share\\sharerecordBtn.png","..\\assets\\share\\背景@2x.png","..\\assets\\startScene\\BG.png","..\\assets\\startScene\\chaoxian.png","..\\assets\\startScene\\CHNaomen.png","..\\assets\\startScene\\CHNhangzhou.png","..\\assets\\startScene\\CHNtaiwan.png","..\\assets\\startScene\\CHNxianggang.png","..\\assets\\startScene\\closeBtn.png","..\\assets\\startScene\\fireBtn.png","..\\assets\\startScene\\getBtn.png","..\\assets\\startScene\\hanguo.png","..\\assets\\startScene\\horn.png","..\\assets\\startScene\\littletitle.png","..\\assets\\startScene\\lockBtn.png","..\\assets\\startScene\\menggu.png","..\\assets\\startScene\\prizeBtn.png","..\\assets\\startScene\\rankBtn.png","..\\assets\\startScene\\recordBtn.png","..\\assets\\startScene\\riben.png","..\\assets\\startScene\\ruleBtn.png","..\\assets\\startScene\\startBtn.png","..\\assets\\startScene\\starttitle.png","..\\assets\\startScene\\teamBtn.png","..\\assets\\startScene\\unchaoxian.png","..\\assets\\startScene\\unCHNaomen.png","..\\assets\\startScene\\unCHNhangzhou.png","..\\assets\\startScene\\unCHNtaiwan.png","..\\assets\\startScene\\unCHNxianggang.png","..\\assets\\startScene\\unhanguo.png","..\\assets\\startScene\\unmenggu.png","..\\assets\\startScene\\unriben.png","..\\assets\\startScene\\waitBtn.png","..\\assets\\startScene\\yylogo.png","..\\assets\\waiting\\bg.png","..\\assets\\waiting\\progress.png","..\\assets\\xuanshi\\closeBtn.png","..\\assets\\xuanshi\\xuanshiBG.png","..\\assets\\xuanshi\\xuanshiBtn.png","..\\assets\\transfer\\transfer _toast1.png","..\\assets\\transfer\\transfer _toast2.png","..\\assets\\transfer\\transfer _toast3.png","..\\assets\\teamshare\\teamshare_btn.png","..\\assets\\slogan\\slogan_btn.png","..\\assets\\slogan\\slogan_bg.png","..\\assets\\sharestarter\\sharestarter_sharebtn.png","..\\assets\\sharestarter\\sharestarter_btn.png","..\\assets\\joinshare\\joinshare_btn.png","..\\assets\\confirm\\confirm_bg.png","..\\assets\\confirm\\confirm_btn.png","..\\assets\\common\\关闭按钮 .png","..\\assets\\certificate\\certificate_cover.png","..\\assets\\certificate\\certificate_btn.png","..\\assets\\pk\\pkpeacelogo.png","..\\assets\\share2\\share2btn.png","..\\assets\\share2\\share2mask.png","..\\assets\\transferrecord\\transferrecord_bg.png","..\\assets\\transferrecord\\transferrecord_item_bg.png"]}
\ No newline at end of file
......@@ -46,6 +46,7 @@ import TransRecordPanel from './yazuwei/TransRecordPanel';
import SloganPanel from './yazuwei/SloganPanel';
import TeamShareScene from './yazuwei/TeamShareScene';
import TransScene from './yazuwei/TransScene';
import FinishPanel from './yazuwei/FinishPanel';
class Main extends MainBase {
protected registerModules() {
......@@ -88,6 +89,8 @@ class Main extends MainBase {
PanelCtrl.instance.registerClass(ModuleTypes.PKRULE_PANEL,PKRulePanel);
PanelCtrl.instance.registerClass(ModuleTypes.PKPRIZE_PANEL,PKPrizePanel);
PanelCtrl.instance.registerClass(ModuleTypes.PKSCORE_PANEL,PKScorePanel);
PanelCtrl.instance.registerClass(ModuleTypes.FINISH_PANEL,FinishPanel);
PanelCtrl.instance.registerClass(ModuleTypes.RANK_PANEL,RankPanel);
// NetManager.ins.onNotSuccess = (msg) => {
// showAlertPanel(msg)
......
......@@ -12,17 +12,46 @@ export default class RankPanel extends Panel{
public rankList:eui.Scroller;
public rankGroup:eui.Group;
public closeBtn:eui.Button;
public myrank:eui.Component;
public myRank:eui.Component;
constructor(){
constructor(data){
super();
Waiting.instance.hide();
this.initUI(data);
}
initUI(data){
if(data){
for(let i =0;i<data.list.length;i++){
let com = new eui.Component();
com.skinName = "RankItemSkin"
com['ranklab'].text = data.list[i].rank;
com['rankid'].text = data.list[i].phone;
com['ranknum'].text = data.list[i].count;
com.y = i*50;
if(data.list[i].rank%2 == 1){
com['rankBG'].visible = true;
}else{
com['rankBG'].visible = false;
}
this.rankGroup.addChild(com);
}
if(data.currentUserInfo){
if(data.currentUserInfo.rank>50){
this.myRank['ranklab'].text = "未上榜"
}else{
this.myRank['ranklab'].text = data.currentUserInfo.rank;
}
this.myRank['rankid'].text = "我";
this.myRank['ranknum'].text = data.currentUserInfo.count;
this.myRank['rankBG'].source = "rankmybg_png"
}
}
}
initEvents(){
super.initEvents();
this.onTap(this.closeBtn,this.onTap_closeBtn);
this.showPanel();
}
onTap_closeBtn(e) {
......@@ -38,98 +67,8 @@ export default class RankPanel extends Panel{
SceneCtrl.instance.change(ModuleTypes.START_SCENE,data);
},window['projectId'])
}
showPanel(){
if(DataManager.ins.getData('recentRankList').data){
let i :number = 0;
let ranklength:number = 0;
if(DataManager.ins.getData('recentRankList').data.currentRankList.userRankList.length<=50){
ranklength = DataManager.ins.getData('recentRankList').data.currentRankList.userRankList.length;
}else{
ranklength = 50;
}
for(i = 1; i<=ranklength;i++){
if(DataManager.ins.getData('recentRankList').data.currentRankList.userRankList[i-1].rank == 1){
let img = new eui.Image();
img.source = "first_png";
img.x = 53
img.y = 0
img.width = 47
img.height = 52
this.rankGroup.addChild(img);
}else if(DataManager.ins.getData('recentRankList').data.currentRankList.userRankList[i-1].rank == 2){
let img = new eui.Image();
img.source = "second_png";
img.x = 53
img.y = 72
img.width = 47
img.height = 52
this.rankGroup.addChild(img);
}else if(DataManager.ins.getData('recentRankList').data.currentRankList.userRankList[i-1].rank == 3){
let img = new eui.Image();
img.source = "third_png";
img.x = 53
img.y = 144
img.width = 47
img.height = 52
this.rankGroup.addChild(img);
}else{
let img = new eui.Image();
img.source = "point_png";
img.x = 57
img.y = 72*(i-1)
img.width = 40
img.height = 40
this.rankGroup.addChild(img);
let ranknum = new eui.Label();
ranknum.text = DataManager.ins.getData('recentRankList').data.currentRankList.userRankList[i-1].rank;
ranknum.size = 24
ranknum.x = img.x+img.width/2-ranknum.width/2;
ranknum.y =img.y+img.height/2-ranknum.height/2;
ranknum.textColor = parseInt("040b34");
this.rankGroup.addChild(ranknum);
}
let imgline = new eui.Image();
imgline.source = "underline_png";
imgline.x = 53
imgline.y = 60+(i-1)*72
imgline.width = 548
imgline.height = 1
this.rankGroup.addChild(imgline);
let rankid = new eui.Label();
rankid.text = DataManager.ins.getData('recentRankList').data.currentRankList.userRankList[i-1].uid;
rankid.x = 193;
rankid.y = (i-1)*72;
rankid.size = 24;
rankid.width = 230;
rankid.height = 51;
rankid.textColor = parseInt("ffffff",16);
rankid.textAlign = "center";
rankid.verticalAlign = "middle";
this.rankGroup.addChild(rankid);
let rankscore = new eui.Label();
rankscore.text = DataManager.ins.getData('recentRankList').data.currentRankList.userRankList[i-1].maxScore;
rankscore.width = 203
rankscore.height = 51
rankscore.x = 423
rankscore.y = (i-1)*72;
rankscore.size = 24
rankscore.textColor = parseInt("ffffff",16);
rankscore.textAlign = "center";
rankscore.verticalAlign = "middle";
this.rankGroup.addChild(rankscore);
}
}
}
removeEvents(){
super.removeEvents();
this.clearTap(this.closeBtn,this.onTap_closeBtn);
......
......@@ -36,7 +36,7 @@ export enum ModuleTypes {
PKRULE_PANEL,
PKPRIZE_PANEL,
PKSCORE_PANEL,
FINISH_PANEL,
CertificateScene,
......
import Panel from "../views/Panel";
export default class FinishPanel extends Panel{
protected get skinKey(){return 'Finish'}
public closeBtn:eui.Button;
public knowBtn:eui.Button;
constructor(){
super();
}
initEvents(){
super.initEvents();
this.onTap(this.closeBtn,()=>{this.hidePanel();})
this.onTap(this.knowBtn,()=>{this.hidePanel();})
}
}
\ No newline at end of file
import Panel from "../views/Panel";
import SceneCtrl from "../ctrls/sceneCtrl";
import { ModuleTypes } from "../types/sceneTypes";
export default class NoCreditsPanel extends Panel{
protected get skinKey(){return 'NoCredits'}
......@@ -11,6 +13,9 @@ export default class NoCreditsPanel extends Panel{
initEvents(){
this.onTap(this.closeBtn,()=>{this.hidePanel()});
this.onTap(this.getCreditsBtn,()=>{this.hidePanel()});
this.onTap(this.getCreditsBtn,()=>{
SceneCtrl.instance.change(ModuleTypes.ShareStarterScene);
this.hidePanel()
});
}
}
\ 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