(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-b9192d2e"],{"20a4":function(a,t,e){var i=e("24fb");t=i(!1),t.push([a.i,".avatar[data-v-f2c19bca]{width:100%;height:100%}#edit-class[data-v-f2c19bca]{background-color:#f6f6f6}#edit-class[data-v-f2c19bca] .cell{margin-bottom:.65rem;text-align:left;background-color:#fff;white-space:nowrap}#edit-class[data-v-f2c19bca] .cell .van-cell__title{color:#323232;width:auto;font-size:.88rem}#edit-class .parent[data-v-f2c19bca]{background-color:transparent!important}#edit-class .parent .van-cell[data-v-f2c19bca]{background:transparent!important}#edit-class .copy-btn[data-v-f2c19bca]{padding:0 1rem;color:#fff;background-color:#f15353;border-radius:.13rem}#edit-class .upload-img[data-v-f2c19bca]{padding:10px 16px}#edit-class .upload-img .imgs[data-v-f2c19bca]{display:inline-block;margin-right:.5rem;width:80px;height:80px;vertical-align:bottom}#edit-class .upload-img .uploader-icon[data-v-f2c19bca]{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;padding:.2rem;width:80px;height:80px;border:1px dashed #c0ccda;margin:0 auto}#edit-class .upload-img .uploader-icon img[data-v-f2c19bca]{width:80%;height:80%}#edit-class .upload-img .tip[data-v-f2c19bca]{font-size:.75rem;color:#a8a8a8}#edit-class .btn-confirm[data-v-f2c19bca]{width:100%;max-width:350px;position:fixed;bottom:0;padding:0 .875rem;font-size:16px}#edit-class .btn-confirm div[data-v-f2c19bca]{color:#fff;width:80%;padding:.5rem;border-radius:1.16rem;background-color:#f15353;border:none;margin:.375rem auto}",""]),a.exports=t},"6de2":function(a,t,e){"use strict";e.r(t);var i=function(){var a=this,t=a.$createElement,i=a._self._c||t;return i("div",{attrs:{id:"edit-class"}},[i("c-title",{attrs:{hide:!1,text:"商品分类"}}),a.parentId&&a.parentData.level>=1?i("div",{staticClass:"parent"},[i("van-field",{attrs:{label:"上级分类:",readonly:""},model:{value:a.parentData.name,callback:function(t){a.$set(a.parentData,"name",t)},expression:"parentData.name"}})],1):a._e(),a.categoryData.url?i("div",{staticClass:"cell"},[i("van-field",{attrs:{label:"分类链接:"},scopedSlots:a._u([{key:"input",fn:function(){return[i("div",{directives:[{name:"clipboard",rawName:"v-clipboard:copy",value:a.categoryData.url,expression:"categoryData.url",arg:"copy"},{name:"clipboard",rawName:"v-clipboard:success",value:a.onCopySuccess,expression:"onCopySuccess",arg:"success"},{name:"clipboard",rawName:"v-clipboard:error",value:a.onCopyError,expression:"onCopyError",arg:"error"}],staticClass:"copy-btn"},[a._v("复制")])]},proxy:!0}],null,!1,2663649547)})],1):a._e(),i("div",{staticClass:"cell"},[i("van-field",{attrs:{label:"排序:"},model:{value:a.categoryData.display_order,callback:function(t){a.$set(a.categoryData,"display_order",t)},expression:"categoryData.display_order"}})],1),i("div",{staticClass:"cell"},[i("van-field",{attrs:{required:"",label:"分类名称:",placeholder:"请输入分类名称"},model:{value:a.categoryData.name,callback:function(t){a.$set(a.categoryData,"name",t)},expression:"categoryData.name"}}),i("div",{staticClass:"upload-img"},[i("p",[a._v("分类图片:")]),i("van-uploader",{staticStyle:{margin:"1rem 0"},attrs:{"after-read":function(t,e){return a.multipleMethod_1(t,e,"goods-img")},deletable:!1}},[a.categoryData.thumb_src?i("img",{staticClass:"imgs",attrs:{src:a.categoryData.thumb_src,alt:""}}):i("div",{staticClass:"uploader-icon"},[i("img",{attrs:{src:e("9619f")}})])]),i("div",{staticClass:"tip"},[a._v("建议尺寸:100*100px,或者正方形图片")])],1)],1),i("div",{staticClass:"cell"},[i("van-field",{attrs:{label:"是否推荐:"},scopedSlots:a._u([{key:"button",fn:function(){return[i("van-switch",{attrs:{"active-value":1,"inactive-value":0,"inactive-color":"#bebebe",size:"18px"},model:{value:a.categoryData.is_home,callback:function(t){a.$set(a.categoryData,"is_home",t)},expression:"categoryData.is_home"}})]},proxy:!0}])}),i("van-field",{attrs:{label:"是否显示:"},scopedSlots:a._u([{key:"button",fn:function(){return[i("van-switch",{attrs:{"active-value":1,"inactive-value":0,"inactive-color":"#bebebe",size:"18px"},model:{value:a.categoryData.enabled,callback:function(t){a.$set(a.categoryData,"enabled",t)},expression:"categoryData.enabled"}})]},proxy:!0}])})],1),i("div",{staticClass:"btn-confirm"},[i("div",{on:{click:a.sureEdit}},[a._v("确认")])])],1)},o=[],r=(e("e7e5"),e("d399")),s=(e("b0c0"),e("14d9"),{data:function(){return{categoryId:"",parentId:"",categoryData:{},parentData:{}}},activated:function(){this.initData(),this.categoryId=this.$route.params.id,this.parentId=this.$route.params.parentId,this.isEmpty(this.categoryId)||this.getData(this.categoryId),this.parentId&&0!=this.parentId&&this.getData(this.parentId),this.$set(this.categoryData,"display_order",0)},methods:{getData:function(a){var t=this;$http.get("plugin.shop-assistant.frontend.category.detail",{id:a},"loading").then((function(a){if(1!==a.result)return t.$toast(a.msg);t.isEmpty(t.categoryId)?t.parentData=a.data:t.categoryData=a.data,t.categoryData.display_order||t.$set(t.categoryData,"display_order",0)}))},multipleMethod_1:function(a,t,e){if(this.LOADER_IMGS="goods-img"===e?"goodsImgs":"otherImgs",a&&a.length)for(var i=0;i