2023-11-15 15:57:04 +08:00

2 lines
5.9 KiB
JavaScript

/* empty css *//* empty css *//* empty css */import{a as C,E as B}from"./el-form-item-1b16c9fc.js";/* empty css */import{_ as D}from"./index-2d04c504.js";/* empty css */import{t as o}from"./index-0ca94763.js";import{ah as g,ai as I}from"./index-7eafba5f.js";import{h as F,a as R}from"./common-c3be41fd.js";import{u as T}from"./vue-router-48fdc1e3.js";import{E as S}from"./index-e27c3bb0.js";import{E as j}from"./index-9ecd3f93.js";import{E as q}from"./index-c5914bde.js";import{v as A}from"./directive-64fb15dc.js";import{d as O,r as _,O as w,e as f,f as W,g as i,B as u,u as a,M as H,v as x,x as s,y as l,H as L,A as M}from"./plugin-vue_export-helper-85a4d40b.js";import"./index-cf9a2dd7.js";import"./event-f85d77b0.js";import"./index-bcd7a424.js";import"./_baseClone-3dbf39d6.js";/* empty css */import"./index.vue_vue_type_style_index_0_lang-14193028.js";import"./el-overlay-08181e74.js";import"./index-313cd2ce.js";import"./focus-trap-64c402c5.js";import"./index-1ad115d7.js";import"./index-de1d3b53.js";import"./attachment-afdaf51f.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./index-d469ae66.js";import"./index-489c18c0.js";import"./index-4d8f36c6.js";import"./index-ee5275c6.js";import"./aria-adfa05c5.js";import"./validator-bcf701e4.js";import"./index-ebc73046.js";import"./index-e1882aa8.js";import"./index-a7e8e96f.js";import"./index-888853cf.js";import"./index-344f0086.js";import"./debounce-6c3123a6.js";import"./position-37364850.js";import"./index-448a4893.js";import"./index-95b00894.js";import"./isEqual-0b9509fd.js";import"./flatten-749195f8.js";import"./index-21f38393.js";import"./index-4601cf3b.js";import"./index-99b65a15.js";import"./strings-53351eda.js";import"./index-bd04154b.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./index-e513479b.js";import"./el-main-86eb724f.js";import"./index-b9e5f5cb.js";const $={class:"main-container"},z={class:"flex ml-[18px] justify-between items-center mt-[20px] mb-[5px]"},G={class:"text-[20px]"},J={class:"panel-title !text-sm"},K={class:"text-[12px] text-[#a9a9a9]"},Q={class:"text-[12px] text-[#a9a9a9]"},X={class:"panel-title !text-sm"},Y={class:"fixed-footer-wrap"},Z={class:"fixed-footer"},ft=O({__name:"system",setup(ee){const V=T().meta.title,d=_(!0),h=_(),t=w({site_name:"",logo:"",desc:"",latitude:"",keywords:"",longitude:"",province_id:"",city_id:"",district_id:"",address:"",full_address:"",business_hours:"",phone:"",front_end_name:"",front_end_logo:"",icon:"",tel:"",wechat_code:"",enterprise_wechat:""});(async(p=0)=>{const e=await(await g()).data;Object.keys(t).forEach(m=>{e[m]!=null&&(t[m]=e[m])}),h.value=F(),d.value=!1})();const b=_(),y=w({site_name:[{required:!0,message:o("siteNamePlaceholder"),trigger:"blur"}],front_end_name:[{required:!0,message:o("frontEndNamePlaceholder"),trigger:"blur"}]}),k=async p=>{d.value||!p||await p.validate(async e=>{e&&(d.value=!0,I(t).then(()=>{d.value=!1,E()}).catch(()=>{d.value=!1}))})},E=async()=>{const p=await(await g()).data;R.set({key:"siteInfo",data:p})};return(p,e)=>{const m=S,n=C,c=D,v=j,N=B,P=q,U=A;return f(),W("div",$,[i("div",z,[i("span",G,u(a(V)),1)]),H((f(),x(N,{model:t,"label-width":"150px",ref_key:"formRef",ref:b,rules:y,class:"page-form"},{default:s(()=>[l(v,{class:"box-card !border-none",shadow:"never"},{default:s(()=>[i("h3",J,u(a(o)("websiteInfo")),1),l(n,{label:a(o)("siteName"),prop:"site_name"},{default:s(()=>[l(m,{modelValue:t.site_name,"onUpdate:modelValue":e[0]||(e[0]=r=>t.site_name=r),placeholder:a(o)("siteNamePlaceholder"),class:"input-width",clearable:"",maxlength:"20"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),l(n,{label:a(o)("logo")},{default:s(()=>[i("div",null,[l(c,{modelValue:t.logo,"onUpdate:modelValue":e[1]||(e[1]=r=>t.logo=r)},null,8,["modelValue"]),i("p",K,u(a(o)("logoPlaceholder")),1)])]),_:1},8,["label"]),l(n,{label:a(o)("icon")},{default:s(()=>[i("div",null,[l(c,{modelValue:t.icon,"onUpdate:modelValue":e[2]||(e[2]=r=>t.icon=r)},null,8,["modelValue"]),i("p",Q,u(a(o)("iconPlaceholder")),1)])]),_:1},8,["label"]),l(n,{label:a(o)("keywords")},{default:s(()=>[l(m,{modelValue:t.keywords,"onUpdate:modelValue":e[3]||(e[3]=r=>t.keywords=r),placeholder:a(o)("keywordsPlaceholder"),class:"input-width",clearable:"",maxlength:"20"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),l(n,{label:a(o)("desc")},{default:s(()=>[l(m,{modelValue:t.desc,"onUpdate:modelValue":e[4]||(e[4]=r=>t.desc=r),type:"textarea",rows:"4",clearable:"",placeholder:a(o)("descPlaceholder"),class:"input-width",maxlength:"100"},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),h.value=="admin"?(f(),x(v,{key:0,class:"box-card !border-none",shadow:"never"},{default:s(()=>[i("h3",X,u(a(o)("serviceInformation")),1),l(n,{label:a(o)("contactsTel")},{default:s(()=>[l(m,{modelValue:t.tel,"onUpdate:modelValue":e[5]||(e[5]=r=>t.tel=r),placeholder:a(o)("contactsTelPlaceholder"),class:"input-width",clearable:"",maxlength:"20"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),l(n,{label:a(o)("wechatCode")},{default:s(()=>[l(c,{modelValue:t.wechat_code,"onUpdate:modelValue":e[6]||(e[6]=r=>t.wechat_code=r)},null,8,["modelValue"])]),_:1},8,["label"]),l(n,{label:a(o)("customerServiceCode")},{default:s(()=>[l(c,{modelValue:t.enterprise_wechat,"onUpdate:modelValue":e[7]||(e[7]=r=>t.enterprise_wechat=r)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1})):L("",!0)]),_:1},8,["model","rules"])),[[U,d.value]]),i("div",Y,[i("div",Z,[l(P,{type:"primary",loading:d.value,onClick:e[8]||(e[8]=r=>k(b.value))},{default:s(()=>[M(u(a(o)("save")),1)]),_:1},8,["loading"])])])])}}});export{ft as default};