You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
9.9 KiB
1 lines
9.9 KiB
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-f769cf58"],{"29f2":function(t,e,a){"use strict";a.r(e);var o=a("2f62"),l=a("b0e7"),r=a("47c5"),i=a("d708");function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function n(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,o)}return a}function c(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?n(Object(a),!0).forEach((function(e){m(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):n(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}function m(t,e,a){return(e=function(t){var e=function(t,e){if("object"!=s(t)||!t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var o=a.call(t,e||"default");if("object"!=s(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==s(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}var d={name:"creat_live",components:{uploadPictures:l.a},computed:c(c({},Object(o.e)("admin/layout",["isMobile","menuCollapse"])),{},{labelWidth:function(){return this.isMobile?void 0:100},labelPosition:function(){return this.isMobile?"top":"right"}}),data:function(){return{roterPre:i.a.roterPre,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},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}},mounted:function(){this.getLive()},methods:{cancel:function(){this.modal3=!1},codeImg:function(){this.modal3=!0},anchorName:function(t){var e=this;this.liveList.filter((function(a,o){a.wechat===t&&(e.formValidate.anchor_name=a.name)}))},getLive:function(){var t=this;Object(r.c)({kerword:"",page:"",limit:""}).then((function(e){t.liveList=e.data.list})).catch((function(e){t.$Message.error(e.msg)}))},modalPicTap:function(t){this.activeIndex=t,this.modalPic=!0},selectDate:function(t){this.formValidate.start_time=t},getPic:function(t){var e=this;this.$nextTick((function(){0==e.activeIndex?e.formValidate.cover_img=t.att_dir:e.formValidate.share_img=t.att_dir,e.modalPic=!1}))},handleSubmit:function(t){var e=this;Object(r.a)(this.formValidate).then((function(t){})).then((function(t){e.$Message.success("添加成功"),setTimeout((function(){e.$router.push({path:"".concat(e.roterPre,"/marketing/live/live_room")})}),500)})).catch((function(t){e.$Message.error(t.msg)}))}}},u=(a("ba79"),a("2877")),f=Object(u.a)(d,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"form-submit"},[e("PageHeader",{staticClass:"product_tabs",attrs:{"hidden-breadcrumb":""}},[e("div",{attrs:{slot:"title"},slot:"title"},[e("router-link",{attrs:{to:{path:"".concat(t.roterPre,"/marketing/live/live_room")}}},[e("div",{staticClass:"font-sm after-line"},[e("span",{staticClass:"iconfont iconfanhui"}),e("span",{staticClass:"pl10"},[t._v("返回")])])]),e("span",{staticClass:"mr20 ml16",domProps:{textContent:t._s(t.$route.meta.title)}})],1)]),e("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[e("Form",{ref:"formValidate",staticClass:"tabform",attrs:{model:t.formValidate,"label-width":t.labelWidth,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[e("Col",{attrs:{span:"24"}},[e("Alert",{staticStyle:{width:"590px","margin-left":"17px","margin-bottom":"25px"},attrs:{type:"warning","show-icon":""}},[t._v("必须前往微信小程序官方后台开通直播权限,关注"),e("span",{staticStyle:{color:"red",cursor:"pointer"},on:{click:t.codeImg}},[t._v("【小程序直播】")]),t._v("须知直播状态")])],1),e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"选择主播:",required:""}},[e("Select",{staticClass:"width30",attrs:{filterable:"",clearable:""},on:{"on-change":t.anchorName},model:{value:t.formValidate.anchor_wechat,callback:function(e){t.$set(t.formValidate,"anchor_wechat",e)},expression:"formValidate.anchor_wechat"}},t._l(t.liveList,(function(a,o){return e("Option",{key:o,attrs:{value:a.wechat}},[t._v(t._s(a.wechat))])})),1)],1)],1),e("Row",{attrs:{gutter:24,type:"flex"}},[e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"直播间名称:",required:""}},[e("Input",{staticClass:"width30",attrs:{"enter-button":"",placeholder:"请输入直播间名称","element-id":"name"},model:{value:t.formValidate.name,callback:function(e){t.$set(t.formValidate,"name",e)},expression:"formValidate.name"}})],1)],1),e("Col",{attrs:{span:"24"}},[e("div",{staticStyle:{display:"flex"}},[e("FormItem",{attrs:{label:"背景图:",required:""}},[e("div",{staticClass:"box",on:{click:function(e){return t.modalPicTap(0)}}},[t.formValidate.cover_img?e("img",{attrs:{src:t.formValidate.cover_img,alt:""}}):e("div",{staticClass:"upload-box"},[e("Icon",{attrs:{type:"ios-camera-outline",size:"36"}})],1)])]),e("span",{staticStyle:{"margin-left":"20px",color:"#b0bac5"}},[t._v("尺寸:1080*1920px")])],1)]),e("Col",{attrs:{span:"24"}},[e("div",{staticStyle:{display:"flex"}},[e("FormItem",{attrs:{label:"分享图:",required:""}},[e("div",{staticClass:"box",on:{click:function(e){return t.modalPicTap(1)}}},[t.formValidate.share_img?e("img",{attrs:{src:t.formValidate.share_img,alt:""}}):e("div",{staticClass:"upload-box"},[e("Icon",{attrs:{type:"ios-camera-outline",size:"36"}})],1)])]),e("span",{staticStyle:{"margin-left":"20px",color:"#b0bac5"}},[t._v("尺寸:800*640px")])],1)]),e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"联系电话:"}},[e("Input",{staticClass:"width30",attrs:{"enter-button":"",placeholder:"请输入主播联系电话","element-id":"phone"},model:{value:t.formValidate.phone,callback:function(e){t.$set(t.formValidate,"phone",e)},expression:"formValidate.phone"}})],1)],1),e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"直播时间:"}},[e("DatePicker",{staticClass:"width30",attrs:{type:"datetimerange",format:"yyyy-MM-dd HH:mm:ss",placeholder:"请选择直播时间",value:t.timeVal},on:{"on-change":t.selectDate}})],1)],1),e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"排序:"}},[e("Input",{staticClass:"width30",attrs:{type:"number","enter-button":"",placeholder:"0","element-id":"phone"},model:{value:t.formValidate.sort,callback:function(e){t.$set(t.formValidate,"sort",e)},expression:"formValidate.sort"}})],1)],1),e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"显示样式:"}},[e("RadioGroup",{model:{value:t.formValidate.screen_type,callback:function(e){t.$set(t.formValidate,"screen_type",e)},expression:"formValidate.screen_type"}},t._l(t.screen_type,(function(a){return e("Radio",{attrs:{label:a.label}},[e("span",[t._v(t._s(a.value))])])})),1)],1)],1),e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"直播间类型:"}},[e("RadioGroup",{model:{value:t.formValidate.type,callback:function(e){t.$set(t.formValidate,"type",e)},expression:"formValidate.type"}},t._l(t.type,(function(a){return e("Radio",{attrs:{label:a.label}},[e("span",[t._v(t._s(a.value))])])})),1)],1)],1),e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"直播间点赞:"}},[e("RadioGroup",{model:{value:t.formValidate.close_like,callback:function(e){t.$set(t.formValidate,"close_like",e)},expression:"formValidate.close_like"}},t._l(t.close_like,(function(a){return e("Radio",{attrs:{label:a.label}},[e("span",[t._v(t._s(a.value))])])})),1)],1)],1),e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"直播卖货:"}},[e("RadioGroup",{model:{value:t.formValidate.close_goods,callback:function(e){t.$set(t.formValidate,"close_goods",e)},expression:"formValidate.close_goods"}},t._l(t.close_goods,(function(a){return e("Radio",{attrs:{label:a.label}},[e("span",[t._v(t._s(a.value))])])})),1)],1)],1),e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"直播间评论:"}},[e("RadioGroup",{model:{value:t.formValidate.close_comment,callback:function(e){t.$set(t.formValidate,"close_comment",e)},expression:"formValidate.close_comment"}},t._l(t.close_comment,(function(a){return e("Radio",{attrs:{label:a.label}},[e("span",[t._v(t._s(a.value))])])})),1)],1)],1)],1)],1)],1),e("Card",{staticClass:"fixed-card",style:{left:"".concat(t.menuCollapse?t.isMobile?"0":"80px":"200px")},attrs:{bordered:!1,"dis-hover":""}},[e("Form",[e("FormItem",[e("Button",{attrs:{type:"primary"},on:{click:function(e){return t.handleSubmit("formItem")}}},[t._v("提交")])],1)],1)],1),e("div",[e("Modal",{attrs:{width:"960px",scrollable:"","footer-hide":"",closable:"",title:"上传商品图","mask-closable":!1,"z-index":1},model:{value:t.modalPic,callback:function(e){t.modalPic=e},expression:"modalPic"}},[t.modalPic?e("uploadPictures",{attrs:{isChoice:t.isChoice,gridBtn:t.gridBtn,gridPic:t.gridPic},on:{getPic:t.getPic}}):t._e()],1)],1),e("Modal",{attrs:{title:"二维码","footer-hide":""},on:{"on-cancel":t.cancel},model:{value:t.modal3,callback:function(e){t.modal3=e},expression:"modal3"}},[e("div",{staticClass:"acea-row row-around"},[e("viewer",{staticClass:"QRpic"},[e("img",{attrs:{src:"https://res.wx.qq.com/op_res/9rSix1dhHfK4rR049JL0PHJ7TpOvkuZ3mE0z7Ou_Etvjf-w1J_jVX0rZqeStLfwh"}})])],1)])],1)}),[],!1,null,"758d419a",null);e.default=f.exports},ba79:function(t,e,a){"use strict";a("cc98")},cc98:function(t,e,a){}}]); |