var config = {
    page:1,
    node:$('.content'),
    mask:$('.mask'),
    _isShow:false,
    data:{
        "0001":"最新发布",
        "0005":"车龄最短"
    },
    get isShow() {
        return this._isShow;
    },
    set isShow(val) {
        this._isShow = val; 
    },
    listen:{},
    //利用对象监听  同一函数触发时的多个操作
    addEvent:function(type,fn) {
        if(typeof this.listen[type] == 'function' && Array.isArray(this.listen[type]))  {
             this.listen[type].push(fn);
        }else {
            this.listen[type] = [];
            this.listen[type].push(fn);
        }
    },
    fireE:functon(type){
        if(typeof this.listen[type] == 'function' && Array.isArray(this.listen[type]))  {
             for(var i =0;i<this.listen[type].length;i++) {
                 this.listen[type][i]();
             }
        }
    },
    removeE:function(type,fn) {
        if(typeof this.listen[type]) {
            //循环type中 所有事件 删除原来的
            for(var i = 0 ;i < this.listen[type].length;i++) {
                if(this.listen[type][i] === fn) {
                    this.listen[type].splice(i,1);
                }
            }
        }
    },
    //加入一些dom操作方法
    showDelet:function() {
        //显示删除按钮
    }
    refresh:function(data) {
        this.data = [];
        this.page = 1 ;
        this.node.html('');
    },
    //定义模版
    pushHtml:function() {
        var page = this.page;
        var template = _.template(this.temp.html(),{data:data,page:page,token:token,userId:userId})
    },
    //动态生成的元素再追加事件
    setNode:function() {
        this.node.html(val);
        this.addListen(this.page)
    },
    addListen:function(page) {
        $('[page=page'+page+']').off('click).on('click',function(){
            var id = $(this).data('id');
        })
        myScroll.refresh();
    },
}
var orderByList = {
    list:$('.header'),
    mask:$('.mask'),
    select:$('.select'),
    showSelect:function() {
        this.list.hide();
        this.list.mask();
        this.select.show();
    }
}
//封装方法
function loadData(putData,cb,caller) {
    AladdingTools.request('post',AppInter..,putData,function(data){
        if(data=='001') {
            typeof cb === 'functionn' && cb();
        }
    })
}
function getSessionData(cb,called) {
    AladdinTools.getObjectFromSession(config.searchKey,function(data){
        cb&&typeof cb === 'function'&& cb.call(called,data);
    })
}
function bindEvent() {
    1.  设置左箭头返回键
    2.  设置右箭头返回键
    3.  其他
}
function load() {
    myscroll的一些设置
}
function init() {
    //定义页面高度
    pageHeight = document.body.clientHeight - 44 ;
    $('.app-content').height(pageHeight);
    $('.iscroll-content').height(pageHeight - 50);
    getUserInfo(function(){
        load(funtion(){
            bindEvent;
        })
    })
}
//get 和 set 的用法
get --> config.isShow; -->false;
set --> config.isShow = true;
调用  config.isShow  -->true;