(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-45a58f8d"],{"5e33":function(t,e,o){},6045:function(t,e,o){"use strict";o.r(e);var i=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"app-container"},[o("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"app-form"},[o("div",{staticClass:"app-form-group"},[o("div",{staticClass:"app-form-ti margin-top"},[t._v("编辑/添加项目")]),o("form-generator",{ref:"formGenerator",attrs:{"form-config":t.formConfig,"submit-text":"保存配置",showCancel:!0,cancelText:"返回",submitText:"保存"},on:{cancel:t.onBack,submit:t.submit},model:{value:t.form,callback:function(e){t.form=e},expression:"form"}})],1)])])},a=[],n=(o("8849"),{name:"SiteMiniProgram",data:function(){return{id:"",form:{name:"",edate:"",content:"",goods_id:"",status:"1"},loading:!1}},computed:{formConfig:function(){var t=[{type:"input",label:"项目名称",prop:"name",placeholder:"请输入项目名称",required:!0,width:"600px"},{type:"date",dateType:"datetime",valueFormat:"yyyy-MM-dd HH:mm:ss",label:"截止日期",prop:"edate",placeholder:"请输入开始时间",required:!0,width:"600px"},{type:"editor",label:"内容",prop:"content",placeholder:"请输入浏览量"},{type:"selgoods",label:"绑定商品",prop:"goods_id",required:!0,width:"600px"},{type:"input",label:"状态",prop:"status",width:"600px"}];return t}},created:function(){this.$route.params.id&&(this.id=this.$route.params.id),this.resetForm(),this.init()},methods:{init:function(){var t=this;this.api.get("pabonus/goods/detail",{id:this.id}).then((function(e){1==e.code&&(t.form=e.data)}))},onBack:function(){this.$router.go(-1)},submit:function(){var t=this;this.api.post("pabonus/goods/post",this.form).then((function(e){1==e.code?(t.$util.success(e.message),t.resetForm(),t.onBack()):t.$util.error(e.message)}))},resetForm:function(){this.form={name:"",edate:"",content:"",goods_id:"",status:"1"}}}}),s=n,r=(o("95d9"),o("3d7a")),d=Object(r["a"])(s,i,a,!1,null,"858c30a6",null);e["default"]=d.exports},"95d9":function(t,e,o){"use strict";o("5e33")}}]);