全栈小学生 fb2c3be261 up
2026-03-20 16:00:24 +08:00

2 lines
7.5 KiB
JavaScript

import{d as U,v as F,r as b,l as h,k as t,h as w,c as k,J as P,m as M,w as r,e as o,a as n,t as u,u as a,i as N,D,G as C,L as I,H as B,E as R,M as T}from"./index-729a8626.js";/* empty css *//* empty css *//* empty css *//* empty css */import S from"./index-875145a2.js";import"./el-form-item-4ed993c7.js";/* empty css */import{a0 as q,a1 as K,a2 as L}from"./sys-1491a397.js";import{_ as W}from"./_plugin-vue_export-helper-c27b6911.js";/* empty css */import"./index.vue_vue_type_style_index_0_lang-e5b0f101.js";/* empty css *//* empty css */import"./attachment-19abcd29.js";import"./index.vue_vue_type_script_setup_true_lang-b5859645.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 *//* empty css */import"./index.vue_vue_type_script_setup_true_lang-6aa537e6.js";/* empty css */import"./index.vue_vue_type_script_setup_true_lang-44249b68.js";import"./sortable.esm-be94e56d.js";const j={class:"main-container"},A={class:"text-[16px] text-[#1D1F3A] font-bold mb-4"},G={class:"panel-title !text-[14px] bg-[#F4F5F7] p-3 border-[#E6E6E6] border-solid border-b-[1px]"},H={class:"text-[12px] text-[#a9a9a9]"},J={class:"text-[12px] text-[#a9a9a9]"},O={class:"panel-title !text-[14px] bg-[#F4F5F7] p-3 border-[#E6E6E6] border-solid border-b-[1px]"},$={class:"panel-title !text-[14px] bg-[#F4F5F7] p-3 border-[#E6E6E6] border-solid border-b-[1px]"},z={class:"fixed-footer-wrap"},Q={class:"fixed-footer"},X=U({__name:"system",setup(Y){const V=F().meta.title,m=b(!0),l=h({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:"",front_end_icon:"",icon:"",wechat_code:"",enterprise_wechat:"",tel:"",meta_title:"",meta_desc:"",meta_keyword:""});(async()=>{const p=await(await q()).data;Object.keys(l).forEach(i=>{p[i]!=null&&(l[i]=p[i])});const e=await(await K()).data;l.wechat_code=e.wechat_code,l.enterprise_wechat=e.enterprise_wechat,l.tel=e.tel,m.value=!1})();const f=b(),x=h({site_name:[{required:!0,message:t("siteNamePlaceholder"),trigger:"blur"}],front_end_name:[{required:!0,message:t("frontEndNamePlaceholder"),trigger:"blur"}]}),g=async p=>{m.value||!p||await p.validate(async e=>{e&&(m.value=!0,L(l).then(()=>{m.value=!1}).catch(()=>{m.value=!1}))})};return(p,e)=>{const i=D,s=C,c=S,_=I,v=B,y=R,E=T;return w(),k("div",j,[P((w(),M(v,{class:"page-form loading-box",model:l,"label-width":"150px",ref_key:"formRef",ref:f,rules:x},{default:r(()=>[o(_,{class:"box-card !border-none",shadow:"never"},{default:r(()=>[n("h3",A,u(a(V)),1),n("h3",G,u(a(t)("websiteInfo")),1),o(s,{label:a(t)("siteName"),prop:"site_name"},{default:r(()=>[o(i,{modelValue:l.site_name,"onUpdate:modelValue":e[0]||(e[0]=d=>l.site_name=d),modelModifiers:{trim:!0},placeholder:a(t)("siteNamePlaceholder"),class:"input-width",clearable:"",maxlength:"20","show-word-limit":""},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),o(s,{label:a(t)("logo")},{default:r(()=>[n("div",null,[o(c,{modelValue:l.logo,"onUpdate:modelValue":e[1]||(e[1]=d=>l.logo=d)},null,8,["modelValue"]),n("p",H,u(a(t)("logoPlaceholder")),1)])]),_:1},8,["label"]),o(s,{label:a(t)("icon")},{default:r(()=>[n("div",null,[o(c,{modelValue:l.icon,"onUpdate:modelValue":e[2]||(e[2]=d=>l.icon=d)},null,8,["modelValue"]),n("p",J,u(a(t)("iconPlaceholder")),1)])]),_:1},8,["label"]),o(s,{label:a(t)("keywords")},{default:r(()=>[o(i,{modelValue:l.keywords,"onUpdate:modelValue":e[3]||(e[3]=d=>l.keywords=d),modelModifiers:{trim:!0},placeholder:a(t)("keywordsPlaceholder"),class:"input-width",clearable:"",maxlength:"20","show-word-limit":""},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),o(s,{label:a(t)("desc")},{default:r(()=>[o(i,{modelValue:l.desc,"onUpdate:modelValue":e[4]||(e[4]=d=>l.desc=d),modelModifiers:{trim:!0},type:"textarea",rows:4,clearable:"",placeholder:a(t)("descPlaceholder"),class:"input-width",maxlength:"100","show-word-limit":""},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),o(_,{class:"box-card mt-[15px] !border-none",shadow:"never"},{default:r(()=>[n("h3",O,u(a(t)("frontEndInfo")),1),o(s,{label:a(t)("frontEndName")},{default:r(()=>[o(i,{modelValue:l.front_end_name,"onUpdate:modelValue":e[5]||(e[5]=d=>l.front_end_name=d),modelModifiers:{trim:!0},placeholder:a(t)("frontEndNamePlaceholder"),class:"input-width",clearable:"",maxlength:"20","show-word-limit":""},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),o(s,{label:a(t)("phone")},{default:r(()=>[o(i,{modelValue:l.phone,"onUpdate:modelValue":e[6]||(e[6]=d=>l.phone=d),modelModifiers:{trim:!0},placeholder:a(t)("phonePlaceholder"),class:"input-width",clearable:"",maxlength:"20","show-word-limit":""},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),o(s,{label:a(t)("logo")},{default:r(()=>[o(c,{modelValue:l.front_end_logo,"onUpdate:modelValue":e[7]||(e[7]=d=>l.front_end_logo=d)},null,8,["modelValue"])]),_:1},8,["label"]),o(s,{label:a(t)("icon")},{default:r(()=>[o(c,{modelValue:l.front_end_icon,"onUpdate:modelValue":e[8]||(e[8]=d=>l.front_end_icon=d)},null,8,["modelValue"])]),_:1},8,["label"]),o(s,{label:a(t)("metaTitle")},{default:r(()=>[o(i,{modelValue:l.meta_title,"onUpdate:modelValue":e[9]||(e[9]=d=>l.meta_title=d),modelModifiers:{trim:!0},placeholder:a(t)("MetaPlaceholder"),class:"input-width",clearable:"",maxlength:"40","show-word-limit":""},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),o(s,{label:a(t)("metaDescription")},{default:r(()=>[o(i,{modelValue:l.meta_desc,"onUpdate:modelValue":e[10]||(e[10]=d=>l.meta_desc=d),modelModifiers:{trim:!0},placeholder:a(t)("metaDescriptionPlaceholder"),class:"input-width",clearable:"",maxlength:"200","show-word-limit":""},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),o(s,{label:a(t)("metaKeywords")},{default:r(()=>[o(i,{modelValue:l.meta_keyword,"onUpdate:modelValue":e[11]||(e[11]=d=>l.meta_keyword=d),modelModifiers:{trim:!0},placeholder:a(t)("metaKeywordsPlaceholder"),class:"input-width",clearable:"",maxlength:"200","show-word-limit":""},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),o(_,{class:"box-card mt-[15px] !border-none",shadow:"never"},{default:r(()=>[n("h3",$,u(a(t)("serviceInformation")),1),o(s,{label:a(t)("contactsTel")},{default:r(()=>[o(i,{modelValue:l.tel,"onUpdate:modelValue":e[12]||(e[12]=d=>l.tel=d),modelModifiers:{trim:!0},placeholder:a(t)("contactsTelPlaceholder"),class:"input-width",clearable:"",maxlength:"20","show-word-limit":""},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),o(s,{label:a(t)("wechatCode")},{default:r(()=>[o(c,{modelValue:l.wechat_code,"onUpdate:modelValue":e[13]||(e[13]=d=>l.wechat_code=d)},null,8,["modelValue"])]),_:1},8,["label"]),o(s,{label:a(t)("customerServiceCode")},{default:r(()=>[o(c,{modelValue:l.enterprise_wechat,"onUpdate:modelValue":e[14]||(e[14]=d=>l.enterprise_wechat=d)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1})]),_:1},8,["model","rules"])),[[E,m.value]]),n("div",z,[n("div",Q,[o(y,{type:"primary",loading:m.value,onClick:e[15]||(e[15]=d=>g(f.value))},{default:r(()=>[N(u(a(t)("save")),1)]),_:1},8,["loading"])])])])}}});const Be=W(X,[["__scopeId","data-v-aad6942a"]]);export{Be as default};