webpackJsonp([106],{OT9E:function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var c=o("mvHQ"),r=o.n(c),i=o("Xxa5"),n=o.n(i),s=o("exGp"),a=o.n(s),l=o("Dd8w"),_=o.n(l),f=o("NYxO"),u={data:function(){return{default_img:"https://lbqny.migugu.com/admin/anmo/mine/bg.png",colorList:["#739bc6","#60a06a","#d4b64c","#c09e51","#d5964b","#c26a51","#ffb6b1","#b0b4c7","#616570"],color:{service_btn_color:"",service_font_color:"",user_font_color:"",coach_font_color:""},ind:{service_btn_color:0,service_font_color:0,user_font_color:0,coach_font_color:0},subForm:{attendant_name:"",service_btn_color:"",service_font_color:"",user_font_color:"",user_image:[],coach_font_color:"",coach_image:[]},subFormRules:{attendant_name:{required:!0,validator:this.$reg.isNotNull,text:"行业服务人员名称",reg_type:2,trigger:"blur"},service_btn_color:{required:!0,type:"string",message:"请选择按钮颜色",trigger:"blur"},service_font_color:{required:!0,type:"string",message:"请选择文字颜色",trigger:"blur"},user_font_color:{required:!0,type:"string",message:"请选择文字颜色",trigger:"blur"},user_image:{required:!0,type:"array",message:"请选择背景图",trigger:"blur"},coach_font_color:{required:!0,type:"string",message:"请选择文字颜色",trigger:"blur"},coach_image:{required:!0,type:"array",message:"请选择背景图",trigger:"blur"}}}},created:function(){this.getFormInfo()},methods:_()({},Object(f.c)(["changeRoutesItem"]),{getFormInfo:function(){var t=this;return a()(n.a.mark(function e(){var o,c,r,i,s,a,l,_,f,u,v,m,d,g;return n.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.$api.system.configInfo();case 2:if(o=e.sent,c=o.code,r=o.data,200===c){e.next=7;break}return e.abrupt("return");case 7:for(g in i=r.service_btn_color,s=r.service_font_color,a=r.user_font_color,l=r.coach_font_color,_=r.user_image,f=r.coach_image,r.service_btn_color=i||"#282B34",r.service_font_color=s||"#EBDDB1",r.user_font_color=a||"#ffffff",r.coach_font_color=l||"#ffffff",r.user_image=[{url:_||t.default_img}],r.coach_image=[{url:f||t.default_img}],u=t.colorList.findIndex(function(t){return t===r.service_btn_color}),v=t.colorList.findIndex(function(t){return t===r.service_font_color}),m=t.colorList.findIndex(function(t){return t===r.user_font_color}),d=t.colorList.findIndex(function(t){return t===r.coach_font_color}),-1===u&&(u=9),-1===v&&(v=9),-1===m&&(m=9),-1===d&&(d=9),t.ind.service_btn_color=u,t.ind.service_font_color=v,t.ind.user_font_color=m,t.ind.coach_font_color=d,t.color.service_btn_color=r.service_btn_color,t.color.service_font_color=r.service_font_color,t.color.user_font_color=r.user_font_color,t.color.coach_font_color=r.coach_font_color,t.subForm)t.subForm[g]=r[g];case 31:case"end":return e.stop()}},e,t)}))()},getCover:function(t,e){this.subForm[e]=t},changeIndex:function(t,e){var o=this;return a()(n.a.mark(function c(){return n.a.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:o.ind[e]=t,o.subForm[e]=o.colorList[t];case 2:case"end":return c.stop()}},c,o)}))()},changeColor:function(t,e){this.subForm[e]=t},toReset:function(t){if("service"===t)return this.ind[t+"_btn_color"]=9,this.ind[t+"_font_color"]=9,this.color[t+"_btn_color"]="#282B34",this.color[t+"_font_color"]="#EBDDB1",this.subForm[t+"_btn_color"]="#282B34",this.subForm[t+"_font_color"]="#EBDDB1",void this.submitForm();this.ind[t+"_font_color"]=9,this.color[t+"_font_color"]="#ffffff",this.subForm[t+"_font_color"]="#ffffff",this.subForm[t+"_image"]=[{url:this.default_img}],this.submitForm()},submitForm:function(){var t=this;this.$refs.subForm.validate(function(e){if(e){var o=JSON.parse(r()(t.subForm));o.user_image=o.user_image[0].url,o.coach_image=o.coach_image[0].url,t.$api.system.configUpdate(o).then(function(e){200===e.code&&(t.changeRoutesItem({key:"attendant_name",val:o.attendant_name}),t.$message.success(t.$t("tips.successSub")))})}})}})},v={render:function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"lb-system-wechat"},[o("top-nav"),t._v(" "),o("div",{staticClass:"page-main"},[o("el-form",{ref:"subForm",staticClass:"config-form",attrs:{model:t.subForm,rules:t.subFormRules,"label-width":"150px"},nativeOn:{submit:function(t){t.preventDefault()}}},[o("el-form-item",{attrs:{label:"行业服务人员名称",prop:"attendant_name"}},[o("el-input",{attrs:{maxlength:"5","show-word-limit":"",placeholder:"请输入行业服务人员名称"},model:{value:t.subForm.attendant_name,callback:function(e){t.$set(t.subForm,"attendant_name",e)},expression:"subForm.attendant_name"}}),t._v(" "),o("lb-tool-tips",[t._v("该字段适用于修改不同行业服务人员的专职称呼,例如美甲师、维修人员、瑜伽老师、营养师等\n "),o("div",{staticClass:"mt-sm"},[t._v("\n 修改之后,后台和手机端所有关于服务人员的称呼将和输入的字段一致\n ")])])],1),t._v(" "),o("lb-classify-title",{attrs:{title:t.$t("action.attendantName")+"页面 - 可服务按钮"}}),t._v(" "),o("el-form-item",{attrs:{label:"按钮颜色",prop:"service_btn_color"}},[o("div",{staticClass:"flex-warp"},[o("div",{staticClass:"flex-warp mt-sm"},t._l(t.colorList,function(e,c){return o("div",{key:c},[o("div",{staticClass:"color-item",class:[{active:c===t.ind.service_btn_color}],on:{click:function(e){return t.changeIndex(c,"service_btn_color")}}},[o("div",{staticClass:"flex-center"},[o("div",{staticClass:"primaryColor flex-center"},[o("div",{staticClass:"color-bg",style:{background:e}})])]),t._v(" "),c===t.ind.service_btn_color?o("i",{staticClass:"iconfont icon-xuanze-fill flex-center"}):t._e()])])}),0),t._v(" "),o("div",{staticClass:"color-item mt-sm",class:[{active:9===t.ind.service_btn_color}],staticStyle:{width:"auto",padding:"0 2px"},on:{click:function(e){return t.changeIndex(9,"service_btn_color")}}},[o("div",{staticClass:"flex-center",staticStyle:{"margin-top":"4px"}},[o("el-color-picker",{staticStyle:{"margin-right":"4px"},attrs:{size:"mini"},on:{change:function(e){return t.changeColor(e,"service_btn_color")}},model:{value:t.color.service_btn_color,callback:function(e){t.$set(t.color,"service_btn_color",e)},expression:"color.service_btn_color"}})],1),t._v(" "),o("div",{staticClass:"flex-y-center",staticStyle:{height:"18px","margin-top":"4px"}},[o("div",{staticStyle:{"line-height":"18px","font-size":"10px"}},[t._v("自定义配色")]),t._v(" "),o("i",{staticClass:"iconfont icon-xuanze flex-center",class:[{"icon-xuanze-fill":9===t.ind.service_btn_color}],staticStyle:{margin:"0"}})])])])]),t._v(" "),o("el-form-item",{attrs:{label:"文字颜色",prop:"service_font_color"}},[o("div",{staticClass:"flex-warp"},[o("div",{staticClass:"flex-warp mt-sm"},t._l(t.colorList,function(e,c){return o("div",{key:c},[o("div",{staticClass:"color-item",class:[{active:c===t.ind.service_font_color}],on:{click:function(e){return t.changeIndex(c,"service_font_color")}}},[o("div",{staticClass:"flex-center"},[o("div",{staticClass:"primaryColor flex-center"},[o("div",{staticClass:"color-bg",style:{background:e}})])]),t._v(" "),c===t.ind.service_font_color?o("i",{staticClass:"iconfont icon-xuanze-fill flex-center"}):t._e()])])}),0),t._v(" "),o("div",{staticClass:"color-item mt-sm",class:[{active:9===t.ind.service_font_color}],staticStyle:{width:"auto",padding:"0 2px"},on:{click:function(e){return t.changeIndex(9,"service_font_color")}}},[o("div",{staticClass:"flex-center",staticStyle:{"margin-top":"4px"}},[o("el-color-picker",{staticStyle:{"margin-right":"4px"},attrs:{size:"mini"},on:{change:function(e){return t.changeColor(e,"service_font_color")}},model:{value:t.color.service_font_color,callback:function(e){t.$set(t.color,"service_font_color",e)},expression:"color.service_font_color"}})],1),t._v(" "),o("div",{staticClass:"flex-y-center",staticStyle:{height:"18px","margin-top":"4px"}},[o("div",{staticStyle:{"line-height":"18px","font-size":"10px"}},[t._v("自定义配色")]),t._v(" "),o("i",{staticClass:"iconfont icon-xuanze flex-center",class:[{"icon-xuanze-fill":9===t.ind.service_font_color}],staticStyle:{margin:"0"}})])])]),t._v(" "),o("div",[o("lb-button",{attrs:{type:"danger",plain:"",size:"small"},on:{click:function(e){return t.toReset("service")}}},[t._v(t._s(t.$t("action.defaultSet")))])],1)]),t._v(" "),o("lb-classify-title",{attrs:{title:"个人中心 - 用户端"}}),t._v(" "),o("el-form-item",{attrs:{label:"背景图",prop:"user_image"}},[o("lb-cover",{attrs:{fileList:t.subForm.user_image},on:{selectedFiles:function(e){return t.getCover(e,"user_image")}}}),t._v(" "),o("lb-tool-tips",[t._v("图片建议尺寸:750 * 368")])],1),t._v(" "),o("el-form-item",{attrs:{label:"文字颜色",prop:"user_font_color"}},[o("div",{staticClass:"flex-warp"},[o("div",{staticClass:"flex-warp mt-sm"},t._l(t.colorList,function(e,c){return o("div",{key:c},[o("div",{staticClass:"color-item",class:[{active:c===t.ind.user_font_color}],on:{click:function(e){return t.changeIndex(c,"user_font_color")}}},[o("div",{staticClass:"flex-center"},[o("div",{staticClass:"primaryColor flex-center"},[o("div",{staticClass:"color-bg",style:{background:e}})])]),t._v(" "),c===t.ind.user_font_color?o("i",{staticClass:"iconfont icon-xuanze-fill flex-center"}):t._e()])])}),0),t._v(" "),o("div",{staticClass:"color-item mt-sm",class:[{active:9===t.ind.user_font_color}],staticStyle:{width:"auto",padding:"0 2px"},on:{click:function(e){return t.changeIndex(9,"user_font_color")}}},[o("div",{staticClass:"flex-center",staticStyle:{"margin-top":"4px"}},[o("el-color-picker",{staticStyle:{"margin-right":"4px"},attrs:{size:"mini"},on:{change:function(e){return t.changeColor(e,"user_font_color")}},model:{value:t.color.user_font_color,callback:function(e){t.$set(t.color,"user_font_color",e)},expression:"color.user_font_color"}})],1),t._v(" "),o("div",{staticClass:"flex-y-center",staticStyle:{height:"18px","margin-top":"4px"}},[o("div",{staticStyle:{"line-height":"18px","font-size":"10px"}},[t._v("自定义配色")]),t._v(" "),o("i",{staticClass:"iconfont icon-xuanze flex-center",class:[{"icon-xuanze-fill":9===t.ind.user_font_color}],staticStyle:{margin:"0"}})])])]),t._v(" "),o("div",[o("lb-button",{attrs:{type:"danger",plain:"",size:"small"},on:{click:function(e){return t.toReset("user")}}},[t._v(t._s(t.$t("action.defaultSet")))])],1)]),t._v(" "),o("lb-classify-title",{attrs:{title:"个人中心 - "+t.$t("action.attendantName")+"端"}}),t._v(" "),o("el-form-item",{attrs:{label:"背景图",prop:"coach_image"}},[o("lb-cover",{attrs:{fileList:t.subForm.coach_image},on:{selectedFiles:function(e){return t.getCover(e,"coach_image")}}}),t._v(" "),o("lb-tool-tips",[t._v("图片建议尺寸:750 * 368")])],1),t._v(" "),o("el-form-item",{attrs:{label:"文字颜色",prop:"coach_font_color"}},[o("div",{staticClass:"flex-warp"},[o("div",{staticClass:"flex-warp mt-sm"},t._l(t.colorList,function(e,c){return o("div",{key:c},[o("div",{staticClass:"color-item",class:[{active:c===t.ind.coach_font_color}],on:{click:function(e){return t.changeIndex(c,"coach_font_color")}}},[o("div",{staticClass:"flex-center"},[o("div",{staticClass:"primaryColor flex-center"},[o("div",{staticClass:"color-bg",style:{background:e}})])]),t._v(" "),c===t.ind.coach_font_color?o("i",{staticClass:"iconfont icon-xuanze-fill flex-center"}):t._e()])])}),0),t._v(" "),o("div",{staticClass:"color-item mt-sm",class:[{active:9===t.ind.coach_font_color}],staticStyle:{width:"auto",padding:"0 2px"},on:{click:function(e){return t.changeIndex(9,"coach_font_color")}}},[o("div",{staticClass:"flex-center",staticStyle:{"margin-top":"4px"}},[o("el-color-picker",{staticStyle:{"margin-right":"4px"},attrs:{size:"mini"},on:{change:function(e){return t.changeColor(e,"coach_font_color")}},model:{value:t.color.coach_font_color,callback:function(e){t.$set(t.color,"coach_font_color",e)},expression:"color.coach_font_color"}})],1),t._v(" "),o("div",{staticClass:"flex-y-center",staticStyle:{height:"18px","margin-top":"4px"}},[o("div",{staticStyle:{"line-height":"18px","font-size":"10px"}},[t._v("自定义配色")]),t._v(" "),o("i",{staticClass:"iconfont icon-xuanze flex-center",class:[{"icon-xuanze-fill":9===t.ind.coach_font_color}],staticStyle:{margin:"0"}})])])]),t._v(" "),o("div",[o("lb-button",{attrs:{type:"danger",plain:"",size:"small"},on:{click:function(e){return t.toReset("coach")}}},[t._v(t._s(t.$t("action.defaultSet")))])],1)]),t._v(" "),o("el-form-item",[o("lb-button",{directives:[{name:"preventReClick",rawName:"v-preventReClick"}],attrs:{type:"primary"},on:{click:t.submitForm}},[t._v(t._s(t.$t("action.submit")))])],1)],1)],1)],1)},staticRenderFns:[]};var m=o("VU/8")(u,v,!1,function(t){o("oKUQ")},"data-v-066013f4",null);e.default=m.exports},oKUQ:function(t,e){}});