(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pagesStatistics/trainingClassEdit"],{"613d":function(t,n,i){"use strict";(function(t){i("6cdc");e(i("4a15"));var n=e(i("ff58"));function e(t){return t&&t.__esModule?t:{default:t}}t(n.default)}).call(this,i("f3be")["createPage"])},b391:function(t,n,i){"use strict";i.r(n);var e=i("bf3e"),o=i.n(e);for(var a in e)["default"].indexOf(a)<0&&function(t){i.d(n,t,(function(){return e[t]}))}(a);n["default"]=o.a},bf3e:function(t,n,i){"use strict";(function(t){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var e=i("7adc"),o=function(){i.e("components/plugin/list-cell").then(function(){return resolve(i("1861"))}.bind(null,i)).catch(i.oe)},a=function(){Promise.all([i.e("common/vendor"),i.e("components/app-uploader")]).then(function(){return resolve(i("f4e1"))}.bind(null,i)).catch(i.oe)},s=i("90f4"),r={name:"staff-add",components:{TuiListCell:o,AppUploader:a},data:function(){return{form:{name:"",tuition:"",introduction:"",target:"",status:"",cover:"",summary:""},statusList:[{value:"01",name:"上架"},{value:"02",name:"下架"}],imgShow:!1,imgList:[]}},onLoad:function(){console.log(this.option.id)},onShow:function(){this.option.id?(t.setNavigationBarTitle({title:"修改培训班"}),this.imgShow=!0):t.setNavigationBarTitle({title:"添加培训班"})},methods:{init:function(){this.option.id&&this._getDet()},_resultData:function(t){this.form.cover=t.shortUrl,this.imgShow=!1},_getDet:function(){var t=this;(0,e.pxClassDetail)({id:this.option.id}).then((function(n){console.log(n),t.form=n.data,t.imgList.push(n.data.cover),console.log(t.imgList)})).catch((function(t){console.log(t)}))},radioChange:function(t){for(var n=0;n<this.statusList.length;n++)if(this.statusList[n].value===t.target.value){this.form.status=t.target.value;break}},confirmFn:function(){var n=this;if(this.form.cover){var i=this.option.id?e.pxClassUpdate:e.pxClassAdd;this.option.id&&(this.form.id=this.option.id),i(this.form).then((function(i){t.removeStorageSync("pxClassInfoList");var e=n.option.id?"修改成功！":"添加成功！";n.$msg(e),setTimeout((function(){n.pageTo(1)}),1e3)}))}else this.$msg("请上传头像")},formSubmit:function(t){var n=[{name:"name",rule:["required"],msg:["请输入名称"]},{name:"tuition",rule:["required"],msg:["请输入价格"]},{name:"target",rule:["required"],msg:["请输入招生对象"]},{name:"summary",rule:["required"],msg:["请输入简介"]}],i=t.detail.value,e=s.validation(i,n);e?this.$msg(e):this.confirmFn()}}};n.default=r}).call(this,i("f3be")["default"])},c4ec:function(t,n,i){},c85c:function(t,n,i){"use strict";var e;i.d(n,"b",(function(){return o})),i.d(n,"c",(function(){return a})),i.d(n,"a",(function(){return e}));var o=function(){var t=this,n=t.$createElement;t._self._c},a=[]},dc3f:function(t,n,i){"use strict";var e=i("c4ec"),o=i.n(e);o.a},ff58:function(t,n,i){"use strict";i.r(n);var e=i("c85c"),o=i("b391");for(var a in o)["default"].indexOf(a)<0&&function(t){i.d(n,t,(function(){return o[t]}))}(a);i("dc3f");var s,r=i("0095"),u=Object(r["a"])(o["default"],e["b"],e["c"],!1,null,"08b4c852",null,!1,e["a"],s);n["default"]=u.exports}},[["613d","common/runtime","common/vendor"]]]);