chunk-77fbd5ee.b2175080.js 10.5 KB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-77fbd5ee"],{"09f4":function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),Math.easeInOutQuad=function(t,e,n,i){return t/=i/2,t<1?n/2*t*t+e:(t--,-n/2*(t*(t-2)-1)+e)};var i=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)}}();function a(t){document.documentElement.scrollTop=t,document.body.parentNode.scrollTop=t,document.body.scrollTop=t}function o(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function r(t,e,n){var r=o(),s=t-r,l=20,u=0;e="undefined"===typeof e?500:e;var c=function t(){u+=l;var o=Math.easeInOutQuad(u,r,s,e);a(o),u<e?i(t):n&&"function"===typeof n&&n()};c()}},"148d":function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"app-container"},[n("div",{staticClass:"filter-container"},[n("el-button",{staticClass:"filter-item",staticStyle:{"margin-left":"10px"},attrs:{type:"primary",icon:"el-icon-edit"},on:{click:t.handleCreate}},[t._v(" 创建 ")])],1),n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],key:t.tableKey,staticStyle:{width:"100%"},attrs:{data:t.list,border:"",fit:"","highlight-current-row":""},on:{"sort-change":t.sortChange}},[n("el-table-column",{attrs:{label:"ID",prop:"id",sortable:"custom",align:"center",width:"80","class-name":t.getSortClass()},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[n("span",[t._v(t._s(i.id))])]}}])}),n("el-table-column",{attrs:{label:"说明","min-width":"150px",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[n("span",[t._v(t._s(i.timestamp))])]}}])}),n("el-table-column",{attrs:{label:"内容","min-width":"150px",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[n("span",[t._v(t._s(i.content))])]}}])}),n("el-table-column",{attrs:{label:"操作",align:"center",width:"200","class-name":"small-padding fixed-width"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row,a=e.$index;return[n("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.handleUpdate(i)}}},[t._v(" 编辑 ")]),0!=i.status?n("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(e){return t.handleDelete(i,a)}}},[t._v(" 删除 ")]):t._e()]}}])})],1),n("pagination",{directives:[{name:"show",rawName:"v-show",value:t.total>0,expression:"total>0"}],attrs:{total:t.total,page:t.listQuery.page,limit:t.listQuery.limit},on:{"update:page":function(e){return t.$set(t.listQuery,"page",e)},"update:limit":function(e){return t.$set(t.listQuery,"limit",e)},pagination:t.getList}}),n("el-dialog",{attrs:{title:t.textMap[t.dialogStatus],visible:t.dialogFormVisible,"close-on-click-modal":!1},on:{"update:visible":function(e){t.dialogFormVisible=e}}},[n("el-form",{ref:"dataForm",staticStyle:{width:"400px","margin-left":"50px"},attrs:{rules:t.rules,model:t.newVideo,"label-position":"right","label-width":"70px"}},[n("el-form-item",{attrs:{label:"说明",prop:"timestamp"}},[n("el-input",{model:{value:t.newVideo.timestamp,callback:function(e){t.$set(t.newVideo,"timestamp",e)},expression:"newVideo.timestamp"}})],1),n("el-form-item",{attrs:{label:"内容",prop:"content"}},[n("el-input",{model:{value:t.newVideo.content,callback:function(e){t.$set(t.newVideo,"content",e)},expression:"newVideo.content"}})],1)],1),n("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{on:{click:function(e){t.dialogFormVisible=!1}}},[t._v(" 取消 ")]),n("el-button",{attrs:{type:"primary"},on:{click:function(e){"create"===t.dialogStatus?t.createData():t.updateData()}}},[t._v(" 提交 ")])],1)],1)],1)},a=[],o=(n("c740"),n("13d5"),n("a434"),n("90e7")),r=n("6724"),s=n("333d"),l=["否","是"],u=["普通","推荐"],c=["否","是"],d=[{key:"1",display_name:"支付宝"},{key:"2",display_name:"微信"}],p=d.reduce((function(t,e){return t[e.key]=e.display_name,t}),{}),m={name:"SettingPublicity",components:{Pagination:s["a"]},directives:{waves:r["a"]},filters:{isCheckFilter:function(t){return l[t]},betterShowFilter:function(t){return u[t]},homeShowFilter:function(t){return c[t]},typeFilter:function(t){return p[t]}},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 desc"},newVideo:{},dialogFormVisible:!1,dialogStatus:"",textMap:{update:"编辑",create:"创建"},openSort:!1,viewTypeOptions:d,rules:{content:[{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 t=this;this.listLoading=!0,Object(o["l"])(this.listQuery).then((function(e){t.total=e.data.total,t.list=e.data.list,t.listLoading=!1}))},takeViewType:function(t){return p[t]},handleFilter:function(){this.listQuery.page=1,this.getList()},sortChange:function(t){var e=t.prop,n=t.order;this.listQuery.sort="ascending"===n?e:e+" desc",this.handleFilter()},handleUpdate:function(t){var e=this;this.newVideo=Object.assign({},t),this.dialogStatus="update",this.dialogFormVisible=!0,this.newVideo.show_view_type=this.takeViewType(this.newVideo.pay_type),this.$nextTick((function(){e.$refs["dataForm"].clearValidate()}))},updateData:function(){var t=this;this.$refs["dataForm"].validate((function(e){if(e){var n=Object.assign({},t.newVideo);Object(o["p"])(n).then((function(){var e=t.list.findIndex((function(e){return e.id===t.newVideo.id}));t.list.splice(e,1,t.newVideo),t.dialogFormVisible=!1,t.$notify({title:"Success",message:"操作成功",type:"success",duration:2e3})}))}}))},handleDelete:function(t,e){var n=this;this.listLoading=!0,Object(o["i"])(t).then((function(){n.list.splice(e,1),n.listLoading=!1,n.$notify({title:"Success",message:"操作成功",type:"success",duration:2e3})})).catch((function(){n.listLoading=!1}))},handleCreate:function(t,e){var n=this;this.newVideo={},this.dialogStatus="create",this.dialogFormVisible=!0,this.$nextTick((function(){n.$refs["dataForm"].clearValidate()}))},createData:function(){var t=this;this.$refs["dataForm"].validate((function(e){e&&Object(o["f"])(t.newVideo).then((function(){t.dialogFormVisible=!1,t.getList(),t.$notify({title:"Success",message:"创建成功",type:"success",duration:2e3})}))}))},getSortClass:function(){var t=this.listQuery.sort;return"id"===t?"ascending":"descending"}}},f=m,g=n("2877"),h=Object(g["a"])(f,i,a,!1,null,null,null);e["default"]=h.exports},6724:function(t,e,n){"use strict";n("8d41");var i="@@wavesContext";function a(t,e){function n(n){var i=Object.assign({},e.value),a=Object.assign({ele:t,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(),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=(n.pageY-r.top-s.offsetHeight/2-document.documentElement.scrollTop||document.body.scrollTop)+"px",s.style.left=(n.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 t[i]?t[i].removeHandle=n:t[i]={removeHandle:n},n}var o={bind:function(t,e){t.addEventListener("click",a(t,e),!1)},update:function(t,e){t.removeEventListener("click",t[i].removeHandle,!1),t.addEventListener("click",a(t,e),!1)},unbind:function(t){t.removeEventListener("click",t[i].removeHandle,!1),t[i]=null,delete t[i]}},r=function(t){t.directive("waves",o)};window.Vue&&(window.waves=o,Vue.use(r)),o.install=r;e["a"]=o},"8d41":function(t,e,n){},"90e7":function(t,e,n){"use strict";n.d(e,"k",(function(){return a})),n.d(e,"o",(function(){return o})),n.d(e,"h",(function(){return r})),n.d(e,"b",(function(){return s})),n.d(e,"e",(function(){return l})),n.d(e,"s",(function(){return u})),n.d(e,"r",(function(){return c})),n.d(e,"l",(function(){return d})),n.d(e,"f",(function(){return p})),n.d(e,"p",(function(){return m})),n.d(e,"i",(function(){return f})),n.d(e,"m",(function(){return g})),n.d(e,"q",(function(){return h})),n.d(e,"j",(function(){return b})),n.d(e,"d",(function(){return y})),n.d(e,"n",(function(){return v})),n.d(e,"g",(function(){return w})),n.d(e,"c",(function(){return _})),n.d(e,"a",(function(){return k}));var i=n("b775");function a(t){return Object(i["a"])({url:"/api/admin/setting/pay_list",method:"get",params:t})}function o(t){return Object(i["a"])({url:"/api/admin/setting/update_pay",method:"post",data:t})}function r(t){return Object(i["a"])({url:"/api/admin/setting/delete_pay",method:"post",params:t})}function s(t){return Object(i["a"])({url:"/api/admin/setting/auto_pay",method:"POST",data:t})}function l(t){return Object(i["a"])({url:"/api/admin/setting/create_pay",method:"post",params:t})}function u(t){return Object(i["a"])({url:"/api/admin/setting/vip_list",method:"get",params:t})}function c(t){return Object(i["a"])({url:"/api/admin/setting/update_vip",method:"post",data:t})}function d(t){return Object(i["a"])({url:"/api/admin/setting/publicity_list",method:"get",params:t})}function p(t){return Object(i["a"])({url:"/api/admin/setting/create_publicity",method:"post",data:t})}function m(t){return Object(i["a"])({url:"/api/admin/setting/update_publicity",method:"post",data:t})}function f(t){return Object(i["a"])({url:"/api/admin/setting/delete_publicity",method:"post",data:t})}function g(t){return Object(i["a"])({url:"/api/admin/setting/system_list",method:"get",params:t})}function h(t){return Object(i["a"])({url:"/api/admin/setting/update_system",method:"post",data:t})}function b(t){return Object(i["a"])({url:"/api/admin/setting/notice_list",method:"get",params:t})}function y(t){return Object(i["a"])({url:"/api/admin/setting/create_notice",method:"post",data:t})}function v(t){return Object(i["a"])({url:"/api/admin/setting/update_notice",method:"post",data:t})}function w(t){return Object(i["a"])({url:"/api/admin/setting/delete_notice",method:"post",data:t})}function _(t){return Object(i["a"])({url:"/api/admin/cache/clearSettingCache",method:"get",params:t})}function k(t){return Object(i["a"])({url:"/api/admin/setting/setting_link",method:"post",data:t})}}}]);