(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d217b06"],{c894: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",{staticClass:"app-form"},[o("el-form",{ref:"dataForm",attrs:{rules:t.rules,model:t.form,"label-position":"right","label-width":"200px"}},[o("div",{staticClass:"app-form-group"},[o("div",{staticClass:"app-form-ti"},[t._v("基本设置")]),o("div",{staticClass:"padding-top-lg"},[o("el-form-item",{attrs:{label:"标题",prop:"title"}},[o("el-input",{staticClass:"form-input",model:{value:t.form.title,callback:function(e){t.$set(t.form,"title",e)},expression:"form.title"}})],1),o("el-form-item",{attrs:{label:"视频",prop:"video"}},[o("uploadImage",{attrs:{modal:!0,type:2},model:{value:t.form.video,callback:function(e){t.$set(t.form,"video",e)},expression:"form.video"}})],1),o("el-form-item",{attrs:{label:"绑定商品",prop:"goods_id"}},[o("selgoods",{attrs:{multiple:!1},model:{value:t.form.goods_id,callback:function(e){t.$set(t.form,"goods_id",e)},expression:"form.goods_id"}})],1),o("el-form-item",{attrs:{label:"推荐",prop:"is_recommend"}},[o("el-radio-group",{model:{value:t.form.is_recommend,callback:function(e){t.$set(t.form,"is_recommend",e)},expression:"form.is_recommend"}},[o("el-radio",{attrs:{label:1}},[t._v("开启")]),o("el-radio",{attrs:{label:0}},[t._v("关闭")])],1)],1),o("el-form-item",{attrs:{label:"状态",prop:"status"}},[o("el-radio-group",{model:{value:t.form.status,callback:function(e){t.$set(t.form,"status",e)},expression:"form.status"}},[o("el-radio",{attrs:{label:1}},[t._v("正常")]),o("el-radio",{attrs:{label:0}},[t._v("禁用")])],1)],1)],1)]),o("div",{staticClass:"padding-xl flex justify-center"},[o("el-button",{on:{click:t.onBack}},[t._v("返回")]),o("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.submit()}}},[t._v("提交")])],1)])],1),o("copyright")],1)},r=[],s=o("7f70"),a=o("8327"),l=o("095c"),n=o("c7f0"),d=o("1fe5"),m={name:"ShortVideoPost",components:{editor:l["a"],uploadImage:n["a"],selgoods:d["a"]},data:function(){return{rules:{title:[{required:!0,message:"请输入标题",trigger:"blur"}]},form:{},id:"",category:[]}},computed:Object(s["a"])({},Object(a["b"])(["config"])),created:function(){this.$route.query.id&&(this.id=this.$route.query.id),this.resetForm(),this.init()},methods:{init:function(){var t=this;this.api.get("short_video/video/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.$refs["dataForm"].validate((function(e){e&&t.api.post("short_video/video/post",t.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={title:"",video:"",goods_id:0,status:1,is_recommend:0}}}},c=m,u=o("3d7a"),f=Object(u["a"])(c,i,r,!1,null,null,null);e["default"]=f.exports}}]);