chunk-22b493f6.bfa9c6ec.js 11 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-22b493f6"],{"1c18":function(t,e,n){},"1c49":function(t,e,n){"use strict";n.r(e);var a=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(" 新建轮播图 ")])],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",align:"center",label:"状态",width:"80px"},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.row;return[n("el-tag",{attrs:{type:t._f("statusFilter")(a.status)}},[t._v(" "+t._s("1"===a.status?"正常":"隐藏")+" ")])]}}])}),n("el-table-column",{attrs:{"min-width":"300px",align:"center",label:"位置",width:"100px"},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.row;return[n("router-link",{staticClass:"link-type",attrs:{to:"/banner/edit/"+a.id}},[n("el-tag",{attrs:{type:t._f("positionFilter")(a.posiiton)}},[t._v(" "+t._s(t._f("positionFilterTxt")(a.position))+" ")])],1)]}}])}),n("el-table-column",{attrs:{"min-width":"300px",align:"center",label:"排序",width:"80px"},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.row;return[n("el-tag",{attrs:{type:t.info}},[t._v(" "+t._s(a.sort)+" ")])]}}])}),n("el-table-column",{attrs:{"min-width":"300px",label:"产品名称"},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.row;return[n("span",[t._v(t._s(a.product_name))])]}}])}),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",disabled:1!=e.row.status},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)},i=[],r=(n("a434"),n("96cf"),n("1da1")),o=n("709b"),s=n("333d"),l=n("6724"),u={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={SHOP:"success",draft:"info",2:"danger"};return e[t]},positionFilterTxt:function(t){var e={SHOP:"门店",PRODUCT:"产品"};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,a=t.row;console.log(a.id),this.$confirm("您确定要隐藏吗","警告",{confirmButtonText:"是的",cancelButtonText:"取消",type:"warning"}).then(Object(r["a"])(regeneratorRuntime.mark((function t(){var i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(o["b"])(a.id);case 2:return t.next=4,Object(o["c"])(a.id);case 4:i=t.sent,e.list.splice(n,1,i.data.info),e.$message({type:"success",message:"隐藏成功"});case 7:case"end":return t.stop()}}),t)}))))}}},c=u,d=(n("2658"),n("2877")),f=Object(d["a"])(c,a,i,!1,null,"537351e0",null);e["default"]=f.exports},2658:function(t,e,n){"use strict";var a=n("d44b"),i=n.n(a);i.a},"333d":function(t,e,n){"use strict";var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"pagination-container",class:{hidden:t.hidden}},[n("el-pagination",t._b({attrs:{background:t.background,"current-page":t.currentPage,"page-size":t.pageSize,layout:t.layout,"page-sizes":t.pageSizes,total:t.total},on:{"update:currentPage":function(e){t.currentPage=e},"update:current-page":function(e){t.currentPage=e},"update:pageSize":function(e){t.pageSize=e},"update:page-size":function(e){t.pageSize=e},"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}},"el-pagination",t.$attrs,!1))],1)},i=[];n("a9e3");Math.easeInOutQuad=function(t,e,n,a){return t/=a/2,t<1?n/2*t*t+e:(t--,-n/2*(t*(t-2)-1)+e)};var r=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)}}();function o(t){document.documentElement.scrollTop=t,document.body.parentNode.scrollTop=t,document.body.scrollTop=t}function s(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function l(t,e,n){var a=s(),i=t-a,l=20,u=0;e="undefined"===typeof e?500:e;var c=function t(){u+=l;var s=Math.easeInOutQuad(u,a,i,e);o(s),u<e?r(t):n&&"function"===typeof n&&n()};c()}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(t){this.$emit("update:page",t)}},pageSize:{get:function(){return this.limit},set:function(t){this.$emit("update:limit",t)}}},methods:{handleSizeChange:function(t){this.$emit("pagination",{page:this.currentPage,limit:t}),this.autoScroll&&l(0,800)},handleCurrentChange:function(t){this.$emit("pagination",{page:t,limit:this.pageSize}),this.autoScroll&&l(0,800)}}},c=u,d=(n("e498"),n("2877")),f=Object(d["a"])(c,a,i,!1,null,"6af373ef",null);e["a"]=f.exports},6724:function(t,e,n){"use strict";n("8d41");var a="@@wavesContext";function i(t,e){function n(n){var a=Object.assign({},e.value),i=Object.assign({ele:t,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 t[a]?t[a].removeHandle=n:t[a]={removeHandle:n},n}var r={bind:function(t,e){t.addEventListener("click",i(t,e),!1)},update:function(t,e){t.removeEventListener("click",t[a].removeHandle,!1),t.addEventListener("click",i(t,e),!1)},unbind:function(t){t.removeEventListener("click",t[a].removeHandle,!1),t[a]=null,delete t[a]}},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 i})),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 a=n("b775");function i(t){return Object(a["a"])({url:"/Carousel/index",method:"get",params:t})}function r(t){return Object(a["a"])({url:"/Carousel/read",method:"get",params:{id:t}})}function o(t){return Object(a["a"])({url:"/Carousel/save",method:"post",data:t})}function s(t){return Object(a["a"])({url:"/Carousel/update?id="+t.id,method:"post",data:t})}function l(t){return Object(a["a"])({url:"/Carousel/delete?id="+t,method:"get"})}},"8d41":function(t,e,n){},a434:function(t,e,n){"use strict";var a=n("23e7"),i=n("23cb"),r=n("a691"),o=n("50c4"),s=n("7b0b"),l=n("65f0"),u=n("8418"),c=n("1dde"),d=n("ae40"),f=c("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(t,e){var n,a,c,d,f,p,b=s(this),w=o(b.length),y=i(t,w),_=arguments.length;if(0===_?n=a=0:1===_?(n=0,a=w-y):(n=_-2,a=m(g(r(e),0),w-y)),w+n-a>h)throw TypeError(v);for(c=l(b,a),d=0;d<a;d++)f=y+d,f in b&&u(c,d,b[f]);if(c.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,c}})},a9e3:function(t,e,n){"use strict";var a=n("83ab"),i=n("da84"),r=n("94ca"),o=n("6eeb"),s=n("5135"),l=n("c6b6"),u=n("7156"),c=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=l(f(w))==v,_=function(t){var e,n,a,i,r,o,s,l,u=c(t,!1);if("string"==typeof u&&u.length>2)if(u=h(u),e=u.charCodeAt(0),43===e||45===e){if(n=u.charCodeAt(2),88===n||120===n)return NaN}else if(48===e){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(l=r.charCodeAt(s),l<48||l>i)return NaN;return parseInt(r,a)}return+u};if(r(v,!b(" 0o1")||!b("0b1")||b("+0x1"))){for(var S,x=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof x&&(y?d((function(){w.valueOf.call(n)})):l(n)!=v)?u(new b(_(e)),n,x):_(e)},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,S=N[k])&&!s(x,S)&&m(x,S,g(b,S));x.prototype=w,w.constructor=x,o(i,v,x)}},d44b:function(t,e,n){},e498:function(t,e,n){"use strict";var a=n("1c18"),i=n.n(a);i.a}}]);