(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-e3cca460"],{"0009":function(e,t,r){var n=r("ad94");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var a=r("499e").default;a("6172d21a",n,!0,{sourceMap:!1,shadowMode:!1})},"01e8":function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"page"},[n("c-title",{attrs:{text:"活码创建"}}),n("div",{staticClass:"wrapper"},[n("div",{staticClass:"item"},[n("span",{staticClass:"name"},[e._v("活码名称")]),n("input",{directives:[{name:"model",rawName:"v-model",value:e.form.code_name,expression:"form.code_name"}],staticClass:"input",attrs:{type:"text",placeholder:"输入活码名称"},domProps:{value:e.form.code_name},on:{input:function(t){t.target.composing||e.$set(e.form,"code_name",t.target.value)}}})]),n("div",{staticClass:"item"},[n("span",{staticClass:"name"},[e._v("引导语")]),n("input",{directives:[{name:"model",rawName:"v-model",value:e.form.code_guide,expression:"form.code_guide"}],staticClass:"input",attrs:{type:"text",placeholder:"输入引导语"},domProps:{value:e.form.code_guide},on:{input:function(t){t.target.composing||e.$set(e.form,"code_guide",t.target.value)}}})]),n("div",{staticClass:"item",staticStyle:{height:"4.063rem"}},[n("span",{staticClass:"name"},[e._v("客服二维码")]),n("div",{on:{click:function(t){return e.selectIndex(1)}}},[n("van-uploader",{attrs:{"after-read":e.onRead}},[n("div",{staticStyle:{padding:"0.2rem",width:"3.375rem",height:"3.375rem",border:"1px dashed #c0ccda",margin:"0 auto",display:"flex"}},[n("img",{staticClass:"avatar",style:{width:e.temp_customer_service?"100%":"50%",height:e.temp_customer_service?"100%":"50%"},attrs:{src:e.temp_customer_service?e.temp_customer_service:r("9619f")}})])])],1)]),n("div",{staticClass:"item"},[n("span",{staticClass:"name"},[e._v("客服引导语")]),n("input",{directives:[{name:"model",rawName:"v-model",value:e.form.customer_service_guide,expression:"form.customer_service_guide"}],staticClass:"input",attrs:{type:"text",placeholder:"输入客服引导语"},domProps:{value:e.form.customer_service_guide},on:{input:function(t){t.target.composing||e.$set(e.form,"customer_service_guide",t.target.value)}}})]),e.auth_recommend?n("div",{staticClass:"item"},[n("span",{staticClass:"name"},[e._v("推荐")]),n("van-switch",{attrs:{size:"1.5rem","active-color":"#00b075"},model:{value:e.form.recommend,callback:function(t){e.$set(e.form,"recommend",t)},expression:"form.recommend"}})],1):e._e(),n("div",{staticClass:"item",style:{height:e.form.explain?"7.688rem":""}},[n("span",{staticClass:"name"},[e._v("说明")]),n("van-switch",{attrs:{size:"1.5rem","active-color":"#00b075"},model:{value:e.form.explain,callback:function(t){e.$set(e.form,"explain",t)},expression:"form.explain"}}),e.form.explain?n("textarea",{directives:[{name:"model",rawName:"v-model",value:e.form.explain_content,expression:"form.explain_content"}],staticClass:"textarea",attrs:{placeholder:"输入活动说明"},domProps:{value:e.form.explain_content},on:{input:function(t){t.target.composing||e.$set(e.form,"explain_content",t.target.value)}}}):e._e()],1),n("div",{staticClass:"images"},[n("div",{on:{click:function(t){return e.selectIndex(2)}}},[n("van-uploader",{attrs:{"after-read":e.onRead}},[n("div",{staticStyle:{padding:"0.2rem",width:"5.156rem",height:"5.156rem",border:"1px dashed #c0ccda",margin:"0 auto",display:"flex","flex-direction":"column"}},[n("div",[n("img",{staticClass:"avatar",style:{width:e.imageUrl?"100%":"2.25rem",height:e.imageUrl?"100%":"2.25rem",marginTop:"0.575rem"},attrs:{src:e.imageUrl?e.imageUrl:r("9619f")}})]),n("p",{staticStyle:{"font-size":"0.75rem",color:"#666","margin-top":"0.325rem"}},[e._v("添加群二维码")])])])],1),e._l(e.qrCodeArr,(function(t,r){return n("div",{key:r,staticClass:"imgItem"},[n("div",{staticClass:"qrcode"},[n("img",{attrs:{src:t.temp_img,alt:""}}),n("i",{staticClass:"iconfont icon-guanbi delImg",on:{click:function(t){return e.delRQCode(r)}}}),e._e()]),n("div",{staticClass:"entry"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.num,expression:"item.num"}],attrs:{type:"text",placeholder:"扫码上限"},domProps:{value:t.num},on:{input:function(r){r.target.composing||e.$set(t,"num",r.target.value)}}}),n("span",[e._v("人")])])])}))],2),n("div",{staticStyle:{height:"3.063rem",width:"100%"}})]),n("div",{staticClass:"btn",on:{click:e.send}},[e._v(" 保存 ")])],1)},a=[],i=(r("e7e5"),r("d399")),o=r("c7eb"),c=r("1da1"),s=(r("e9c4"),r("d3b7"),r("3ca3"),r("ddb0"),r("2b3d"),r("9861"),r("a434"),{data:function(){return{form:{code_name:"",code_guide:"",customer_service:"",customer_service_guide:"",recommend:!1,explain:!1,explain_content:""},temp_customer_service:"",qrCodeArr:[],photosize:6291456,uploadUrl:"",selectImgIndex:null,auth_recommend:!1}},created:function(){var e=this;return Object(c["a"])(Object(o["a"])().mark((function t(){return Object(o["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.getConfigInfo();case 2:case"end":return t.stop()}}),t)})))()},mounted:function(){this.init()},methods:{init:function(){this.uploadUrl=this.fun.getRealUrl("upload.uploadPic",{}),this.form.code_name="",this.form.code_guide="",this.form.customer_service="",this.form.customer_service_guide="",this.form.recommend=!1,this.form.explain=!1,this.form.explain_content="",this.temp_customer_service="",this.qrCodeArr=[]},onphotosize:function(e){this.imgPreview(e.file,1)},selectIndex:function(e){this.selectImgIndex=e},send:function(){var e=this;return Object(c["a"])(Object(o["a"])().mark((function t(){var r,n,a,c,s,u,l,d,m,p,f,g;return Object(o["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!e.fun.isTextEmpty(e.form.code_name)){t.next=2;break}return t.abrupt("return",e.tips("请输入活码名称"));case 2:if(!e.fun.isTextEmpty(e.form.code_guide)){t.next=4;break}return t.abrupt("return",e.tips("请输入引导语"));case 4:if(!e.fun.isTextEmpty(e.form.customer_service)){t.next=6;break}return t.abrupt("return",e.tips("请上传客服二维码"));case 6:if(!e.fun.isTextEmpty(e.form.customer_service_guide)){t.next=8;break}return t.abrupt("return",e.tips("请输入客服引导语"));case 8:if(!e.fun.isTextEmpty(e.form.explain_content)||!e.form.explain){t.next=10;break}return t.abrupt("return",e.tips("请输入活动说明"));case 10:if(0!=e.qrCodeArr.length){t.next=12;break}return t.abrupt("return",e.tips("请至少上传一张群二维码"));case 12:for(r=e.form.recommend?1:0,n=e.form.explain?1:0,a=e.form,c=a.code_name,s=a.code_guide,u=a.explain_content,l=a.customer_service,d=a.customer_service_guide,m=[],p=0;p=0;--a){var i=this.tryEntries[a],o=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),k(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;k(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),m}},e}},da03:function(e,t,r){"use strict";r("0009")}}]);