|
@@ -96,18 +96,18 @@ export class long_story_list extends Component {
|
|
|
this.m_click_item_goto_game_success_cb = click_item_goto_game_success_cb
|
|
|
|
|
|
this.init()
|
|
|
- gameManager.Singleton.showLoadingLevel()
|
|
|
this.unLockFirstLevel(()=>{
|
|
|
- setTimeout(()=>{
|
|
|
- gameManager.Singleton.hideLoadingLevel()
|
|
|
- },100)
|
|
|
this.requestData(false)
|
|
|
})
|
|
|
}
|
|
|
|
|
|
private unLockFirstLevel(cb) {
|
|
|
+ gameManager.Singleton.showLoadingLevel()
|
|
|
let url = http.getPlatformLevelsList(config.LevelType.LONG_STORY,this.m_long_story_list_data.id,SdkUtil.getPlatformIdentify(), 1, 2)
|
|
|
http.run_get_static(url,(err,data)=>{
|
|
|
+ setTimeout(()=>{
|
|
|
+ gameManager.Singleton.hideLoadingLevel()
|
|
|
+ },100)
|
|
|
if(!err){
|
|
|
let msg:LevelMessage = JSON.parse(data)
|
|
|
// console.log('msg=',msg)
|
|
@@ -133,10 +133,14 @@ export class long_story_list extends Component {
|
|
|
// console.log('msg=',msg)
|
|
|
|
|
|
if(is_scroll_bottom) {
|
|
|
- this.data_list = this.data_list.concat(msg)
|
|
|
+ if(msg.content.list.length>0) {
|
|
|
+ this.data_list = this.data_list.concat(msg)
|
|
|
+ }
|
|
|
} else {
|
|
|
this.data_list = []
|
|
|
- this.data_list.push(msg)
|
|
|
+ if(msg.content.list.length>0) {
|
|
|
+ this.data_list.push(msg)
|
|
|
+ }
|
|
|
}
|
|
|
this.content.removeAllChildren()
|
|
|
for (let index = 0; index < this.data_list.length; index++) {
|