王总上门按摩后台代码
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 line
12 KiB

4 months ago
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:"su