chunk-42926c40.d3bb2c5d.js 8.8 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-42926c40"],{"29f2":function(e,t,a){a.r(t),a("4e82"),a("b0c0");var l=a("5530"),i=(a("4de4"),a("14d9"),a("e9f5"),a("910d"),a("d3b7"),a("2f62")),o=a("b0e7"),s=a("47c5");o={name:"creat_live",components:{uploadPictures:o.a},computed:Object(l.a)(Object(l.a)({},Object(i.d)("media",["isMobile"])),{},{labelWidth:function(){return this.isMobile?void 0:"120px"},labelPosition:function(){return this.isMobile?"top":"right"}}),data:function(){return{gridBtn:{xl:4,lg:8,md:8,sm:8,xs:8},gridPic:{xl:6,lg:8,md:12,sm:12,xs:12},grid:{xl:10,lg:16,md:18,sm:24,xs:24},loading:!1,formValidate:{name:"",anchor_name:"",anchor_wechat:"",phone:"",screen_type:0,close_like:1,close_goods:1,close_comment:1,cover_img:"",share_img:"",sort:0,type:0,start_time:""},screen_type:[{value:"竖屏",label:0},{value:"横屏",label:1}],type:[{value:"手机直播",label:0}],close_like:[{value:"开启",label:1},{value:"关闭",label:0}],close_goods:[{value:"开启",label:1},{value:"关闭",label:0}],close_comment:[{value:"开启",label:1},{value:"关闭",label:0}],timeVal:"",modalPic:!1,isChoice:"单选",activeIndex:0,liveList:[],modal3:!1,ruleValidate:{anchor_wechat:[{required:!0,message:"Please select the city",trigger:"change"}],name:[{required:!0,message:"The name cannot be empty",trigger:"blur"}]}}},mounted:function(){this.getLive()},methods:{cancel:function(){this.modal3=!1},codeImg:function(){this.modal3=!0},anchorName:function(e){var t=this;this.liveList.filter((function(a,l){a.wechat===e&&(t.formValidate.anchor_name=a.name)}))},getLive:function(){var e=this;Object(s.c)({kerword:"",page:"",limit:""}).then((function(t){e.liveList=t.data.list})).catch((function(t){e.$message.error(t.msg)}))},modalPicTap:function(e){this.activeIndex=e,this.modalPic=!0},selectDate:function(e){this.formValidate.start_time=e},getPic:function(e){var t=this;this.$nextTick((function(){0==t.activeIndex?t.formValidate.cover_img=e.att_dir:t.formValidate.share_img=e.att_dir,t.modalPic=!1}))},handleSubmit:function(e){var t=this;this.loading=!0,Object(s.a)(this.formValidate).then((function(e){t.$message.success("添加成功"),setTimeout((function(){t.loading=!1,t.$router.push({path:t.$routeProStr+"/marketing/live/live_room"})}),500)})).catch((function(e){setTimeout((function(){t.loading=!1}),1e3),t.$message.error(e.msg)}))}}},a("a2c3"),l=a("2877"),i=Object(l.a)(o,(function(){var e=this,t=e._self._c;return t("div",[t("pages-header",{ref:"pageHeader",attrs:{title:e.$route.meta.title,backUrl:e.$routeProStr+"/marketing/live/live_room"}}),t("el-card",{staticClass:"mt16",attrs:{bordered:!1,shadow:"never"}},[t("el-form",{ref:"formValidate",staticClass:"tabform",attrs:{model:e.formValidate,"label-width":e.labelWidth,"label-position":e.labelPosition,rules:e.ruleValidate},nativeOn:{submit:function(e){e.preventDefault()}}},[t("el-row",{attrs:{gutter:24}},[t("el-col",{attrs:{span:24}},[t("el-alert",{staticClass:"mb10",attrs:{type:"warning","show-icon":"",closable:!1}},[t("span",{attrs:{slot:"title"},slot:"title"},[e._v("必须前往微信小程序官方后台开通直播权限,关注"),t("span",{directives:[{name:"db-click",rawName:"v-db-click"}],staticStyle:{color:"red",cursor:"pointer"},on:{click:e.codeImg}},[e._v("【小程序直播】")]),e._v("须知直播状态")])])],1),t("el-col",{attrs:{span:24}},[t("el-form-item",{attrs:{label:"选择主播:",prop:"anchor_wechat"}},[t("el-select",{staticClass:"content_width",attrs:{filterable:"",clearable:""},on:{change:e.anchorName},model:{value:e.formValidate.anchor_wechat,callback:function(t){e.$set(e.formValidate,"anchor_wechat",t)},expression:"formValidate.anchor_wechat"}},e._l(e.liveList,(function(e,a){return t("el-option",{key:a,attrs:{value:e.wechat,label:e.wechat}})})),1)],1)],1),t("el-col",{attrs:{span:24}},[t("el-form-item",{attrs:{label:"直播间名称:",prop:"name"}},[t("el-input",{staticClass:"content_width",attrs:{"enter-button":"",placeholder:"请输入直播间名称","element-id":"name",maxlength:"80","show-word-limit":""},model:{value:e.formValidate.name,callback:function(t){e.$set(e.formValidate,"name",t)},expression:"formValidate.name"}})],1)],1),t("el-col",{attrs:{span:24}},[t("div",{staticStyle:{display:"flex"}},[t("el-form-item",{attrs:{label:"背景图:",prop:"name"}},[t("div",{directives:[{name:"db-click",rawName:"v-db-click"}],staticClass:"box",on:{click:function(t){return e.modalPicTap(0)}}},[e.formValidate.cover_img?t("img",{attrs:{src:e.formValidate.cover_img,alt:""}}):t("div",{staticClass:"upload-box acea-row row-center-wrapper"},[t("i",{staticClass:"el-icon-picture-outline",staticStyle:{"font-size":"24px"}})])]),t("div",{staticClass:"desc"},[e._v("尺寸:1080*1920px")])])],1)]),t("el-col",{attrs:{span:24}},[t("div",{staticStyle:{display:"flex"}},[t("el-form-item",{attrs:{label:"分享图:",prop:"name"}},[t("div",{directives:[{name:"db-click",rawName:"v-db-click"}],staticClass:"box",on:{click:function(t){return e.modalPicTap(1)}}},[e.formValidate.share_img?t("img",{attrs:{src:e.formValidate.share_img,alt:""}}):t("div",{staticClass:"upload-box acea-row row-center-wrapper"},[t("i",{staticClass:"el-icon-picture-outline",staticStyle:{"font-size":"24px"}})])]),t("div",{staticClass:"desc"},[e._v("尺寸:800*640px")])])],1)]),t("el-col",{attrs:{span:24}},[t("el-form-item",{attrs:{label:"联系电话:"}},[t("el-input",{staticClass:"content_width",attrs:{placeholder:"请输入主播联系电话",maxlength:"11","show-word-limit":""},model:{value:e.formValidate.phone,callback:function(t){e.$set(e.formValidate,"phone",t)},expression:"formValidate.phone"}})],1)],1),t("el-col",{attrs:{span:24}},[t("el-form-item",{attrs:{label:"直播时间:",prop:"name"}},[t("el-date-picker",{staticClass:"content_width",attrs:{clearable:"",type:"datetimerange",format:"yyyy-MM-dd HH:mm",placeholder:"请选择直播时间","value-format":"yyyy-MM-dd HH:mm","range-separator":"-","start-placeholder":"开始日期","end-placeholder":"结束日期"},on:{change:e.selectDate},model:{value:e.timeVal,callback:function(t){e.timeVal=t},expression:"timeVal"}})],1)],1),t("el-col",{attrs:{span:24}},[t("el-form-item",{attrs:{label:"排序:"}},[t("el-input",{staticClass:"content_width",attrs:{type:"number",placeholder:"0"},model:{value:e.formValidate.sort,callback:function(t){e.$set(e.formValidate,"sort",t)},expression:"formValidate.sort"}})],1)],1),t("el-col",{attrs:{span:24}},[t("el-form-item",{attrs:{label:"直播间类型:"}},[t("el-radio-group",{model:{value:e.formValidate.type,callback:function(t){e.$set(e.formValidate,"type",t)},expression:"formValidate.type"}},e._l(e.type,(function(a,l){return t("el-radio",{key:l,attrs:{label:a.label}},[t("span",[e._v(e._s(a.value))])])})),1)],1)],1),t("el-col",{attrs:{span:24}},[t("el-form-item",{attrs:{label:"直播间点赞:"}},[t("el-switch",{staticClass:"defineSwitch",attrs:{"active-value":1,"inactive-value":0,size:"large","active-text":"开启","inactive-text":"关闭"},model:{value:e.formValidate.close_like,callback:function(t){e.$set(e.formValidate,"close_like",t)},expression:"formValidate.close_like"}})],1)],1),t("el-col",{attrs:{span:24}},[t("el-form-item",{attrs:{label:"直播卖货:"}},[t("el-switch",{staticClass:"defineSwitch",attrs:{"active-value":1,"inactive-value":0,size:"large","active-text":"开启","inactive-text":"关闭"},model:{value:e.formValidate.close_goods,callback:function(t){e.$set(e.formValidate,"close_goods",t)},expression:"formValidate.close_goods"}})],1)],1),t("el-col",{attrs:{span:24}},[t("el-form-item",{attrs:{label:"直播间评论:"}},[t("el-switch",{staticClass:"defineSwitch",attrs:{"active-value":1,"inactive-value":0,size:"large","active-text":"开启","inactive-text":"关闭"},model:{value:e.formValidate.close_comment,callback:function(t){e.$set(e.formValidate,"close_comment",t)},expression:"formValidate.close_comment"}})],1)],1)],1),t("el-row",{attrs:{gutter:24}},[t("el-col",e._b({attrs:{span:24}},"el-col",e.grid,!1),[t("el-button",{directives:[{name:"db-click",rawName:"v-db-click"}],staticStyle:{"margin-left":"120px"},attrs:{loading:e.loading,type:"primary"},on:{click:function(t){return e.handleSubmit("formItem")}}},[e._v("\n 提交\n ")])],1)],1)],1)],1),t("div",[t("el-dialog",{attrs:{visible:e.modalPic,width:"950px",title:"上传商品图","close-on-click-modal":!1,"z-index":888},on:{"update:visible":function(t){e.modalPic=t}}},[e.modalPic?t("uploadPictures",{attrs:{isChoice:e.isChoice,gridBtn:e.gridBtn,gridPic:e.gridPic},on:{getPic:e.getPic}}):e._e()],1)],1),t("el-dialog",{attrs:{visible:e.modal3,title:"二维码"},on:{"update:visible":function(t){e.modal3=t}}},[t("div",{staticClass:"acea-row row-around"},[t("div",{directives:[{name:"viewer",rawName:"v-viewer"}],staticClass:"QRpic"},[t("img",{attrs:{src:"https://res.wx.qq.com/op_res/9rSix1dhHfK4rR049JL0PHJ7TpOvkuZ3mE0z7Ou_Etvjf-w1J_jVX0rZqeStLfwh"}})])])])],1)}),[],!1,null,"ac76f9fe",null);t.default=i.exports},"7b22":function(e,t,a){},a2c3:function(e,t,a){a("7b22")}}]);