var documentList = new Vue({
    el: "#documentList",
    data: {
        pdfId:0,
        ossArchive:{},
        ossArchivePdf: {},
        keyWord:'',
    },
    computed: {

    },
    methods: {
        GetDocumentDataDetailsInfo:function(){//查询资料详情
            var _self = this;
            DocumentApi.GetDocumentDataDetails({pdfId:_self.pdfId},function(response){
                if(response.code == 0){
                    var data = response.data;
                    _self.ossArchive = data.ossArchive;
                    _self.ossArchivePdf = data.ossArchivePdf;
                    if(isPC){
                        console.log('111111111')
                        setTimeout(function () {
                            $('a.media').media({width:1160, height:1158});
                            $('a.mediase').media({width:1160, height:1158});
                        },0);
                    }else{
                        console.log('22222222222')
                        setTimeout(function () {
                            $('a.media').media({width:750, height:900});
                            $('a.mediase').media({width:750, height:900});
                        },0);
                    }
                }else{
                    CAIMEI.Alert(response.msg, '确定', false);
                }
            })
        },
        searchKeyWord:function(){//搜索
            var _self = this;
            if (_self.keyWord ==''){
                CAIMEI.dialog('请输入搜索关键字',false,function () {});
                return;
            }
            location.href = '/document/list.html?keyWord='+encodeURI(_self.keyWord);
        },
        MoreDetails:function(){
            var _self = this;
            location.href = '/document/more-content.html?id='+_self.ossArchive.id;
        }
    }

    ,
    created: function () {

    },
    mounted: function () {
        this.pdfId = CAIMEI.getUrlParam('id');
        this.GetDocumentDataDetailsInfo();
    }
});
