1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-c08741fe"],{"29f2":function(e,t,a){"use strict";a.r(t),a("b0c0"),a("4e82");var i=a("5530"),l=(a("4de4"),a("d3b7"),a("14d9"),a("2f62")),o=a("b0e7"),r=a("47c5");o={name:"creat_live",components:{uploadPictures:o.a},computed:Object(i.a)(Object(i.a)({},Object(l.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,i){a.wechat===e&&(t.formValidate.anchor_name=a.name)}))},getLive:function(){var e=this;Object(r.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(r.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("8552"),i=a("2877"),l=Object(i.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"},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:"请输入主播联系电话"},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,i){return t("el-radio",{key:i,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":"99px"},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,"17f9545c",null);t.default=l.exports},"4aa1":function(e,t,a){},"4e82":function(e,t,a){"use strict";var i=a("23e7"),l=a("e330"),o=a("59ed"),r=a("7b0b"),s=a("07fa"),c=a("083a"),n=a("577e"),d=a("d039"),m=a("addb"),u=a("a640"),f=a("04d1"),v=a("d998"),p=a("2d00"),h=a("512ce"),b=[],g=l(b.sort),_=l(b.push),w=(a=d((function(){b.sort(void 0)})),l=d((function(){b.sort(null)})),u=u("sort"),!d((function(){if(p)return p<70;if(!(f&&3<f)){if(v)return!0;if(h)return h<603;for(var e,t,a,i="",l=65;l<76;l++){switch(e=String.fromCharCode(l),l){case 66:case 69:case 70:case 72:t=3;break;case 68:case 71:t=4;break;default:t=2}for(a=0;a<47;a++)b.push({k:e+a,v:t})}for(b.sort((function(e,t){return t.v-e.v})),a=0;a<b.length;a++)e=b[a].k.charAt(0),i.charAt(i.length-1)!==e&&(i+=e);return"DGBEFHACIJK"!==i}})));i({target:"Array",proto:!0,forced:a||!l||!u||!w},{sort:function(e){void 0!==e&&o(e);var t=r(this);if(w)return void 0===e?g(t):g(t,e);for(var a,i,l=[],d=s(t),u=0;u<d;u++)u in t&&_(l,t[u]);for(m(l,(i=e,function(e,t){return void 0===t?-1:void 0===e?1:void 0!==i?+i(e,t)||0:n(e)>n(t)?1:-1})),a=s(l),u=0;u<a;)t[u]=l[u++];for(;u<d;)c(t,u++);return t}})},8552:function(e,t,a){"use strict";a("4aa1")}}]);
|