{
    template:'${tmpl}',
    data:function(){
        return {
            tms:[],
            loopplays:[
            ],
            channels:[]
        }
    },
    mounted:function(){
     this.fetchloopplay();
     this.fetchchannels();
    },
    created:function(){
        this.$root.typeHome = true;
    },
    methods:{
       fetchloopplay:function(){
           var self=this;
            self.$root.postReq("/web/loopplayCtl/findAll",{}).then(function(d){
                if(d.status==0){
                    self.loopplays=d.data;
                }
            });
       },
       fetchchannels(){
        var self=this;
        self.$root.postReq("/web/newschannelCtl/findPrev5",{}).then(function(d){
            if(d.status==0){
                self.channels=d.data;
            }
        });
       },
     moreclick:function(id){
        console.log("more............",id);
          /*修改路由条目*/
          Object.keys(this.$router.mapRouterEntry).map((k)=>{
            if(k.indexOf(":id")>0){
                var tmparray=k.split(":");
                var routerviewname=tmparray[0]+id;
                console.log("==============================");
                console.log(k,routerviewname);
                var entryValue=this.$router.mapRouterEntry[k];
                var curcom=entryValue.components[k];
                entryValue.components[routerviewname]=curcom;
                console.log("==============================");
            }
        });
        this.$root.pushx({
            title:"更多文章",
            name:"/channelquery/"+id
        });
      },
      rowclick:function(r){
        console.log("----------------------------------articledetail--------------------------------------");
        console.log(r);
        /*修改路由条目*/
        Object.keys(this.$router.mapRouterEntry).map((k)=>{
            if(k.indexOf(":id")>0){
                var tmparray=k.split(":");
                var routerviewname=tmparray[0]+r.id;
                console.log("==============================");
                console.log(k,routerviewname);
                var entryValue=this.$router.mapRouterEntry[k];
                var curcom=entryValue.components[k];
                entryValue.components[routerviewname]=curcom;
                console.log("==============================");
            }
        });
        this.$root.pushx({
            title:r.title,
            name:"/articledetail/"+r.id
        });
      },
    },
    vname:"gsb-home"
}
