chunk-74547b20.c594f226.js
12.9 KB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-74547b20"],{"09f4":function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),Math.easeInOutQuad=function(e,t,n,i){return e/=i/2,e<1?n/2*e*e+t:(e--,-n/2*(e*(e-2)-1)+t)};var i=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,n){var r=o(),l=e-r,s=20,u=0;t="undefined"===typeof t?500:t;var c=function e(){u+=s;var o=Math.easeInOutQuad(u,r,l,t);a(o),u<t?i(e):n&&"function"===typeof n&&n()};c()}},"61ac":function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"app-container"},[n("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}},[n("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 i=t.row;return[n("span",[e._v(e._s(i.id))])]}}])}),n("el-table-column",{attrs:{label:"类型","min-width":"150px",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.row;return["vip"===i.recharge_type?n("span",[e._v("会员充值")]):e._e(),"coin"===i.recharge_type?n("span",[e._v("金币充值")]):e._e()]}}])}),n("el-table-column",{attrs:{label:"显示金额",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.row;return[n("span",[e._v(e._s(i.show_money))])]}}])}),n("el-table-column",{attrs:{label:"实际金额",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.row;return[n("span",[e._v(e._s(i.money))])]}}])}),n("el-table-column",{attrs:{label:"首冲赠送",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.row;return[n("span",[e._v(e._s(i.first))])]}}])}),n("el-table-column",{attrs:{label:"介绍","min-width":"150px",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.row;return[n("span",[e._v(e._s(i.content))])]}}])}),n("el-table-column",{attrs:{width:"70px",label:"排序",align:"center",prop:"vip_order",sortable:"custom"},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.row;return[n("span",[e._v(e._s(i.vip_order))])]}}])}),n("el-table-column",{attrs:{label:"操作",align:"center",width:"200","class-name":"small-padding fixed-width"},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.row;return[n("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(t){return e.handleUpdate(i)}}},[e._v(" 编辑 ")])]}}])})],1),n("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}}),n("el-dialog",{attrs:{title:e.textMap[e.dialogStatus],visible:e.dialogFormVisible,"close-on-click-modal":!1},on:{"update:visible":function(t){e.dialogFormVisible=t}}},[n("el-form",{ref:"dataForm",staticStyle:{width:"400px","margin-left":"50px"},attrs:{rules:e.rules,model:e.newVideo,"label-position":"right","label-width":"70px"}},[n("el-form-item",{attrs:{label:"类型",prop:"recharge_type"}},[n("el-select",{staticClass:"filter-item",attrs:{placeholder:"选择一个类型"},model:{value:e.newVideo.recharge_type,callback:function(t){e.$set(e.newVideo,"recharge_type",t)},expression:"newVideo.recharge_type"}},[n("el-option",{key:"1",attrs:{label:"会员充值",value:"vip"}}),n("el-option",{key:"2",attrs:{label:"金币充值",value:"coin"}})],1)],1),n("el-form-item",{attrs:{label:"支付",prop:"tid"}},[n("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 n("el-checkbox",{key:t.id,attrs:{label:t.id,"true-label":""}},[e._v(e._s(t.name))])})),1)],1),n("el-form-item",{attrs:{label:"开启",prop:"delete"}},[n("el-switch",{attrs:{"active-value":0,"inactive-value":1,"active-color":"#13ce66","inactive-color":"#ff4949"},model:{value:e.newVideo.delete,callback:function(t){e.$set(e.newVideo,"delete",t)},expression:"newVideo.delete"}})],1),n("el-form-item",{attrs:{label:"显示金额",prop:"show_money"}},[n("el-input",{model:{value:e.newVideo.show_money,callback:function(t){e.$set(e.newVideo,"show_money",t)},expression:"newVideo.show_money"}})],1),n("el-form-item",{attrs:{label:"实际金额",prop:"money"}},[n("el-input",{model:{value:e.newVideo.money,callback:function(t){e.$set(e.newVideo,"money",t)},expression:"newVideo.money"}})],1),n("el-form-item",{attrs:{label:"时长",prop:"time"}},[n("el-input",{model:{value:e.newVideo.time,callback:function(t){e.$set(e.newVideo,"time",t)},expression:"newVideo.time"}})],1),n("el-form-item",{attrs:{label:"期限",prop:"vip_type"}},[n("el-select",{staticClass:"filter-item",attrs:{placeholder:"选择一个类型"},model:{value:e.newVideo.vip_type,callback:function(t){e.$set(e.newVideo,"vip_type",t)},expression:"newVideo.vip_type"}},[n("el-option",{key:"1",attrs:{label:"月",value:1}}),n("el-option",{key:"2",attrs:{label:"天",value:2}}),n("el-option",{key:"3",attrs:{label:"永久",value:99}})],1)],1),n("el-form-item",{attrs:{label:"获得金币",prop:"coin"}},[n("el-input",{model:{value:e.newVideo.coin,callback:function(t){e.$set(e.newVideo,"coin",t)},expression:"newVideo.coin"}})],1),n("el-form-item",{attrs:{label:"首冲赠送",prop:"first"}},[n("el-input",{model:{value:e.newVideo.first,callback:function(t){e.$set(e.newVideo,"first",t)},expression:"newVideo.first"}})],1),n("el-form-item",{attrs:{label:"转单",prop:"transfer"}},[n("el-input",{model:{value:e.newVideo.transfer,callback:function(t){e.$set(e.newVideo,"transfer",t)},expression:"newVideo.transfer"}})],1),n("el-form-item",{attrs:{label:"排序",prop:"vip_order"}},[n("el-input",{model:{value:e.newVideo.vip_order,callback:function(t){e.$set(e.newVideo,"vip_order",t)},expression:"newVideo.vip_order"}})],1),n("el-form-item",{attrs:{label:"介绍",prop:"content"}},[n("el-input",{model:{value:e.newVideo.content,callback:function(t){e.$set(e.newVideo,"content",t)},expression:"newVideo.content"}})],1)],1),n("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{on:{click:function(t){e.dialogFormVisible=!1}}},[e._v(" 取消 ")]),n("el-button",{attrs:{type:"primary"},on:{click:function(t){"create"===e.dialogStatus?e.createData():e.updateData()}}},[e._v(" 提交 ")])],1)],1)],1)},a=[],o=(n("c740"),n("13d5"),n("a434"),n("90e7")),r=n("6724"),l=n("333d"),s=["否","是"],u=["普通","推荐"],c=["否","是"],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:"SettingVip",components:{Pagination:l["a"]},directives:{waves:r["a"]},filters:{isCheckFilter:function(e){return s[e]},betterShowFilter:function(e){return u[e]},homeShowFilter:function(e){return c[e]},typeFilter:function(e){return p[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,sort:"id"},newVideo:{},typesOptions:[],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["s"])(this.listQuery).then((function(t){e.total=t.data.total,e.list=t.data.list,e.typesOptions=t.data.types,e.listLoading=!1}))},takeViewType:function(e){return p[e]},handleFilter:function(){this.listQuery.page=1,this.getList()},sortChange:function(e){var t=e.prop,n=e.order;this.listQuery.sort="ascending"===n?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 n=Object.assign({},e.newVideo);Object(o["r"])(n).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})}))}}))},getSortClass:function(){var e=this.listQuery.sort;return"id"===e?"ascending":"descending"}}},f=m,b=n("2877"),v=Object(b["a"])(f,i,a,!1,null,null,null);t["default"]=v.exports},6724:function(e,t,n){"use strict";n("8d41");var i="@@wavesContext";function a(e,t){function n(n){var i=Object.assign({},t.value),a=Object.assign({ele:e,type:"hit",color:"rgba(0, 0, 0, 0.15)"},i),o=a.ele;if(o){o.style.position="relative",o.style.overflow="hidden";var r=o.getBoundingClientRect(),l=o.querySelector(".waves-ripple");switch(l?l.className="waves-ripple":(l=document.createElement("span"),l.className="waves-ripple",l.style.height=l.style.width=Math.max(r.width,r.height)+"px",o.appendChild(l)),a.type){case"center":l.style.top=r.height/2-l.offsetHeight/2+"px",l.style.left=r.width/2-l.offsetWidth/2+"px";break;default:l.style.top=(n.pageY-r.top-l.offsetHeight/2-document.documentElement.scrollTop||document.body.scrollTop)+"px",l.style.left=(n.pageX-r.left-l.offsetWidth/2-document.documentElement.scrollLeft||document.body.scrollLeft)+"px"}return l.style.backgroundColor=a.color,l.className="waves-ripple z-active",!1}}return e[i]?e[i].removeHandle=n:e[i]={removeHandle:n},n}var o={bind:function(e,t){e.addEventListener("click",a(e,t),!1)},update:function(e,t){e.removeEventListener("click",e[i].removeHandle,!1),e.addEventListener("click",a(e,t),!1)},unbind:function(e){e.removeEventListener("click",e[i].removeHandle,!1),e[i]=null,delete e[i]}},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,n){},"90e7":function(e,t,n){"use strict";n.d(t,"k",(function(){return a})),n.d(t,"o",(function(){return o})),n.d(t,"h",(function(){return r})),n.d(t,"b",(function(){return l})),n.d(t,"e",(function(){return s})),n.d(t,"s",(function(){return u})),n.d(t,"r",(function(){return c})),n.d(t,"l",(function(){return d})),n.d(t,"f",(function(){return p})),n.d(t,"p",(function(){return m})),n.d(t,"i",(function(){return f})),n.d(t,"m",(function(){return b})),n.d(t,"q",(function(){return v})),n.d(t,"j",(function(){return g})),n.d(t,"d",(function(){return w})),n.d(t,"n",(function(){return h})),n.d(t,"g",(function(){return y})),n.d(t,"c",(function(){return _})),n.d(t,"a",(function(){return V}));var i=n("b775");function a(e){return Object(i["a"])({url:"/api/admin/setting/pay_list",method:"get",params:e})}function o(e){return Object(i["a"])({url:"/api/admin/setting/update_pay",method:"post",data:e})}function r(e){return Object(i["a"])({url:"/api/admin/setting/delete_pay",method:"post",params:e})}function l(e){return Object(i["a"])({url:"/api/admin/setting/auto_pay",method:"POST",data:e})}function s(e){return Object(i["a"])({url:"/api/admin/setting/create_pay",method:"post",params:e})}function u(e){return Object(i["a"])({url:"/api/admin/setting/vip_list",method:"get",params:e})}function c(e){return Object(i["a"])({url:"/api/admin/setting/update_vip",method:"post",data:e})}function d(e){return Object(i["a"])({url:"/api/admin/setting/publicity_list",method:"get",params:e})}function p(e){return Object(i["a"])({url:"/api/admin/setting/create_publicity",method:"post",data:e})}function m(e){return Object(i["a"])({url:"/api/admin/setting/update_publicity",method:"post",data:e})}function f(e){return Object(i["a"])({url:"/api/admin/setting/delete_publicity",method:"post",data:e})}function b(e){return Object(i["a"])({url:"/api/admin/setting/system_list",method:"get",params:e})}function v(e){return Object(i["a"])({url:"/api/admin/setting/update_system",method:"post",data:e})}function g(e){return Object(i["a"])({url:"/api/admin/setting/notice_list",method:"get",params:e})}function w(e){return Object(i["a"])({url:"/api/admin/setting/create_notice",method:"post",data:e})}function h(e){return Object(i["a"])({url:"/api/admin/setting/update_notice",method:"post",data:e})}function y(e){return Object(i["a"])({url:"/api/admin/setting/delete_notice",method:"post",data:e})}function _(e){return Object(i["a"])({url:"/api/admin/cache/clearSettingCache",method:"get",params:e})}function V(e){return Object(i["a"])({url:"/api/admin/setting/setting_link",method:"post",data:e})}}}]);