text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-34b4decb"],{"0bfb":function(t,e,n){"use strict";var r=n("cb7c");t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},"1a2e":function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"header_container"},[n("el-breadcrumb",{attrs:{separator:"/"}},[n("el-breadcrumb-item",{attrs:{to:{path:"/index"}}},[t._v("首页")]),t._l(t.$route.meta,function(e,r){return n("el-breadcrumb-item",{key:r},[t._v(t._s(e))])})],2),n("el-dropdown",{on:{command:t.handleCommand}},[n("img",{staticClass:"avator"}),n("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[n("el-dropdown-item",{attrs:{command:"home"}},[t._v("首页")]),n("el-dropdown-item",{attrs:{command:"logout"}},[t._v("退出")])],1)],1)],1)},a=[],i=n("cebc"),o=(n("cadf"),n("551c"),n("097d"),n("2f62")),s={data:function(){return{}},created:function(){},computed:Object(i["a"])({},Object(o["c"])(["loginInfo"])),methods:Object(i["a"])({handleCommand:function(t){var e=this;switch(t){case"home":this.$router.push("/index");break;case"logout":this.logout({userId:"id"}).then(function(t){e.$message({message:"注销成功！",type:"success"}),e.$router.push("/")}).catch(function(){e.$message.error("注销失败！")})}}},Object(o["b"])(["logout"]))},c=s,u=(n("9fea"),n("2877")),l=Object(u["a"])(c,r,a,!1,null,"06e7a62a",null);e["a"]=l.exports},"268f":function(t,e,n){t.exports=n("fde4")},"2e08":function(t,e,n){var r=n("9def"),a=n("9744"),i=n("be13");t.exports=function(t,e,n,o){var s=String(i(t)),c=s.length,u=void 0===n?" ":String(n),l=r(e);if(l<=c||""==u)return s;var f=l-c,d=a.call(u,Math.ceil(f/u.length));return d.length>f&&(d=d.slice(0,f)),o?d+s:s+d}},"2f14":function(t,e,n){},"2fdb":function(t,e,n){"use strict";var r=n("5ca1"),a=n("d2c8"),i="includes";r(r.P+r.F*n("5147")(i),"String",{includes:function(t){return!!~a(this,t,i).indexOf(t,arguments.length>1?arguments[1]:void 0)}})},"32a6":function(t,e,n){var r=n("241e"),a=n("c3a1");n("ce7e")("keys",function(){return function(t){return a(r(t))}})},3846:function(t,e,n){n("9e1e")&&"g"!=/./g.flags&&n("86cc").f(RegExp.prototype,"flags",{configurable:!0,get:n("0bfb")})},5147:function(t,e,n){var r=n("2b4c")("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,!"/./"[t](e)}catch(a){}}return!0}},5176:function(t,e,n){t.exports=n("51b6")},"521f":function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"show",rawName:"v-show",value:t.showFlag,expression:"showFlag"}],staticClass:"wrap",on:{"!click":function(e){return t.clickHandler(e)}}},[n("transition",{attrs:{name:"pop"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.showFlag,expression:"showFlag"}],staticClass:"messageBoxWrap"},[n("div",{staticClass:"box__header"},[t._v("编辑")]),n("div",{staticClass:"box__content"},[t._t("default")],2),n("div",{staticClass:"box__btns"},[n("el-button",{on:{click:t.cancel}},[t._v("取消")]),n("el-button",{attrs:{loading:t.loading,type:"primary"},on:{click:t.confirm}},[t._v("保存")])],1)])]),n("div",{staticClass:"mask"})],1)},a=[],i=(n("6762"),n("2fdb"),n("cadf"),n("551c"),n("097d"),{data:function(){return{showFlag:!1,loading:!1}},methods:{show:function(){this.showFlag=!0},hide:function(){this.showFlag=!1},confirm:function(){this.$emit("confirm")},cancel:function(){this.$emit("cancel")},clickHandler:function(t){t.target.className.includes("mask")&&this.hide()}}}),o=i,s=(n("db22"),n("2877")),c=Object(s["a"])(o,r,a,!1,null,"7359146f",null);e["a"]=c.exports},6762:function(t,e,n){"use strict";var r=n("5ca1"),a=n("c366")(!0);r(r.P,"Array",{includes:function(t){return a(this,t,arguments.length>1?arguments[1]:void 0)}}),n("9c6c")("includes")},"6b54":function(t,e,n){"use strict";n("3846");var r=n("cb7c"),a=n("0bfb"),i=n("9e1e"),o="toString",s=/./[o],c=function(t){n("2aba")(RegExp.prototype,o,t,!0)};n("79e5")(function(){return"/a/b"!=s.call({source:"a",flags:"b"})})?c(function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!i&&t instanceof RegExp?a.call(t):void 0)}):s.name!=o&&c(function(){return s.call(this)})},"8aae":function(t,e,n){n("32a6"),t.exports=n("584a").Object.keys},"8b55":function(t,e,n){"use strict";n.d(e,"b",function(){return r}),n.d(e,"c",function(){return a}),n.d(e,"a",function(){return i});n("6b54"),n("f576");var r=/^([a-zA-Z0-9]+[_|.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/,a=/^https?.+\.(mp4|avi|flv|mpg|rm|mov|asf|3gp|mkv|rmvb)$/i,i=/^https?.+\.(jpg|jpeg|gif|png|bmp)$/i},9744:function(t,e,n){"use strict";var r=n("4588"),a=n("be13");t.exports=function(t){var e=String(a(this)),n="",i=r(t);if(i<0||i==1/0)throw RangeError("Count can't be negative");for(;i>0;(i>>>=1)&&(e+=e))1&i&&(n+=e);return n}},"9fea":function(t,e,n){"use strict";var r=n("ea97"),a=n.n(r);a.a},a4bb:function(t,e,n){t.exports=n("8aae")},aae3:function(t,e,n){var r=n("d3f4"),a=n("2d95"),i=n("2b4c")("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==a(t))}},ac6a:function(t,e,n){for(var r=n("cadf"),a=n("0d58"),i=n("2aba"),o=n("7726"),s=n("32e9"),c=n("84f2"),u=n("2b4c"),l=u("iterator"),f=u("toStringTag"),d=c.Array,m={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},h=a(m),p=0;p<h.length;p++){var b,g=h[p],v=m[g],x=o[g],w=x&&x.prototype;if(w&&(w[l]||s(w,l,d),w[f]||s(w,f,g),c[g]=d,v))for(b in r)w[b]||i(w,b,r[b],!0)}},afc4:function(t,e,n){"use strict";var r=n("f764"),a=n.n(r);a.a},bf90:function(t,e,n){var r=n("36c3"),a=n("bf0b").f;n("ce7e")("getOwnPropertyDescriptor",function(){return function(t,e){return a(r(t),e)}})},ce7e:function(t,e,n){var r=n("63b6"),a=n("584a"),i=n("294c");t.exports=function(t,e){var n=(a.Object||{})[t]||Object[t],o={};o[t]=e(n),r(r.S+r.F*i(function(){n(1)}),"Object",o)}},cebc:function(t,e,n){"use strict";n.d(e,"a",function(){return l});var r=n("268f"),a=n.n(r),i=n("e265"),o=n.n(i),s=n("a4bb"),c=n.n(s),u=n("bd86");function l(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=c()(n);"function"===typeof o.a&&(r=r.concat(o()(n).filter(function(t){return a()(n,t).enumerable}))),r.forEach(function(e){Object(u["a"])(t,e,n[e])})}return t}},d2c8:function(t,e,n){var r=n("aae3"),a=n("be13");t.exports=function(t,e,n){if(r(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(a(t))}},db22:function(t,e,n){"use strict";var r=n("2f14"),a=n.n(r);a.a},e265:function(t,e,n){t.exports=n("ed33")},ea97:function(t,e,n){},ed33:function(t,e,n){n("014b"),t.exports=n("584a").Object.getOwnPropertySymbols},f0d0:function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("head-top"),n("div",{staticClass:"table_container"},[n("message-box",{ref:"msgBox",on:{confirm:t.confirm,cancel:t.cancel}},[n("video",{ref:"video",staticStyle:{"margin-bottom":"20px"},attrs:{src:t.tempObj.videoPath,width:"100%",height:"100%"},on:{click:t.playHandler}}),n("el-form",{ref:"tempObj",staticClass:"el-form",attrs:{model:t.tempObj,rules:t.rules,"label-width":"110px"}},[n("el-form-item",{staticClass:"el-form-item1",attrs:{label:"用户邮箱",prop:"userEmail"}},[n("el-input",{attrs:{clearable:""},model:{value:t.tempObj.userEmail,callback:function(e){t.$set(t.tempObj,"userEmail",e)},expression:"tempObj.userEmail"}})],1),n("el-form-item",{staticClass:"el-form-item1",attrs:{label:"视频url",prop:"videoPath"}},[n("el-input",{attrs:{clearable:""},model:{value:t.tempObj.videoPath,callback:function(e){t.$set(t.tempObj,"videoPath",t._n(e))},expression:"tempObj.videoPath"}})],1),n("el-form-item",{staticClass:"el-form-item1",attrs:{label:"视频封面url",prop:"videoCover"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-input",{attrs:{clearable:""},model:{value:t.tempObj.videoCover,callback:function(e){t.$set(t.tempObj,"videoCover",e)},expression:"tempObj.videoCover"}}),n("img",{attrs:{src:t.tempObj.videoCover,alt:"",height:"100%",width:"100%"}})]}}])}),n("el-form-item",{staticClass:"el-form-item1",attrs:{label:"视频描述",prop:"videoDesc"}},[n("el-input",{attrs:{type:"textarea"},model:{value:t.tempObj.videoDesc,callback:function(e){t.$set(t.tempObj,"videoDesc",e)},expression:"tempObj.videoDesc"}})],1)],1)],1),n("el-table",{staticStyle:{width:"100%"},attrs:{data:t.tableData.filter(function(e){return!t.search||e.userEmail.toLowerCase().includes(t.search.toLowerCase())}),"highlight-current-row":""}},[n("el-table-column",{attrs:{property:"videoId",label:"视频Id",width:"100"}}),n("el-table-column",{attrs:{property:"createdAt",label:"发布日期",width:"220"}}),n("el-table-column",{attrs:{property:"userEmail",label:"用户邮箱",width:"220"}}),n("el-table-column",{attrs:{property:"videoDesc",label:"视频描述"}}),n("el-table-column",{attrs:{label:"视频封面"},scopedSlots:t._u([{key:"default",fn:function(t){return[n("img",{attrs:{src:t.row.videoCover,alt:"",height:"100%",width:"100%"}})]}}])}),n("el-table-column",{attrs:{align:"right"},scopedSlots:t._u([{key:"header",fn:function(e){return[n("el-input",{attrs:{size:"mini",placeholder:"输入关键字搜索"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})]}},{key:"default",fn:function(e){return[n("el-button",{attrs:{size:"mini"},on:{click:function(n){t.handleEdit(e.$index,e.row)}}},[t._v("详情")]),n("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(n){t.handleDelete(e.$index,e.row)}}},[t._v("删除")])]}}])})],1),n("div",{staticClass:"Pagination",staticStyle:{"text-align":"left","margin-top":"10px"}},[n("el-pagination",{attrs:{"current-page":t.currentPage,"page-size":20,layout:"total, prev, pager, next",total:t.statistic.sum.videoSum},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1)],1)],1)},a=[],i=n("5176"),o=n.n(i),s=(n("ac6a"),n("cebc")),c=(n("96cf"),n("3b8d")),u=n("1a2e"),l=n("521f"),f=n("2f62"),d=n("8b55"),m={activated:function(){this.fetchVideoList()},data:function(){var t=this,e=function(){var e=Object(c["a"])(regeneratorRuntime.mark(function e(n,r,a){var i;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(""!==r){e.next=4;break}a(new Error("请输入用户登录邮箱")),e.next=18;break;case 4:if(d["b"].test(r)){e.next=8;break}a(new Error("邮箱格式错误")),e.next=18;break;case 8:return e.prev=8,e.next=11,t.$axios.get("/api/common/user/detectEmail/".concat(r));case 11:i=e.sent,200===i.status&&a(),e.next=18;break;case 15:e.prev=15,e.t0=e["catch"](8),a(new Error("邮箱未注册"));case 18:case"end":return e.stop()}},e,this,[[8,15]])}));return function(t,n,r){return e.apply(this,arguments)}}(),n=function(t,e,n){""===e?n(new Error("请输入视频URL")):d["c"].test(e)?n():n(new Error("请输入正确的视频URL"))},r=function(t,e,n){""===e?n(new Error("请输入视频封面URL")):d["a"].test(e)?n():n(new Error("请输入正确的视频封面URL"))};return{tableData:[],search:"",currentRow:null,offset:0,limit:20,count:0,currentPage:1,tempObj:{},rules:{userEmail:[{required:!0,validator:e,trigger:"blur"}],videoPath:[{required:!0,validator:n,trigger:"blur"}],videoCover:[{required:!0,validator:r,trigger:"blur"}],videoDesc:[{required:!0,message:"请输入视频描述",trigger:"blur"}]}}},computed:Object(s["a"])({},Object(f["c"])(["statistic"])),methods:{fetchVideoList:function(){var t=this;this.$axios.get("/api/admin/getAllVideo/".concat(this.currentPage)).then(function(e){var n=e.data.data;n.forEach(function(t,e,n){n[e].createdAt=new Date(n[e].createdAt).toLocaleString()}),t.tableData=n}).catch(function(){t.$message.error("网络错误！")})},confirm:function(){var t=Object(c["a"])(regeneratorRuntime.mark(function t(){var e;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return this.$refs.msgBox.loading=!0,t.next=3,this.$axios.post("/api/admin/modifyVideo",this.tempObj);case 3:e=t.sent,200===e.status?(this.$message({message:"修改成功",type:"success"}),this.fetchVideoList()):this.$message.error("网络错误！"),this.$refs.msgBox.loading=!1,this.$refs.msgBox.hide();case 7:case"end":return t.stop()}},t,this)}));function e(){return t.apply(this,arguments)}return e}(),cancel:function(){this.$refs.msgBox.loading=!1,this.$refs.msgBox.hide()},handleEdit:function(t,e){this.tempObj=o()({},e),console.log(this.tempObj),this.$refs.msgBox.show()},handleDelete:function(t,e){var n=this;this.$confirm("此操作将永久删除该视频及其相关数据, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(Object(c["a"])(regeneratorRuntime.mark(function t(){var r;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,n.$axios.post("/api/admin/delVideo",{videoId:e.videoId});case 3:r=t.sent,200===r.status&&(n.fetchUserList(),n.$message({type:"success",message:"删除视频".concat(e.videoId,"成功!")})),t.next=10;break;case 7:t.prev=7,t.t0=t["catch"](0),n.$message.error("暂时不支持删除视频。");case 10:case"end":return t.stop()}},t,this,[[0,7]])}))).catch(function(){n.$message({type:"info",message:"已取消删除"})})},handleSizeChange:function(t){console.log("每页 ".concat(t," 条"))},playHandler:function(){var t=this.$refs.video;t.src&&(t.paused?t.play():t.pause())},handleCurrentChange:function(t){this.currentPage=t,this.offset=(t-1)*this.limit,this.fetchVideoList()}},components:{HeadTop:u["a"],MessageBox:l["a"]}},h=m,p=(n("afc4"),n("2877")),b=Object(p["a"])(h,r,a,!1,null,"20572a83",null);e["default"]=b.exports},f576:function(t,e,n){"use strict";var r=n("5ca1"),a=n("2e08"),i=n("a25f");r(r.P+r.F*/Version\/10\.\d+(\.\d+)? Safari\//.test(i),"String",{padStart:function(t){return a(this,t,arguments.length>1?arguments[1]:void 0,!0)}})},f764:function(t,e,n){},fde4:function(t,e,n){n("bf90");var r=n("584a").Object;t.exports=function(t,e){return r.getOwnPropertyDescriptor(t,e)}}}]);