//配置信息，继承基类以便具备消息能力
import DataModelBase from '../framework/DataModelBase';
import NetConfig from '../net/NetConfig';


export default class ConfigData extends DataModelBase
{
    constructor()
    {
        super('ConfigData');
        this._gameListData = null
        this._obj = null
    }
 
    setGameListData(gamelistData)
    {
        
         this._gameListData = gamelistData
    }
    getGameListData()
    {
         return this._gameListData
    } 

    getGameList()
    {
        if(this._gameListData === null  )
        {
            return null
        }
       return  this._gameListData &&  this._gameListData['data'] && this._gameListData['data']['gamelist']? this._gameListData['data']['gamelist']:null;
    }

    setConfigDataObject(obj)
    {
        this._obj = obj;
    }

    getConfigDataObject()
    {
        return this._obj;
    }

    getEnableCrossMarketing()
    {
       return this._obj &&  this._obj['enable_cross_marketing'] ? this._obj['enable_cross_marketing']:false;
    }

    getWeekButtonUrl()
    {
       return this._obj && this._obj['week_button_url'] ? this._obj['week_button_url']:'';
    }

    getRandomButtonText()
    {
        return this._obj && this._obj['random_button_text'] ? this._obj['random_button_text']:'';
    }

    getWeekSubject()
    {
        return this._obj && this._obj['week_subject'] ? this._obj['week_subject']:'';
    }

    //智力周赛内页
    getWeekImageUrl()
    {
        return this._obj && this._obj['week_image_url'] ? this._obj['week_image_url']:'';
    }

    //智力周赛话题
    getWeekTitle()
    {
        return this._obj && this._obj['week_content_text'] ? this._obj['week_content_text']:'';
    }

    getWeekButton()
    {
        return this._obj && this._obj['week_button'] ? this._obj['week_button']:'';
    }

    getLobbyDataBg()
    {
        return this._obj && this._obj['lobby_data_bg'] ? this._obj['lobby_data_bg']:'';
    }

    getApiAddress()
    {
       // return 'http://134.175.177.226:7654';
        return this._obj && this._obj['api_address'] ? this._obj['api_address']:'';
    }
    
   
}