(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-2223"],{BiX5:function(t,e,i){"use strict";var n={name:"BackToTop",props:{visibilityHeight:{type:Number,default:400},backPosition:{type:Number,default:0},customStyle:{type:Object,default:function(){return{right:"50px",bottom:"50px",width:"40px",height:"40px","border-radius":"4px","line-height":"45px",background:"#e7eaf1"}}},transitionName:{type:String,default:"fade"}},data:function(){return{visible:!1,interval:null,isMoving:!1}},mounted:function(){window.addEventListener("scroll",this.handleScroll)},beforeDestroy:function(){window.removeEventListener("scroll",this.handleScroll),this.interval&&clearInterval(this.interval)},methods:{handleScroll:function(){this.visible=window.pageYOffset>this.visibilityHeight},backToTop:function(){var t=this;if(!this.isMoving){var e=window.pageYOffset,i=0;this.isMoving=!0,this.interval=setInterval(function(){var n=Math.floor(t.easeInOutQuad(10*i,e,-e,500));n<=t.backPosition?(window.scrollTo(0,t.backPosition),clearInterval(t.interval),t.isMoving=!1):window.scrollTo(0,n),i++},16.7)}},easeInOutQuad:function(t,e,i,n){return(t/=n/2)<1?i/2*t*t+e:-i/2*(--t*(t-2)-1)+e}}},a=(i("zXup"),i("KHd+")),o=Object(a.a)(n,function(){var t=this.$createElement,e=this._self._c||t;return e("transition",{attrs:{name:this.transitionName}},[e("div",{directives:[{name:"show",rawName:"v-show",value:this.visible,expression:"visible"}],staticClass:"back-to-ceiling",style:this.customStyle,on:{click:this.backToTop}},[e("svg",{staticClass:"Icon Icon--backToTopArrow",staticStyle:{height:"16px",width:"16px"},attrs:{width:"16",height:"16",viewBox:"0 0 17 17",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"}},[e("title",[this._v("回到顶部")]),this._v(" "),e("g",[e("path",{attrs:{d:"M12.036 15.59c0 .55-.453.995-.997.995H5.032c-.55 0-.997-.445-.997-.996V8.584H1.03c-1.1 0-1.36-.633-.578-1.416L7.33.29c.39-.39 1.026-.385 1.412 0l6.878 6.88c.782.78.523 1.415-.58 1.415h-3.004v7.004z","fill-rule":"evenodd"}})])])])])},[],!1,null,"6172f71e",null);o.options.__file="index.vue";e.a=o.exports},D05h:function(t,e,i){"use strict";i.r(e);var n=i("xA6U"),a=i("BiX5"),o=i("xAVR"),r=i("Mz3J"),s={name:"GoodsList",components:{BackToTop:a.a,Pagination:r.a},data:function(){return{list:[],total:0,listLoading:!0,categoryOptions:[],goodsStatusMap:[{value:0,name:"下架"},{value:1,name:"正常"}],listQuery:{page:1,limit:20,title:void 0,status:void 0,barcode:void 0,categoryId:void 0},goodsDetail:"",detailDialogVisible:!1}},created:function(){this.getList(),this.refreshCategoryOptions()},methods:{getList:function(){var t=this;this.listLoading=!0,Object(n.f)(this.listQuery).then(function(e){e.data.data.items.forEach(function(t){t.price=t.price/100,t.originalPrice=t.originalPrice/100,t.vipPrice=t.vipPrice/100}),t.list=e.data.data.items,t.total=e.data.data.total,t.listLoading=!1}).catch(function(){t.list=[],t.total=0,t.listLoading=!1})},handleFilter:function(){this.listQuery.page=1,this.getList()},handleCreate:function(){this.$router.push({path:"/goods/upsert"})},handleUpdate:function(t){this.$router.push({path:"/goods/upsert",query:{id:t.id}})},showDetail:function(t){var e=this;this.detailDialogVisible||Object(n.c)(t.id).then(function(t){e.goodsDetail=t.data.data.detail.replace(/0,expression:"total>0"}],attrs:{total:t.total,page:t.listQuery.page,limit:t.listQuery.limit},on:{"update:page":function(e){t.$set(t.listQuery,"page",e)},"update:limit":function(e){t.$set(t.listQuery,"limit",e)},pagination:t.getList}}),t._v(" "),i("el-tooltip",{attrs:{placement:"top",content:"返回顶部"}},[i("back-to-top",{attrs:{"visibility-height":100}})],1)],1)},[],!1,null,null,null);c.options.__file="list.vue";e.default=c.exports},Qq1F:function(t,e,i){},"gDS+":function(t,e,i){t.exports={default:i("oh+g"),__esModule:!0}},"oh+g":function(t,e,i){var n=i("WEpk"),a=n.JSON||(n.JSON={stringify:JSON.stringify});t.exports=function(t){return a.stringify.apply(a,arguments)}},xA6U:function(t,e,i){"use strict";i.d(e,"g",function(){return u}),i.d(e,"f",function(){return d}),i.d(e,"d",function(){return p}),i.d(e,"b",function(){return g}),i.d(e,"a",function(){return m}),i.d(e,"c",function(){return f}),i.d(e,"e",function(){return v});var n=i("gDS+"),a=i.n(n),o=i("QbLZ"),r=i.n(o),s=i("t3Un"),l=i("Qyje"),c=i.n(l);function u(){return Object(s.a)({method:"get",params:{_gp:"admin.goods",_mt:"getSpuBigTree"}})}function d(t){return Object(s.a)({method:"get",params:r()({_gp:"admin.goods",_mt:"list"},t)})}function p(t){return Object(s.a)({method:"post",data:c.a.stringify({_gp:"admin.goods",_mt:"edit",spuDTO:a()(t)})})}function g(t){return Object(s.a)({method:"post",params:{_gp:"admin.goods",_mt:"delete",spuId:t}})}function m(t){return Object(s.a)({method:"post",data:c.a.stringify({_gp:"admin.goods",_mt:"create",spuDTO:a()(t)})})}function f(t){return Object(s.a)({method:"get",params:{_gp:"admin.goods",_mt:"detail",spuId:t}})}function v(t,e){return Object(s.a)({method:"post",params:{_gp:"admin.goods",_mt:"freezeOrActivation",spuId:t,status:e}})}},xAVR:function(t,e,i){"use strict";i.d(e,"a",function(){return l}),i.d(e,"b",function(){return c}),i.d(e,"e",function(){return u}),i.d(e,"c",function(){return d}),i.d(e,"f",function(){return p}),i.d(e,"d",function(){return g});var n=i("QbLZ"),a=i.n(n),o=i("t3Un"),r=i("Qyje"),s=i.n(r);function l(){return Object(o.a)({method:"get",params:{_gp:"admin.category",_mt:"categorySecondLevelTree"}})}function c(){return Object(o.a)({method:"get",params:{_gp:"admin.category",_mt:"categoryTree"}})}function u(t){return Object(o.a)({method:"get",params:a()({_gp:"admin.category",_mt:"queryCategory"},t)})}function d(t){return Object(o.a)({method:"post",data:s.a.stringify(a()({_gp:"admin.category",_mt:"addCategory"},t))})}function p(t){return Object(o.a)({method:"post",data:s.a.stringify(a()({_gp:"admin.category",_mt:"updateCategory"},t))})}function g(t){return Object(o.a)({method:"post",params:{_gp:"admin.category",_mt:"deleteCategory",id:t}})}},zXup:function(t,e,i){"use strict";var n=i("Qq1F");i.n(n).a}}]);