chunk-b1995ef8.76172be0.js
13.9 KB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-b1995ef8"],{"09f4":function(e,t,i){"use strict";i.d(t,"a",(function(){return r})),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 r(e,t,i){var r=o(),s=e-r,l=20,c=0;t="undefined"===typeof t?500:t;var u=function e(){c+=l;var o=Math.easeInOutQuad(c,r,s,t);a(o),c<t?n(e):i&&"function"===typeof i&&i()};u()}},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 r=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(r.width,r.height)+"px",o.appendChild(s)),a.type){case"center":s.style.top=r.height/2-s.offsetHeight/2+"px",s.style.left=r.width/2-s.offsetWidth/2+"px";break;default:s.style.top=(i.pageY-r.top-s.offsetHeight/2-document.documentElement.scrollTop||document.body.scrollTop)+"px",s.style.left=(i.pageX-r.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]}},r=function(e){e.directive("waves",o)};window.Vue&&(window.waves=o,Vue.use(r)),o.install=r;t["a"]=o},"8d41":function(e,t,i){},"90e7":function(e,t,i){"use strict";i.d(t,"k",(function(){return a})),i.d(t,"o",(function(){return o})),i.d(t,"h",(function(){return r})),i.d(t,"b",(function(){return s})),i.d(t,"e",(function(){return l})),i.d(t,"s",(function(){return c})),i.d(t,"r",(function(){return u})),i.d(t,"l",(function(){return d})),i.d(t,"f",(function(){return p})),i.d(t,"p",(function(){return m})),i.d(t,"i",(function(){return f})),i.d(t,"m",(function(){return h})),i.d(t,"q",(function(){return v})),i.d(t,"j",(function(){return y})),i.d(t,"d",(function(){return g})),i.d(t,"n",(function(){return b})),i.d(t,"g",(function(){return w})),i.d(t,"c",(function(){return _})),i.d(t,"a",(function(){return k}));var n=i("b775");function a(e){return Object(n["a"])({url:"/api/admin/setting/pay_list",method:"get",params:e})}function o(e){return Object(n["a"])({url:"/api/admin/setting/update_pay",method:"post",data:e})}function r(e){return Object(n["a"])({url:"/api/admin/setting/delete_pay",method:"post",params:e})}function s(e){return Object(n["a"])({url:"/api/admin/setting/auto_pay",method:"POST",data:e})}function l(e){return Object(n["a"])({url:"/api/admin/setting/create_pay",method:"post",params:e})}function c(e){return Object(n["a"])({url:"/api/admin/setting/vip_list",method:"get",params:e})}function u(e){return Object(n["a"])({url:"/api/admin/setting/update_vip",method:"post",data:e})}function d(e){return Object(n["a"])({url:"/api/admin/setting/publicity_list",method:"get",params:e})}function p(e){return Object(n["a"])({url:"/api/admin/setting/create_publicity",method:"post",data:e})}function m(e){return Object(n["a"])({url:"/api/admin/setting/update_publicity",method:"post",data:e})}function f(e){return Object(n["a"])({url:"/api/admin/setting/delete_publicity",method:"post",data:e})}function h(e){return Object(n["a"])({url:"/api/admin/setting/system_list",method:"get",params:e})}function v(e){return Object(n["a"])({url:"/api/admin/setting/update_system",method:"post",data:e})}function y(e){return Object(n["a"])({url:"/api/admin/setting/notice_list",method:"get",params:e})}function g(e){return Object(n["a"])({url:"/api/admin/setting/create_notice",method:"post",data:e})}function b(e){return Object(n["a"])({url:"/api/admin/setting/update_notice",method:"post",data:e})}function w(e){return Object(n["a"])({url:"/api/admin/setting/delete_notice",method:"post",data:e})}function _(e){return Object(n["a"])({url:"/api/admin/cache/clearSettingCache",method:"get",params:e})}function k(e){return Object(n["a"])({url:"/api/admin/setting/setting_link",method:"post",data:e})}},ec94: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"},[i("el-input",{staticClass:"filter-item",staticStyle:{width:"200px"},attrs:{placeholder:"名字"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleFilter(t)}},model:{value:e.listQuery.name,callback:function(t){e.$set(e.listQuery,"name",t)},expression:"listQuery.name"}}),i("el-button",{staticClass:"filter-item",attrs:{type:"primary",icon:"el-icon-search"},on:{click:e.handleFilter}},[e._v(" 搜索 ")]),i("el-switch",{attrs:{"active-value":1,"inactive-value":0,"active-color":"#13ce66","inactive-color":"#ff4949","active-text":"自动","inactive-text":"手动"},on:{change:e.autoPaySwitch},model:{value:e.isAuto,callback:function(t){e.isAuto=t},expression:"isAuto"}})],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:{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.name))])]}}])}),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(e._f("typeFilter")(n.pay_type)))])]}}])}),i("el-table-column",{attrs:{label:"上线",align:"center",width:"80","class-name":"small-padding fixed-width",prop:"is_check",sortable:"custom"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[1==n.is_check?i("el-button",{attrs:{size:"mini",type:"success"}},[e._v(" "+e._s(e._f("isCheckFilter")(n.is_check))+" ")]):e._e(),0==n.is_check?i("el-button",{attrs:{size:"mini",type:"draft"}},[e._v(" "+e._s(e._f("isCheckFilter")(n.is_check))+" ")]):e._e()]}}])}),i("el-table-column",{attrs:{label:"自动切换",align:"center",width:"120","class-name":"small-padding fixed-width",prop:"auto",sortable:"custom"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[1==n.auto?i("el-button",{attrs:{size:"mini",type:"success"}},[e._v(" "+e._s(e._f("isCheckFilter")(n.auto))+" ")]):e._e(),0==n.auto?i("el-button",{attrs:{size:"mini",type:"draft"}},[e._v(" "+e._s(e._f("isCheckFilter")(n.auto))+" ")]):e._e()]}}])}),i("el-table-column",{attrs:{width:"70px",label:"排序",align:"center",prop:"pay_order",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.pay_order))])]}}])}),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.pay_name))])]}}])}),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[i("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(t){return e.handleUpdate(n)}}},[e._v(" 编辑 ")]),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":"right","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:"is_check"}},[i("el-switch",{attrs:{"active-value":1,"inactive-value":0,"active-color":"#13ce66","inactive-color":"#ff4949"},model:{value:e.newVideo.is_check,callback:function(t){e.$set(e.newVideo,"is_check",t)},expression:"newVideo.is_check"}})],1),i("el-form-item",{attrs:{label:"自动切换",prop:"auto"}},[i("el-switch",{attrs:{"active-value":1,"inactive-value":0,"active-color":"#13ce66","inactive-color":"#ff4949"},model:{value:e.newVideo.auto,callback:function(t){e.$set(e.newVideo,"auto",t)},expression:"newVideo.auto"}})],1),i("el-form-item",{attrs:{label:"排序",prop:"pay_order"}},[i("el-input",{model:{value:e.newVideo.pay_order,callback:function(t){e.$set(e.newVideo,"pay_order",t)},expression:"newVideo.pay_order"}})],1),i("el-form-item",{attrs:{label:"备注",prop:"pay_name"}},[i("el-input",{model:{value:e.newVideo.pay_name,callback:function(t){e.$set(e.newVideo,"pay_name",t)},expression:"newVideo.pay_name"}})],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("90e7")),r=i("6724"),s=i("333d"),l=["否","是"],c=["普通","推荐"],u=["否","是"],d=[{key:"1",display_name:"支付宝"},{key:"2",display_name:"微信"}],p=d.reduce((function(e,t){return e[t.key]=t.display_name,e}),{}),m={name:"SettingPay",components:{Pagination:s["a"]},directives:{waves:r["a"]},filters:{isCheckFilter:function(e){return l[e]},betterShowFilter:function(e){return c[e]},homeShowFilter:function(e){return u[e]},typeFilter:function(e){return p[e]}},data:function(){return{tableKey:0,list:null,total:0,listLoading:!0,isAuto:0,listQuery:{page:1,limit:20,view_type:void 0,video_type:void 0,name:void 0,sort:"id desc"},typesOptions:[],newVideo:{},dialogFormVisible:!1,dialogStatus:"",textMap:{update:"编辑",create:"创建"},openSort:!1,viewTypeOptions:d,rules:{name:[{required:!0,message:"请输入演员名字",trigger:"blur"}],pay_type:[{required:!0,message:"请选择类型",trigger:"blur"}],pay_order:[{required:!0,message:"排序必须输入",trigger:"blur"}]}}},created:function(){this.getList()},methods:{getList:function(){var e=this;this.listLoading=!0,Object(o["k"])(this.listQuery).then((function(t){e.isAuto=t.data.auto,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.dialogStatus="update",this.dialogFormVisible=!0,this.newVideo.show_view_type=this.takeViewType(this.newVideo.pay_type),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);Object(o["o"])(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["h"])(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}))},handleCreate:function(e,t){var i=this;this.newVideo={},this.dialogStatus="create",this.dialogFormVisible=!0,this.$nextTick((function(){i.$refs["dataForm"].clearValidate()}))},createData:function(){var e=this;this.$refs["dataForm"].validate((function(t){t&&Object(o["e"])(e.newVideo).then((function(){e.dialogFormVisible=!1,e.getList(),e.$notify({title:"Success",message:"创建成功",type:"success",duration:2e3})}))}))},getSortClass:function(){var e=this.listQuery.sort;return"id"===e?"ascending":"descending"},autoPaySwitch:function(){var e=this;Object(o["b"])({id:this.isAuto}).then((function(){e.$notify({title:"Success",message:"修改成功",type:"success",duration:2e3})}))}}},f=m,h=i("2877"),v=Object(h["a"])(f,n,a,!1,null,null,null);t["default"]=v.exports}}]);