chunk-11f83f4a.f7fa52de.js
19.8 KB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-11f83f4a"],{"093a":function(e,t,i){"use strict";i.d(t,"h",(function(){return a})),i.d(t,"n",(function(){return o})),i.d(t,"x",(function(){return l})),i.d(t,"y",(function(){return s})),i.d(t,"b",(function(){return r})),i.d(t,"m",(function(){return c})),i.d(t,"p",(function(){return d})),i.d(t,"r",(function(){return u})),i.d(t,"v",(function(){return p})),i.d(t,"w",(function(){return f})),i.d(t,"g",(function(){return m})),i.d(t,"l",(function(){return h})),i.d(t,"a",(function(){return w})),i.d(t,"s",(function(){return b})),i.d(t,"i",(function(){return v})),i.d(t,"d",(function(){return _})),i.d(t,"q",(function(){return y})),i.d(t,"f",(function(){return g})),i.d(t,"k",(function(){return k})),i.d(t,"u",(function(){return V})),i.d(t,"c",(function(){return x})),i.d(t,"o",(function(){return S})),i.d(t,"e",(function(){return O})),i.d(t,"t",(function(){return j})),i.d(t,"j",(function(){return T}));var n=i("b775");function a(e){return Object(n["a"])({url:"/api/admin/video/create",method:"post",data:e})}function o(e){return Object(n["a"])({url:"/api/admin/video/video_list",method:"get",params:e})}function l(e){return Object(n["a"])({url:"/api/admin/video/update",method:"post",data:e})}function s(e){return Object(n["a"])({url:"/api/admin/video/update_all",method:"post",data:e})}function r(e){return Object(n["a"])({url:"/api/admin/video/check_video",method:"post",data:e})}function c(e){return Object(n["a"])({url:"/api/admin/video/delete",method:"post",data:e})}function d(e){return Object(n["a"])({url:"/api/admin/video/push",method:"post",data:e})}function u(e){return Object(n["a"])({url:"/api/admin/video/type_list",method:"get",params:e})}function p(e){return Object(n["a"])({url:"/api/admin/video/update_type",method:"post",data:e})}function f(e){return Object(n["a"])({url:"/api/admin/video/update_type_all",method:"post",data:e})}function m(e){return Object(n["a"])({url:"/api/admin/video/create_type",method:"post",data:e})}function h(e){return Object(n["a"])({url:"/api/admin/video/delete_type",method:"post",data:e})}function w(e){return Object(n["a"])({url:"/api/admin/video/actor_list",method:"post",data:e})}function b(e){return Object(n["a"])({url:"/api/admin/video/update_actor",method:"post",data:e})}function v(e){return Object(n["a"])({url:"/api/admin/video/delete_actor",method:"post",data:e})}function _(e){return Object(n["a"])({url:"/api/admin/video/create_actor",method:"post",data:e})}function y(e){return Object(n["a"])({url:"/api/admin/video/rank_list",method:"get",params:e})}function g(e){return Object(n["a"])({url:"/api/admin/video/create_rank",method:"post",data:e})}function k(e){return Object(n["a"])({url:"/api/admin/video/delete_rank",method:"post",data:e})}function V(e){return Object(n["a"])({url:"/api/admin/video/update_rank",method:"post",data:e})}function x(e){return Object(n["a"])({url:"/api/admin/cache/clearVideoCache",method:"get",params:e})}function S(e){return Object(n["a"])({url:"/api/admin/video/label_list",method:"get",params:e})}function O(e){return Object(n["a"])({url:"/api/admin/video/create_label",method:"post",data:e})}function j(e){return Object(n["a"])({url:"/api/admin/video/update_label",method:"post",data:e})}function T(e){return Object(n["a"])({url:"/api/admin/video/delete_label",method:"post",data:e})}},"09f4":function(e,t,i){"use strict";i.d(t,"a",(function(){return l})),Math.easeInOutQuad=function(e,t,i,n){return e/=n/2,e<1?i/2*e*e+t:(e--,-i/2*(e*(e-2)-1)+t)};var n=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}}();function a(e){document.documentElement.scrollTop=e,document.body.parentNode.scrollTop=e,document.body.scrollTop=e}function o(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function l(e,t,i){var l=o(),s=e-l,r=20,c=0;t="undefined"===typeof t?500:t;var d=function e(){c+=r;var o=Math.easeInOutQuad(c,l,s,t);a(o),c<t?n(e):i&&"function"===typeof i&&i()};d()}},6724:function(e,t,i){"use strict";i("8d41");var n="@@wavesContext";function a(e,t){function i(i){var n=Object.assign({},t.value),a=Object.assign({ele:e,type:"hit",color:"rgba(0, 0, 0, 0.15)"},n),o=a.ele;if(o){o.style.position="relative",o.style.overflow="hidden";var l=o.getBoundingClientRect(),s=o.querySelector(".waves-ripple");switch(s?s.className="waves-ripple":(s=document.createElement("span"),s.className="waves-ripple",s.style.height=s.style.width=Math.max(l.width,l.height)+"px",o.appendChild(s)),a.type){case"center":s.style.top=l.height/2-s.offsetHeight/2+"px",s.style.left=l.width/2-s.offsetWidth/2+"px";break;default:s.style.top=(i.pageY-l.top-s.offsetHeight/2-document.documentElement.scrollTop||document.body.scrollTop)+"px",s.style.left=(i.pageX-l.left-s.offsetWidth/2-document.documentElement.scrollLeft||document.body.scrollLeft)+"px"}return s.style.backgroundColor=a.color,s.className="waves-ripple z-active",!1}}return e[n]?e[n].removeHandle=i:e[n]={removeHandle:i},i}var o={bind:function(e,t){e.addEventListener("click",a(e,t),!1)},update:function(e,t){e.removeEventListener("click",e[n].removeHandle,!1),e.addEventListener("click",a(e,t),!1)},unbind:function(e){e.removeEventListener("click",e[n].removeHandle,!1),e[n]=null,delete e[n]}},l=function(e){e.directive("waves",o)};window.Vue&&(window.waves=o,Vue.use(l)),o.install=l;t["a"]=o},"8d41":function(e,t,i){},fdb4:function(e,t,i){"use strict";i.r(t);var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"app-container"},[i("div",{staticClass:"filter-container"},[e.openSort?e._e():i("el-button",{staticClass:"filter-item",staticStyle:{"margin-left":"10px"},attrs:{type:"primary",icon:"el-icon-edit"},on:{click:e.handleSort}},[e._v(" 排序 ")]),e.openSort?i("el-button",{staticClass:"filter-item",staticStyle:{"margin-left":"10px"},attrs:{type:"success",icon:"el-icon-edit"},on:{click:e.handleSortConfirm}},[e._v(" 确认 ")]):e._e(),e.openSort?i("el-button",{staticClass:"filter-item",staticStyle:{"margin-left":"10px"},attrs:{type:"danger",icon:"el-icon-edit"},on:{click:e.handleSortCancel}},[e._v(" 取消 ")]):e._e(),i("el-checkbox",{staticClass:"filter-item",staticStyle:{"margin-left":"15px"},on:{change:function(t){e.tableKey=e.tableKey+1}},model:{value:e.showPlays,callback:function(t){e.showPlays=t},expression:"showPlays"}},[e._v(" 播放 ")]),i("el-checkbox",{staticClass:"filter-item",staticStyle:{"margin-left":"15px"},on:{change:function(t){e.tableKey=e.tableKey+1}},model:{value:e.showLikes,callback:function(t){e.showLikes=t},expression:"showLikes"}},[e._v(" 点赞 ")]),i("el-checkbox",{staticClass:"filter-item",staticStyle:{"margin-left":"15px"},on:{change:function(t){e.tableKey=e.tableKey+1}},model:{value:e.showDislikes,callback:function(t){e.showDislikes=t},expression:"showDislikes"}},[e._v(" 差评 ")]),i("el-checkbox",{staticClass:"filter-item",staticStyle:{"margin-left":"15px"},on:{change:function(t){e.tableKey=e.tableKey+1}},model:{value:e.showTariffUsr,callback:function(t){e.showTariffUsr=t},expression:"showTariffUsr"}},[e._v(" 用户价格 ")]),i("el-checkbox",{staticClass:"filter-item",staticStyle:{"margin-left":"15px"},on:{change:function(t){e.tableKey=e.tableKey+1}},model:{value:e.showTariffVip,callback:function(t){e.showTariffVip=t},expression:"showTariffVip"}},[e._v(" VIP价格 ")]),i("el-checkbox",{staticClass:"filter-item",staticStyle:{"margin-left":"15px"},on:{change:function(t){e.tableKey=e.tableKey+1}},model:{value:e.showCreateTime,callback:function(t){e.showCreateTime=t},expression:"showCreateTime"}},[e._v(" 创建时间 ")]),i("el-checkbox",{staticClass:"filter-item",staticStyle:{"margin-left":"15px"},on:{change:function(t){e.tableKey=e.tableKey+1}},model:{value:e.showReleaseTime,callback:function(t){e.showReleaseTime=t},expression:"showReleaseTime"}},[e._v(" 上线时间 ")])],1),i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],key:e.tableKey,staticStyle:{width:"100%"},attrs:{data:e.list,border:"",fit:"","highlight-current-row":""},on:{"sort-change":e.sortChange}},[i("el-table-column",{attrs:{label:"ID",prop:"id",sortable:"custom",align:"center",width:"80","class-name":e.getSortClass()},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[i("span",[e._v(e._s(n.id))])]}}])}),i("el-table-column",{attrs:{width:"70px",label:"排序",align:"center",prop:"listorder",sortable:"custom"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[e.openSort?[i("el-input",{staticClass:"edit-input",attrs:{size:"small"},model:{value:n.listorder,callback:function(t){e.$set(n,"listorder",t)},expression:"row.listorder"}})]:i("span",[e._v(e._s(n.listorder))])]}}])}),i("el-table-column",{attrs:{label:"片名","min-width":"150px",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[i("span",[e._v(e._s(n.video_info.name))])]}}])}),i("el-table-column",{attrs:{width:"170px",label:"分类",align:"center",prop:"type",sortable:"custom"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[e.openSort?[i("el-select",{staticClass:"filter-item",attrs:{placeholder:"选择一个类型"},model:{value:n.type,callback:function(t){e.$set(n,"type",t)},expression:"row.type"}},e._l(e.viewTypeOptions,(function(e){return i("el-option",{key:e.key,attrs:{label:e.display_name,value:e.key}})})),1)]:i("span",[e._v(e._s(e._f("typeFilter")(n.type)))])]}}])}),e.showReleaseTime?i("el-table-column",{attrs:{label:"发布时间",width:"150px",align:"center",prop:"release_time",sortable:"custom"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[i("span",[e._v(e._s(e._f("parseTime")(n.video_info.release_time,"{y}-{m}-{d} {h}:{i}")))])]}}],null,!1,376413329)}):e._e(),e.showCreateTime?i("el-table-column",{attrs:{label:"创建时间",width:"150px",align:"center",prop:"create_time",sortable:"custom"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[i("span",[e._v(e._s(e._f("parseTime")(n.video_info.create_time,"{y}-{m}-{d} {h}:{i}")))])]}}],null,!1,3993721244)}):e._e(),e.showPlays?i("el-table-column",{attrs:{label:"播放次数",width:"110px",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[i("span",[e._v(e._s(n.video_info.plays))])]}}],null,!1,1577716061)}):e._e(),e.showLikes?i("el-table-column",{attrs:{label:"点赞",width:"110px",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[i("span",[e._v(e._s(n.video_info.likes))])]}}],null,!1,1987848370)}):e._e(),e.showDislikes?i("el-table-column",{attrs:{label:"差评",width:"110px",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[i("span",[e._v(e._s(n.video_info.dislikes))])]}}],null,!1,3213688876)}):e._e(),e.showTariffUsr?i("el-table-column",{attrs:{label:"用户价格",width:"110px",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[i("span",[e._v(e._s(n.video_info.tariff_usr))])]}}],null,!1,1994459855)}):e._e(),e.showTariffVip?i("el-table-column",{attrs:{label:"VIP价格",width:"110px",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[i("span",[e._v(e._s(n.video_info.tariff_vip))])]}}],null,!1,2355798324)}):e._e(),i("el-table-column",{attrs:{label:"操作",align:"center",width:"200","class-name":"small-padding fixed-width"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row,a=t.$index;return[0!=n.status?i("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(t){return e.handleDelete(n,a)}}},[e._v(" 删除 ")]):e._e()]}}])})],1),i("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total>0"}],attrs:{total:e.total,page:e.listQuery.page,limit:e.listQuery.limit},on:{"update:page":function(t){return e.$set(e.listQuery,"page",t)},"update:limit":function(t){return e.$set(e.listQuery,"limit",t)},pagination:e.getList}}),i("el-dialog",{attrs:{title:e.textMap[e.dialogStatus],visible:e.dialogFormVisible,"close-on-click-modal":!1},on:{"update:visible":function(t){e.dialogFormVisible=t}}},[i("el-form",{ref:"dataForm",staticStyle:{width:"400px","margin-left":"50px"},attrs:{rules:e.rules,model:e.newVideo,"label-position":"left","label-width":"70px"}},[i("el-form-item",{attrs:{label:"片名",prop:"name"}},[i("el-input",{model:{value:e.newVideo.name,callback:function(t){e.$set(e.newVideo,"name",t)},expression:"newVideo.name"}})],1),i("el-form-item",{attrs:{label:"类型",prop:"view_type"}},[i("el-select",{staticClass:"filter-item",attrs:{placeholder:"选择一个类型"},model:{value:e.newVideo.show_view_type,callback:function(t){e.$set(e.newVideo,"show_view_type",t)},expression:"newVideo.show_view_type"}},e._l(e.viewTypeOptions,(function(e){return i("el-option",{key:e.key,attrs:{label:e.display_name,value:e.key}})})),1)],1),i("el-form-item",{attrs:{label:"分类",prop:"tid"}},[i("el-checkbox-group",{model:{value:e.newVideo.tid,callback:function(t){e.$set(e.newVideo,"tid",t)},expression:"newVideo.tid"}},e._l(e.typesOptions,(function(t){return i("el-checkbox",{key:t.id,attrs:{label:t.id,"true-label":""}},[e._v(e._s(t.name))])})),1)],1),i("el-form-item",{attrs:{label:"发布时间",prop:"release_time"}},[i("el-date-picker",{attrs:{type:"datetime",placeholder:"请选择一个日期"},model:{value:e.newVideo.release_time,callback:function(t){e.$set(e.newVideo,"release_time",t)},expression:"newVideo.release_time"}})],1),i("el-form-item",{attrs:{label:"视频标签",prop:"video_labels"}},[i("el-input",{model:{value:e.newVideo.video_labels,callback:function(t){e.$set(e.newVideo,"video_labels",t)},expression:"newVideo.video_labels"}})],1),i("el-form-item",{attrs:{label:"演员",prop:"actors"}},[i("el-input",{model:{value:e.newVideo.actors,callback:function(t){e.$set(e.newVideo,"actors",t)},expression:"newVideo.actors"}})],1),i("el-form-item",{attrs:{label:"价格",prop:"tariff_usr"}},[i("el-input",{model:{value:e.newVideo.tariff_usr,callback:function(t){e.$set(e.newVideo,"tariff_usr",t)},expression:"newVideo.tariff_usr"}})],1),i("el-form-item",{attrs:{label:"VIP价格",prop:"tariff_vip"}},[i("el-input",{model:{value:e.newVideo.tariff_vip,callback:function(t){e.$set(e.newVideo,"tariff_vip",t)},expression:"newVideo.tariff_vip"}})],1),i("el-form-item",{attrs:{label:"播放次数",prop:"plays"}},[i("el-input",{model:{value:e.newVideo.plays,callback:function(t){e.$set(e.newVideo,"plays",t)},expression:"newVideo.plays"}})],1),i("el-form-item",{attrs:{label:"喜欢",prop:"likes"}},[i("el-input",{model:{value:e.newVideo.likes,callback:function(t){e.$set(e.newVideo,"likes",t)},expression:"newVideo.likes"}})],1),i("el-form-item",{attrs:{label:"踩",prop:"dislikes"}},[i("el-input",{model:{value:e.newVideo.dislikes,callback:function(t){e.$set(e.newVideo,"dislikes",t)},expression:"newVideo.dislikes"}})],1),i("el-form-item",{attrs:{label:"时长",prop:"time_len"}},[i("el-input",{model:{value:e.newVideo.time_len,callback:function(t){e.$set(e.newVideo,"time_len",t)},expression:"newVideo.time_len"}})],1),i("el-form-item",{attrs:{label:"片源",prop:"media_url"}},[i("el-input",{model:{value:e.newVideo.media_url,callback:function(t){e.$set(e.newVideo,"media_url",t)},expression:"newVideo.media_url"}})],1),i("el-form-item",{attrs:{label:"试看片源",prop:"free_media_url"}},[i("el-input",{model:{value:e.newVideo.free_media_url,callback:function(t){e.$set(e.newVideo,"free_media_url",t)},expression:"newVideo.free_media_url"}})],1),i("el-form-item",{attrs:{label:"横图",prop:"img2"}},[i("el-input",{model:{value:e.newVideo.img2,callback:function(t){e.$set(e.newVideo,"img2",t)},expression:"newVideo.img2"}})],1),i("el-form-item",{attrs:{label:"竖图",prop:"img1"}},[i("el-input",{model:{value:e.newVideo.img1,callback:function(t){e.$set(e.newVideo,"img1",t)},expression:"newVideo.img1"}})],1),i("el-form-item",{attrs:{label:"缩略图",prop:"img3"}},[i("el-input",{model:{value:e.newVideo.img3,callback:function(t){e.$set(e.newVideo,"img3",t)},expression:"newVideo.img3"}})],1),i("el-form-item",{attrs:{label:"试看大图",prop:"img4"}},[i("el-input",{model:{value:e.newVideo.img4,callback:function(t){e.$set(e.newVideo,"img4",t)},expression:"newVideo.img4"}})],1),i("el-form-item",{attrs:{label:"简介"}},[i("el-input",{attrs:{autosize:{minRows:2,maxRows:4},type:"textarea",placeholder:"输入简介.."},model:{value:e.newVideo.desc,callback:function(t){e.$set(e.newVideo,"desc",t)},expression:"newVideo.desc"}})],1)],1),i("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(t){e.dialogFormVisible=!1}}},[e._v(" 取消 ")]),i("el-button",{attrs:{type:"primary"},on:{click:function(t){"create"===e.dialogStatus?e.createData():e.updateData()}}},[e._v(" 提交 ")])],1)],1)],1)},a=[],o=(i("c740"),i("13d5"),i("a434"),i("093a")),l=i("6724"),s=i("333d"),r=["下线","上线"],c=["普通","推荐"],d=["普通","首页"],u=[{key:0,display_name:"默认"},{key:1,display_name:"热播榜"},{key:2,display_name:"推荐榜"},{key:3,display_name:"付费榜"}],p=u.reduce((function(e,t){return e[t.key]=t.display_name,e}),{}),f={name:"RankList",components:{Pagination:s["a"]},directives:{waves:l["a"]},filters:{typeFilter:function(e){return p[e]},isCheckFilter:function(e){return r[e]},betterShowFilter:function(e){return c[e]},homeShowFilter:function(e){return d[e]}},data:function(){return{tableKey:0,list:null,total:0,listLoading:!0,listQuery:{page:1,limit:20,view_type:void 0,video_type:void 0,name:void 0,varieties:0,sort:"id desc"},typesOptions:[],viewTypeOptions:u,showPlays:!1,showLikes:!1,showDislikes:!1,showTariffVip:!1,showTariffUsr:!1,showCreateTime:!1,showReleaseTime:!1,openSort:!1,newVideo:{},dialogFormVisible:!1,dialogStatus:"",textMap:{update:"编辑",create:"创建"},rules:{name:[{required:!0,message:"请输入片名",trigger:"blur"}]}}},created:function(){this.getList()},methods:{getList:function(){var e=this;this.listLoading=!0,Object(o["q"])(this.listQuery).then((function(t){e.total=t.data.total,e.list=t.data.list,e.listLoading=!1}))},takeViewType:function(e){return p[e]},handleFilter:function(){this.listQuery.page=1,this.getList()},sortChange:function(e){var t=e.prop,i=e.order;this.listQuery.sort="ascending"===i?t:t+" desc",this.handleFilter()},handleUpdate:function(e){var t=this;this.newVideo=Object.assign({},e),this.newVideo.release_time=new Date(this.newVideo.release_time),this.newVideo.show_view_type=this.takeViewType(this.newVideo.view_type),this.dialogStatus="update",this.dialogFormVisible=!0,this.$nextTick((function(){t.$refs["dataForm"].clearValidate()}))},updateData:function(){var e=this;this.$refs["dataForm"].validate((function(t){if(t){var i=Object.assign({},e.newVideo);i.release_time=+new Date(i.release_time),Object(o["x"])(i).then((function(){var t=e.list.findIndex((function(t){return t.id===e.newVideo.id}));e.list.splice(t,1,e.newVideo),e.dialogFormVisible=!1,e.$notify({title:"Success",message:"操作成功",type:"success",duration:2e3})}))}}))},handleDelete:function(e,t){var i=this;this.listLoading=!0,Object(o["k"])(e).then((function(){i.list.splice(t,1),i.listLoading=!1,i.$notify({title:"Success",message:"操作成功",type:"success",duration:2e3})})).catch((function(){i.listLoading=!1}))},getSortClass:function(){var e=this.listQuery.sort;return"id"===e?"ascending":"descending"},handleCheckStatus:function(e,t){var i=this;this.listLoading=!0,e.is_check=t,Object(o["b"])(e).then((function(){i.listLoading=!1,i.$notify({title:"Success",message:"操作成功",type:"success",duration:2e3})})).catch((function(){i.listLoading=!1}))},handleBetterStatus:function(e,t){e.better_show=t},handleHomeStatus:function(e,t){e.home_show=t},handleSort:function(){this.openSort=!0},handleSortCancel:function(){this.getList(),this.openSort=!1},handleSortConfirm:function(){var e=this;if(this.listLoading=!0,this.list){var t=Object.assign({},this.list);Object(o["u"])(t).then((function(t){e.openSort=!1,e.listLoading=!1,e.$notify({title:"成功",message:t.message,type:"success",duration:2e3})})).catch((function(){e.listLoading=!1}))}},handleVarieties:function(e){this.listQuery.varieties=e,this.getList()}}},m=f,h=i("2877"),w=Object(h["a"])(m,n,a,!1,null,null,null);t["default"]=w.exports}}]);