test_lgq/niucloud/public/admin/assets/system-afcf7177.js

2 lines
5.4 KiB
JavaScript
Raw Normal View History

2024-01-24 17:36:08 +08:00
import{d as P,r as f,n as g,N as a,h,c as C,y as I,I as V,w as n,e as t,a as i,t as c,u as o,B,i as D,L as F,U as S,W as T,X as L,$ as R,Y as W,E as $,a0 as q}from"./index-4dcc0234.js";/* empty css *//* empty css *//* empty css *//* empty css */import{_ as j}from"./index-742b412a.js";import"./el-form-item-4ed993c7.js";/* empty css */import{_ as v,H as A,$ as H}from"./sys-8ead7f22.js";/* empty css */import"./index.vue_vue_type_style_index_0_lang-5c6c00d9.js";/* empty css */import"./attachment-c69dd9fd.js";/* empty css *//* 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 *//* empty css */import"./index.vue_vue_type_script_setup_true_lang-9285296e.js";/* empty css */const O={class:"main-container"},X={class:"panel-title !text-sm"},Y={class:"text-[12px] text-[#a9a9a9]"},z={class:"text-[12px] text-[#a9a9a9]"},G={class:"panel-title !text-sm"},J={class:"panel-title !text-sm"},K={class:"fixed-footer-wrap"},M={class:"fixed-footer"},Ce=P({__name:"system",setup(Q){const m=f(!0),b=f(),e=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:"",wechat_code:"",enterprise_wechat:"",tel:""});(async(u=0)=>{const l=await(await v()).data;Object.keys(e).forEach(d=>{l[d]!=null&&(e[d]=l[d])});const r=await(await A()).data;e.wechat_code=r.wechat_code,e.enterprise_wechat=r.enterprise_wechat,e.tel=r.tel,b.value=F(),m.value=!1})();const w=f(),x=g({site_name:[{required:!0,message:a("siteNamePlaceholder"),trigger:"blur"}],front_end_name:[{required:!0,message:a("frontEndNamePlaceholder"),trigger:"blur"}]}),y=async u=>{m.value||!u||await u.validate(async l=>{l&&(m.value=!0,H(e).then(()=>{m.value=!1,E()}).catch(()=>{m.value=!1}))})},E=async()=>{const u=await(await v()).data;S.set({key:"siteInfo",data:u})};return(u,l)=>{const r=T,d=L,p=j,_=R,k=W,N=$,U=q;return h(),C("div",O,[I((h(),V(k,{model:e,"label-width":"150px",ref_key:"formRef",ref:w,rules:x,class:"page-form"},{default:n(()=>[t(_,{class:"box-card !border-none",shadow:"never"},{default:n(()=>[i("h3",X,c(o(a)("websiteInfo")),1),t(d,{label:o(a)("siteName"),prop:"site_name"},{default:n(()=>[t(r,{modelValue:e.site_name,"onUpdate:modelValue":l[0]||(l[0]=s=>e.site_name=s),placeholder:o(a)("siteNamePlaceholder"),class:"input-width",clearable:"",maxlength:"20"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),t(d,{label:o(a)("logo")},{default:n(()=>[i("div",null,[t(p,{modelValue:e.logo,"onUpdate:modelValue":l[1]||(l[1]=s=>e.logo=s)},null,8,["modelValue"]),i("p",Y,c(o(a)("logoPlaceholder")),1)])]),_:1},8,["label"]),t(d,{label:o(a)("icon")},{default:n(()=>[i("div",null,[t(p,{modelValue:e.icon,"onUpdate:modelValue":l[2]||(l[2]=s=>e.icon=s)},null,8,["modelValue"]),i("p",z,c(o(a)("iconPlaceholder")),1)])]),_:1},8,["label"]),t(d,{label:o(a)("keywords")},{default:n(()=>[t(r,{modelValue:e.keywords,"onUpdate:modelValue":l[3]||(l[3]=s=>e.keywords=s),placeholder:o(a)("keywordsPlaceholder"),class:"input-width",clearable:"",maxlength:"20"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),t(d,{label:o(a)("desc")},{default:n(()=>[t(r,{modelValue:e.desc,"onUpdate:modelValue":l[4]||(l[4]=s=>e.desc=s),type:"textarea",rows:"4",clearable:"",placeholder:o(a)("descPlaceholder"),class:"input-width",maxlength:"100"},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),t(_,{class:"box-card !border-none",shadow:"never"},{default:n(()=>[i("h3",G,c(o(a)("frontEndInfo")),1),t(d,{label:o(a)("frontEndName")},{default:n(()=>[t(r,{modelValue:e.front_end_name