chunk-8b357964.98c335d1.js 2.3 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-8b357964"],{5037:function(i,e,t){"use strict";t.r(e);var n=function(){var i=this,e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"contan"},[e.isShow?n("iframe",{ref:"iframe",attrs:{src:e.url,width:e.iframeWidth,height:e.iframeHeight,frameborder:"0",allowfullscreen:"true"}}):e._e(),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.isResizing,expression:"isResizing"}],staticClass:"iframeDiv"}),e._v(" "),e.showVideo?n("videoView",{attrs:{docY:e.docY,videoSrc:e.videoSrc},on:{closeVideo:function(i){e.showVideo=!1},isResizing:function(e){i.isResizing=e}}}):e._e()],1)},o=[],s=t("0f17"),r={components:{videoView:s["a"]},data:function(){return{url:"",h:"",w:"",y:130,docY:"",isShow:!1,showVideo:!1,isResizing:!1,src:""}},mounted:function(){this.initSize(),window.addEventListener("resize",this.resizeWindow),this.url=this.$route.query.url,this.isShow=!0},methods:{initSize:function(){this.docY=document.documentElement.clientHeight||document.body.clientHeight,this.h=this.docY-this.y,this.w=document.documentElement.clientWidth-40,this.x=210},resizeWindow:function(){var i=this;this.isShow&&(this.isShow=!1,this.initSize(),this.$nextTick((function(e){i.isShow=!0})))}},computed:{iframeWidth:function(){return this.w+"px"},iframeHeight:function(){return this.h-30+"px"},videoSrc:function(){return this.src}},watch:{isShow:function(i){var e=this;i&&this.$nextTick((function(i){var t=e.$refs.iframe,n=e.$refs.iframe.contentWindow;console.log(t),setTimeout((function(i){var t=n.document.querySelector("#mainFrame");t.contentWindow.document.addEventListener("click",(function(i){var t=i.composedPath&&i.composedPath()||i.path||[];if(t.length>0)for(var n in t){var o,s;if(null!==(o=t[n])&&void 0!==o&&o.getAttribute&&null!==(s=t[n])&&void 0!==s&&s.getAttribute("title")){console.log("打开视频链接",i.path[n].getAttribute("title")),e.src=i.path[n].getAttribute("title"),e.showVideo=!0;break}}else e.$message.error("该浏览器不支持,请更换或升级chrome浏览器");console.log("点击了"),e.showVideo=!0}),!0)}),500)}))}}},c=r,h=(t("e3da"),t("2877")),u=Object(h["a"])(c,n,o,!1,null,"35fd198f",null);e["default"]=u.exports},"5cef":function(i,e,t){},e3da:function(i,e,t){"use strict";t("5cef")}}]);