(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0df2d6"],{8998:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app-container"},[e._m(0),a("div",{staticClass:"app-container--bd"},[a("BaseForm",{attrs:{baseForm:e.baseForm,loading:e.loading},on:{"update:baseForm":function(t){e.baseForm=t},"update:base-form":function(t){e.baseForm=t},submit:e.submit}})],1)])},r=[function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app-container--hd pb-20"},[a("h3",[e._v("编辑课包")])])}],c=(a("2397"),a("456d"),a("ac6a"),a("96cf"),a("1da1")),i=a("d4ec"),s=a("bee2"),u=a("99de"),o=a("7e84"),p=a("262e"),l=a("9ab4"),b=a("60a3"),d=a("7aab"),h=a("5bd4");function m(e,t,a){return t=Object(o["a"])(t),Object(u["a"])(e,f()?Reflect.construct(t,a||[],Object(o["a"])(e).constructor):t.apply(e,a))}function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(f=function(){return!!e})()}var _=function(e){function t(){var e;return Object(i["a"])(this,t),e=m(this,t,arguments),e.loading=!1,e.baseForm={package_id:"",sport_tag_id:"",training_id:"",use_stadium:"",start_time:"",end_time:"",coach_ids:"",unit_price:"",package_name:"",buy_limit:1,status:1,min_class_hours:"",max_class_hours:""},e}return Object(p["a"])(t,e),Object(s["a"])(t,[{key:"package_id",get:function(){return this.$route.query.package_id}},{key:"getDetail",value:function(){var e=Object(c["a"])(regeneratorRuntime.mark((function e(){var t,a,n=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(h["c"])({package_id:this.package_id});case 3:t=e.sent,a=t.data,Object.keys(a).forEach((function(e){0!=a[e]&&null!=a[e]||"unit_price"===e?n.baseForm[e]="coach_ids"===e?a[e].join(","):a[e]:n.baseForm[e]=""})),e.next=10;break;case 8:e.prev=8,e.t0=e["catch"](0);case 10:case"end":return e.stop()}}),e,this,[[0,8]])})));function t(){return e.apply(this,arguments)}return t}()},{key:"submit",value:function(){var e=Object(c["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,this.loading=!0,e.next=4,Object(h["h"])(this.baseForm);case 4:this.$message.success("编辑成功"),this.$router.back(),e.next=11;break;case 8:e.prev=8,e.t0=e["catch"](0),this.loading=!1;case 11:case"end":return e.stop()}}),e,this,[[0,8]])})));function t(){return e.apply(this,arguments)}return t}()},{key:"mounted",value:function(){this.getDetail()}}]),t}(b["i"]);_=Object(l["a"])([Object(b["a"])({components:{BaseForm:d["default"]}})],_);var v=_,g=v,k=a("2877"),j=Object(k["a"])(g,n,r,!1,null,"71690e80",null);t["default"]=j.exports}}]);