|
@@ -47,6 +47,14 @@ export class game_list extends Component {
|
|
|
}
|
|
|
|
|
|
public initButtonType() {
|
|
|
+ let game_config = gameManager.getGameData().content
|
|
|
+ if(game_config.long_txt_status==1) {
|
|
|
+ this.btn_long_story_type.active = true
|
|
|
+ } else {
|
|
|
+ this.btn_level_type.active = false
|
|
|
+ this.btn_long_story_type.active = false
|
|
|
+ }
|
|
|
+
|
|
|
this.btn_level_type.on(Node.EventType.TOUCH_END, ()=>{
|
|
|
this.clickButtonType(config.LevelType.LEVEL)
|
|
|
})
|
|
@@ -99,7 +107,7 @@ export class game_list extends Component {
|
|
|
ClientEvent.off(config.EventRun.WIN_LATER_AUTO_UNLOCK_NEXT_LEVEL,this.autoUnlockNextLevel.bind(this),this)
|
|
|
ClientEvent.on(config.EventRun.WIN_LATER_AUTO_UNLOCK_NEXT_LEVEL,this.autoUnlockNextLevel.bind(this),this)
|
|
|
this.initContentTouch()
|
|
|
- this.loadView()
|
|
|
+ this.loadLevelView()
|
|
|
}
|
|
|
|
|
|
private requestLongStoryData() {
|
|
@@ -139,7 +147,7 @@ export class game_list extends Component {
|
|
|
item.getComponent(long_story_item).initView(null,null)
|
|
|
}
|
|
|
|
|
|
- private requestData(cb=null) {
|
|
|
+ private requestLevelData(cb=null) {
|
|
|
let user_data = gameManager.getStaticUserData()
|
|
|
let url = http.getPlatformLevelsList(config.LevelType.LEVEL,0,SdkUtil.getPlatformIdentify(), user_data.select_page, this.page_limit_count)
|
|
|
http.run_get_static(url,(err,data)=>{
|
|
@@ -151,14 +159,14 @@ export class game_list extends Component {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
- public loadView(){
|
|
|
- this.requestData(()=>{
|
|
|
+ public loadLevelView(){
|
|
|
+ this.requestLevelData(()=>{
|
|
|
this.initContentPosition()
|
|
|
if(this.is_selectPage_dayu_allPage==false && gameManager.getStaticUserData().select_page>this.getAllPage()) {
|
|
|
this.is_selectPage_dayu_allPage = true
|
|
|
gameManager.getStaticUserData().select_page = 1
|
|
|
gameManager.saveUserData()
|
|
|
- this.loadView()
|
|
|
+ this.loadLevelView()
|
|
|
return
|
|
|
}
|
|
|
this.m_loading_finish_call && this.m_loading_finish_call()
|
|
@@ -258,7 +266,7 @@ export class game_list extends Component {
|
|
|
this.level_content.removeAllChildren()
|
|
|
gameManager.getStaticUserData().select_page = page
|
|
|
gameManager.saveUserData()
|
|
|
- this.requestData()
|
|
|
+ this.requestLevelData()
|
|
|
}
|
|
|
|
|
|
onUpPage(){
|