wangchen147 c0d930bae5 0.0.8
2023-12-09 11:11:53 +08:00

2 lines
5.8 KiB
JavaScript

import{d as C,r as _,R as g,e as f,f as B,g as i,B as u,u as a,Q as D,v as w,x as s,y as l,H as I,A as R}from"./base-2de02574.js";/* empty css *//* empty css */import{a as F,E as T}from"./el-form-item-aacba116.js";/* empty css */import{_ as S}from"./index-9e72c628.js";/* empty css */import{t as o}from"./index-a7cd5616.js";import{ah as x,ai as j}from"./index-4ca69875.js";import{h as q,a as A}from"./common-655c495e.js";import{u as W}from"./vue-router-834a68c8.js";import{E as H}from"./index-f34dc67c.js";import{E as L}from"./index-409cdc90.js";import{E as O}from"./index-84eb3c18.js";import{v as Q}from"./directive-ce271fd4.js";import"./index-53431221.js";import"./event-30fa88cc.js";import"./index-29aaa146.js";/* empty css */import"./index.vue_vue_type_style_index_0_lang-11e8968f.js";import"./el-overlay-c29a408e.js";import"./index-fa3f6669.js";import"./focus-trap-852901de.js";import"./index-a556d0d2.js";import"./index-53f4bde2.js";import"./attachment-98d5a55e.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-99061637.js";import"./index-78ade149.js";import"./index-389593d1.js";import"./index-652deeae.js";import"./aria-adfa05c5.js";import"./validator-a9a156f1.js";import"./index-9c3282b5.js";import"./index-54d93aac.js";import"./index-6b1f8a1b.js";import"./index-afc66c39.js";import"./index-17e30841.js";import"./debounce-b627eb85.js";import"./position-a4d7d9b3.js";import"./index-56e41120.js";import"./index-7e51d50f.js";import"./isEqual-aeead489.js";import"./index-f6c4798d.js";import"./index-9868687d.js";import"./index-e3e3f033.js";import"./strings-258503d1.js";import"./index-dfcf0976.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./index-e049ae93.js";import"./el-main-e7ca7755.js";import"./index-907c8fa3.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]"},M={class:"text-[12px] text-[#a9a9a9]"},X={class:"panel-title !text-sm"},Y={class:"fixed-footer-wrap"},Z={class:"fixed-footer"},ut=C({__name:"system",setup(ee){const V=W().meta.title,d=_(!0),h=_(),t=g({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 x()).data;Object.keys(t).forEach(m=>{e[m]!=null&&(t[m]=e[m])}),h.value=q(),d.value=!1})();const b=_(),y=g({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,j(t).then(()=>{d.value=!1,E()}).catch(()=>{d.value=!1}))})},E=async()=>{const p=await(await x()).data;A.set({key:"siteInfo",data:p})};return(p,e)=>{const m=H,n=F,c=S,v=L,N=T,P=O,U=Q;return f(),B("div",$,[i("div",z,[i("span",G,u(a(V)),1)]),D((f(),w(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",M,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(),w(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})):I("",!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(()=>[R(u(a(o)("save")),1)]),_:1},8,["loading"])])])])}}});export{ut as default};