1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-c64bca6c"],{"09f4":function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),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 r(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function o(t,e,n){var o=r(),s=t-o,l=20,c=0;e="undefined"===typeof e?500:e;var u=function t(){c+=l;var r=Math.easeInOutQuad(c,o,s,e);a(r),c<e?i(t):n&&"function"===typeof n&&n()};u()}},"1c49":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("router-link",{attrs:{to:{path:"/banner/create"}}},[n("el-button",{directives:[{name:"waves",rawName:"v-waves"}],staticClass:"filter-item",attrs:{type:"primary",icon:"el-icon-edit"}},[t._v(" 新建banner ")])],1)],1),n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],staticStyle:{width:"100%"},attrs:{data:t.list,border:"",fit:"","highlight-current-row":""}},[n("el-table-column",{attrs:{align:"center",label:"ID",width:"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(e.row.id))])]}}])}),n("el-table-column",{attrs:{width:"180px",align:"center",label:"日期"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(e.row.create_time))])]}}])}),n("el-table-column",{attrs:{"class-name":"status-col",label:"状态",width:"80px"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[n("el-tag",{attrs:{type:t._f("statusFilter")(i.status)}},[t._v(" "+t._s("1"==i.status?"正常":"隐藏")+" ")])]}}])}),n("el-table-column",{attrs:{"min-width":"300px",label:"位置",width:"100px"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[n("router-link",{staticClass:"link-type",attrs:{to:"/banner/edit/"+i.id}},[n("el-tag",{attrs:{type:t._f("positionFilter")(i.posiiton)}},[t._v(" "+t._s("HOME"===i.position?"首页":"活动页")+" ")])],1)]}}])}),n("el-table-column",{attrs:{"min-width":"300px",label:"排序",width:"80px"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[n("el-tag",{attrs:{type:t.info}},[t._v(" "+t._s(i.sort)+" ")])]}}])}),n("el-table-column",{attrs:{"min-width":"300px",label:"跳转路径"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[n("span",[t._v(t._s(i.redirect))])]}}])}),n("el-table-column",{attrs:{align:"center",label:"Actions",width:"190","class-name":"small-padding fixed-width"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("router-link",{attrs:{to:"/banner/edit/"+e.row.id}},[n("el-button",{attrs:{type:"primary",size:"mini",icon:"el-icon-edit"}},[t._v(" 修改 ")])],1),n("el-button",{staticStyle:{"margin-left":"10px"},attrs:{type:"danger",size:"mini",icon:"el-icon-delete"},on:{click:function(n){return t.handleDelete(e)}}},[t._v(" 删除 ")])]}}])})],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.pageSize},on:{"update:page":function(e){return t.$set(t.listQuery,"page",e)},"update:limit":function(e){return t.$set(t.listQuery,"pageSize",e)},pagination:t.getList}})],1)},a=[],r=(n("a434"),n("96cf"),n("1da1")),o=n("709b"),s=n("333d"),l=n("6724"),c={name:"ArticleList",components:{Pagination:s["a"]},directives:{waves:l["a"]},filters:{statusFilter:function(t){var e={1:"success",draft:"info",2:"danger"};return e[t]},positionFilter:function(t){var e={HOME:"success",draft:"info",2:"danger"};return e[t]}},data:function(){return{list:null,total:0,listLoading:!0,listQuery:{page:1,pageSize:10}}},created:function(){this.getList()},methods:{getList:function(){var t=this;this.listLoading=!0,Object(o["d"])(this.listQuery).then((function(e){t.list=e.data.list,t.total=e.data.count,t.listLoading=!1}))},handleFilter:function(){var t=this;this.listLoading=!0,Object(o["d"])(this.listQuery).then((function(e){t.list=e.data.list,t.total=e.data.count,t.listLoading=!1}))},handleDelete:function(t){var e=this,n=t.$index,i=t.row;console.log(i.id),this.$confirm("您确定要隐藏吗","警告",{confirmButtonText:"是的",cancelButtonText:"取消",type:"warning"}).then(Object(r["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(o["b"])(i.id);case 2:e.list.splice(n,1),e.$message({type:"success",message:"隐藏成功"});case 4:case"end":return t.stop()}}),t)}))))}}},u=c,d=(n("feb6"),n("2877")),f=Object(d["a"])(u,i,a,!1,null,"11e81974",null);e["default"]=f.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),r=a.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)),a.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=a.color,s.className="waves-ripple z-active",!1}}return t[i]?t[i].removeHandle=n:t[i]={removeHandle:n},n}var r={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]}},o=function(t){t.directive("waves",r)};window.Vue&&(window.waves=r,Vue.use(o)),r.install=o;e["a"]=r},"709b":function(t,e,n){"use strict";n.d(e,"d",(function(){return a})),n.d(e,"c",(function(){return r})),n.d(e,"a",(function(){return o})),n.d(e,"e",(function(){return s})),n.d(e,"b",(function(){return l}));var i=n("b775");function a(t){return Object(i["a"])({url:"/Carousel/index",method:"get",params:t})}function r(t){return Object(i["a"])({url:"/Carousel/read",method:"get",params:{id:t}})}function o(t){return Object(i["a"])({url:"/Carousel/save",method:"post",data:t})}function s(t){return Object(i["a"])({url:"/Carousel/update?id="+t.id,method:"post",data:t})}function l(t){return Object(i["a"])({url:"/Carousel/delete?id="+t,method:"get"})}},"8d41":function(t,e,n){},"9c0a":function(t,e,n){},a434:function(t,e,n){"use strict";var i=n("23e7"),a=n("23cb"),r=n("a691"),o=n("50c4"),s=n("7b0b"),l=n("65f0"),c=n("8418"),u=n("1dde"),d=n("ae40"),f=u("splice"),p=d("splice",{ACCESSORS:!0,0:0,1:2}),m=Math.max,h=Math.min,v=9007199254740991,g="Maximum allowed length exceeded";i({target:"Array",proto:!0,forced:!f||!p},{splice:function(t,e){var n,i,u,d,f,p,b=s(this),w=o(b.length),y=a(t,w),_=arguments.length;if(0===_?n=i=0:1===_?(n=0,i=w-y):(n=_-2,i=h(m(r(e),0),w-y)),w+n-i>v)throw TypeError(g);for(u=l(b,i),d=0;d<i;d++)f=y+d,f in b&&c(u,d,b[f]);if(u.length=i,n<i){for(d=y;d<w-i;d++)f=d+i,p=d+n,f in b?b[p]=b[f]:delete b[p];for(d=w;d>w-i+n;d--)delete b[d-1]}else if(n>i)for(d=w-i;d>y;d--)f=d+i-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-i+n,u}})},a9e3:function(t,e,n){"use strict";var i=n("83ab"),a=n("da84"),r=n("94ca"),o=n("6eeb"),s=n("5135"),l=n("c6b6"),c=n("7156"),u=n("c04e"),d=n("d039"),f=n("7c73"),p=n("241c").f,m=n("06cf").f,h=n("9bf2").f,v=n("58a8").trim,g="Number",b=a[g],w=b.prototype,y=l(f(w))==g,_=function(t){var e,n,i,a,r,o,s,l,c=u(t,!1);if("string"==typeof c&&c.length>2)if(c=v(c),e=c.charCodeAt(0),43===e||45===e){if(n=c.charCodeAt(2),88===n||120===n)return NaN}else if(48===e){switch(c.charCodeAt(1)){case 66:case 98:i=2,a=49;break;case 79:case 111:i=8,a=55;break;default:return+c}for(r=c.slice(2),o=r.length,s=0;s<o;s++)if(l=r.charCodeAt(s),l<48||l>a)return NaN;return parseInt(r,i)}return+c};if(r(g,!b(" 0o1")||!b("0b1")||b("+0x1"))){for(var x,N=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof N&&(y?d((function(){w.valueOf.call(n)})):l(n)!=g)?c(new b(_(e)),n,N):_(e)},E=i?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;E.length>k;k++)s(b,x=E[k])&&!s(N,x)&&h(N,x,m(b,x));N.prototype=w,w.constructor=N,o(a,g,N)}},feb6:function(t,e,n){"use strict";var i=n("9c0a"),a=n.n(i);a.a}}]);
|