1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6cc9821b"],{"1c18":function(e,t,n){},3191:function(e,t,n){"use strict";n.d(t,"d",(function(){return i})),n.d(t,"c",(function(){return r})),n.d(t,"a",(function(){return o})),n.d(t,"e",(function(){return s})),n.d(t,"b",(function(){return c}));var a=n("b775");function i(e){return Object(a["a"])({url:"/home/index",method:"get",params:e})}function r(e){return Object(a["a"])({url:"/home/read",method:"get",params:{id:e}})}function o(e){return Object(a["a"])({url:"/home/save",method:"post",data:e})}function s(e){return Object(a["a"])({url:"/home/update?id="+e.id,method:"post",data:e})}function c(e){return Object(a["a"])({url:"/home/delete?id="+e,method:"get"})}},"333d":function(e,t,n){"use strict";var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"pagination-container",class:{hidden:e.hidden}},[n("el-pagination",e._b({attrs:{background:e.background,"current-page":e.currentPage,"page-size":e.pageSize,layout:e.layout,"page-sizes":e.pageSizes,total:e.total},on:{"update:currentPage":function(t){e.currentPage=t},"update:current-page":function(t){e.currentPage=t},"update:pageSize":function(t){e.pageSize=t},"update:page-size":function(t){e.pageSize=t},"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}},"el-pagination",e.$attrs,!1))],1)},i=[];n("a9e3");Math.easeInOutQuad=function(e,t,n,a){return e/=a/2,e<1?n/2*e*e+t:(e--,-n/2*(e*(e-2)-1)+t)};var r=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}}();function o(e){document.documentElement.scrollTop=e,document.body.parentNode.scrollTop=e,document.body.scrollTop=e}function s(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function c(e,t,n){var a=s(),i=e-a,c=20,u=0;t="undefined"===typeof t?500:t;var l=function e(){u+=c;var s=Math.easeInOutQuad(u,a,i,t);o(s),u<t?r(e):n&&"function"===typeof n&&n()};l()}var u={name:"Pagination",props:{total:{required:!0,type:Number},page:{type:Number,default:1},limit:{type:Number,default:20},pageSizes:{type:Array,default:function(){return[10,20,30,50]}},layout:{type:String,default:"total, sizes, prev, pager, next, jumper"},background:{type:Boolean,default:!0},autoScroll:{type:Boolean,default:!0},hidden:{type:Boolean,default:!1}},computed:{currentPage:{get:function(){return this.page},set:function(e){this.$emit("update:page",e)}},pageSize:{get:function(){return this.limit},set:function(e){this.$emit("update:limit",e)}}},methods:{handleSizeChange:function(e){this.$emit("pagination",{page:this.currentPage,limit:e}),this.autoScroll&&c(0,800)},handleCurrentChange:function(e){this.$emit("pagination",{page:e,limit:this.pageSize}),this.autoScroll&&c(0,800)}}},l=u,d=(n("e498"),n("2877")),f=Object(d["a"])(l,a,i,!1,null,"6af373ef",null);t["a"]=f.exports},4132:function(e,t,n){},5827:function(e,t,n){"use strict";var a=n("4132"),i=n.n(a);i.a},6724:function(e,t,n){"use strict";n("8d41");var a="@@wavesContext";function i(e,t){function n(n){var a=Object.assign({},t.value),i=Object.assign({ele:e,type:"hit",color:"rgba(0, 0, 0, 0.15)"},a),r=i.ele;if(r){r.style.position="relative",r.style.overflow="hidden";var o=r.getBoundingClientRect(),s=r.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(o.width,o.height)+"px",r.appendChild(s)),i.type){case"center":s.style.top=o.height/2-s.offsetHeight/2+"px",s.style.left=o.width/2-s.offsetWidth/2+"px";break;default:s.style.top=(n.pageY-o.top-s.offsetHeight/2-document.documentElement.scrollTop||document.body.scrollTop)+"px",s.style.left=(n.pageX-o.left-s.offsetWidth/2-document.documentElement.scrollLeft||document.body.scrollLeft)+"px"}return s.style.backgroundColor=i.color,s.className="waves-ripple z-active",!1}}return e[a]?e[a].removeHandle=n:e[a]={removeHandle:n},n}var r={bind:function(e,t){e.addEventListener("click",i(e,t),!1)},update:function(e,t){e.removeEventListener("click",e[a].removeHandle,!1),e.addEventListener("click",i(e,t),!1)},unbind:function(e){e.removeEventListener("click",e[a].removeHandle,!1),e[a]=null,delete e[a]}},o=function(e){e.directive("waves",r)};window.Vue&&(window.waves=r,Vue.use(o)),r.install=o;t["a"]=r},8043:function(e,t,n){"use strict";n.r(t);var a=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"}],staticStyle:{width:"100%"},attrs:{data:e.list,border:"",fit:"","highlight-current-row":""}},[n("el-table-column",{attrs:{align:"center",label:"ID",width:"80"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("span",[e._v(e._s(t.row.id))])]}}])}),n("el-table-column",{attrs:{width:"180px",align:"center",label:"日期"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("span",[e._v(e._s(t.row.create_time))])]}}])}),n("el-table-column",{attrs:{align:"center",label:"排序"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("span",[e._v(e._s(t.row.sort))])]}}])}),n("el-table-column",{attrs:{"class-name":"status-col",label:"状态",width:"80ß"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[n("el-tag",{attrs:{type:e._f("statusFilter")(a.status)}},[e._v(" "+e._s("1"==a.status?"正常 ":"隐藏")+" ")])]}}])}),n("el-table-column",{attrs:{"min-width":"300px",label:"类型"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[e._v(" "+e._s(e._f("typeFilter")(n.type))+" ")]}}])}),n("el-table-column",{attrs:{align:"center",label:"Actions",width:"230","class-name":"small-padding fixed-width"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("router-link",{attrs:{to:"/home/edit/"+t.row.id}},[n("el-button",{attrs:{type:"primary",size:"mini",icon:"el-icon-edit"}},[e._v(" 修改 ")])],1),n("el-button",{staticStyle:{"margin-left":"10px"},attrs:{type:"danger",size:"mini",icon:"el-icon-s-check",disabled:"1"!=t.row.status},on:{click:function(n){return e.handleDelete(t)}}},[e._v(" "+e._s("1"==t.row.status?"隐藏 ":"已隐藏")+" ")])]}}])})],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.pageSize},on:{"update:page":function(t){return e.$set(e.listQuery,"page",t)},"update:limit":function(t){return e.$set(e.listQuery,"pageSize",t)},pagination:e.getList}})],1)},i=[],r=(n("c740"),n("a434"),n("96cf"),n("1da1")),o=n("3191"),s=n("333d"),c=n("6724"),u={name:"ArticleList",components:{Pagination:s["a"]},directives:{waves:c["a"]},filters:{statusFilter:function(e){var t={1:"success",2:"info"};return t[e]},typeFilter:function(e){var t={1:"首页图片",2:"合作图片",3:"问答图片",4:"如何合作图片"};return t[e]}},data:function(){return{list:null,total:0,listLoading:!0,listQuery:{page:1,pageSize:10},temp:{id:void 0,mark:""},dialogFormVisible:!1}},created:function(){this.getList()},methods:{getList:function(){var e=this;this.listLoading=!0,Object(o["d"])(this.listQuery).then((function(t){e.list=t.data.list,e.total=t.data.count,e.listLoading=!1}))},handleFilter:function(){var e=this;this.listLoading=!0,Object(o["d"])(this.listQuery).then((function(t){e.list=t.data.list,e.total=t.data.count,e.listLoading=!1}))},handleDelete:function(e){var t=this,n=e.$index,a=e.row,i=1===a.status?"隐藏":"开启";this.$confirm("您确定要隐藏吗","警告",{confirmButtonText:"是的",cancelButtonText:"取消",type:"warning"}).then(Object(r["a"])(regeneratorRuntime.mark((function e(){var r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(o["b"])(a.id);case 2:return e.next=4,Object(o["c"])(a.id);case 4:r=e.sent,t.list.splice(n,1,r.data.info),t.$message({type:"success",message:i+"成功"});case 7:case"end":return e.stop()}}),e)}))))},updateData:function(){var e=this;return Object(r["a"])(regeneratorRuntime.mark((function t(){var n,a,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=Object.assign({},e.temp),a=e.list.findIndex((function(t){return t.id===e.temp.id})),t.next=4,Object(o["e"])(n);case 4:return t.next=6,Object(o["c"])(n.id);case 6:i=t.sent,e.list.splice(a,1,i.data.info),e.dialogFormVisible=!1,e.$message({type:"success",message:"处理成功"});case 10:case"end":return t.stop()}}),t)})))()}}},l=u,d=(n("5827"),n("2877")),f=Object(d["a"])(l,a,i,!1,null,"023cf862",null);t["default"]=f.exports},"8d41":function(e,t,n){},a434:function(e,t,n){"use strict";var a=n("23e7"),i=n("23cb"),r=n("a691"),o=n("50c4"),s=n("7b0b"),c=n("65f0"),u=n("8418"),l=n("1dde"),d=n("ae40"),f=l("splice"),p=d("splice",{ACCESSORS:!0,0:0,1:2}),g=Math.max,m=Math.min,h=9007199254740991,v="Maximum allowed length exceeded";a({target:"Array",proto:!0,forced:!f||!p},{splice:function(e,t){var n,a,l,d,f,p,b=s(this),w=o(b.length),y=i(e,w),_=arguments.length;if(0===_?n=a=0:1===_?(n=0,a=w-y):(n=_-2,a=m(g(r(t),0),w-y)),w+n-a>h)throw TypeError(v);for(l=c(b,a),d=0;d<a;d++)f=y+d,f in b&&u(l,d,b[f]);if(l.length=a,n<a){for(d=y;d<w-a;d++)f=d+a,p=d+n,f in b?b[p]=b[f]:delete b[p];for(d=w;d>w-a+n;d--)delete b[d-1]}else if(n>a)for(d=w-a;d>y;d--)f=d+a-1,p=d+n-1,f in b?b[p]=b[f]:delete b[p];for(d=0;d<n;d++)b[d+y]=arguments[d+2];return b.length=w-a+n,l}})},a9e3:function(e,t,n){"use strict";var a=n("83ab"),i=n("da84"),r=n("94ca"),o=n("6eeb"),s=n("5135"),c=n("c6b6"),u=n("7156"),l=n("c04e"),d=n("d039"),f=n("7c73"),p=n("241c").f,g=n("06cf").f,m=n("9bf2").f,h=n("58a8").trim,v="Number",b=i[v],w=b.prototype,y=c(f(w))==v,_=function(e){var t,n,a,i,r,o,s,c,u=l(e,!1);if("string"==typeof u&&u.length>2)if(u=h(u),t=u.charCodeAt(0),43===t||45===t){if(n=u.charCodeAt(2),88===n||120===n)return NaN}else if(48===t){switch(u.charCodeAt(1)){case 66:case 98:a=2,i=49;break;case 79:case 111:a=8,i=55;break;default:return+u}for(r=u.slice(2),o=r.length,s=0;s<o;s++)if(c=r.charCodeAt(s),c<48||c>i)return NaN;return parseInt(r,a)}return+u};if(r(v,!b(" 0o1")||!b("0b1")||b("+0x1"))){for(var x,S=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof S&&(y?d((function(){w.valueOf.call(n)})):c(n)!=v)?u(new b(_(t)),n,S):_(t)},N=a?p(b):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),k=0;N.length>k;k++)s(b,x=N[k])&&!s(S,x)&&m(S,x,g(b,x));S.prototype=w,w.constructor=S,o(i,v,S)}},c740:function(e,t,n){"use strict";var a=n("23e7"),i=n("b727").findIndex,r=n("44d2"),o=n("ae40"),s="findIndex",c=!0,u=o(s);s in[]&&Array(1)[s]((function(){c=!1})),a({target:"Array",proto:!0,forced:c||!u},{findIndex:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),r(s)},e498:function(e,t,n){"use strict";var a=n("1c18"),i=n.n(a);i.a}}]);
|