var TempPreviewPanel = {
    template: '<div>\
    			<div></div>\
    			<a class="back-btn c-t-center mr15" @click="goBack">\
	    			返回\
	    		</a>\
    </div>',
    props: [],
    data: function() {
        return {
        }
    },
    methods: {
    	listDetail: function() {
        	var vm = this
        	guidanceAPI.listDetail({
        		modelCode: vm.modelCode
        	}).then(function(res) {
        		var data = res.data
        		if(data) {
        			vm.content = data.content
        			vm.modelName = data.modelName
        			vm.imgs = _.map(data.imagesUrls, function(s) {
        				return httpRequest.getImgUrl(s)
        			})
        		}
        	})
        },
        getDetail: function (){
            var regN = /\n/g;
            var regRN = /\r\n/g;
            var content = detail.content.replace(/ /g, "&nbsp;");
            content = content.replace(regN,"<br/>");

            var p = "<p class='c-f14 c-333'>"+content+"</p>",
                images = "";
            for(i=0; i<detail.images.length; i++){
                var src = detail.images[i];
                if(!(src.indexOf("file://") > -1)){
                    src = getImgUrl(detail.images[i]);
                }
                
                images += "<div class='mtb10'><img src='"+src+"' width='100%'></div>";
            }
            $(".content").append(p+images);
        },
        goBack: function() {
        	this.$router.back()
        }
    }
}