全栈小学生 e6c822aa8e up niucloud
2025-06-26 15:07:17 +08:00

2 lines
6.2 KiB
JavaScript

import{d as U,v as E,r as f,bI as k,l as w,k as t,h as b,c as P,J as N,m as M,w as r,e as o,a as i,t as c,u as d,i as C,D,G as I,L as B,H as F,E as R,M as T}from"./index-f99f26c5.js";/* empty css *//* empty css *//* empty css *//* empty css */import S from"./index-d26bf7a9.js";import"./el-form-item-4ed993c7.js";/* empty css */import{a0 as q,a1 as L,a2 as W}from"./sys-c0964254.js";/* empty css */import"./index.vue_vue_type_style_index_0_lang-5728e7cf.js";/* empty css *//* empty css */import"./attachment-153bb8c5.js";import"./index.vue_vue_type_script_setup_true_lang-b1bfcd32.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-5c0ce90b.js";/* empty css */import"./index.vue_vue_type_script_setup_true_lang-72e25793.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./sortable.esm-be94e56d.js";const j={class:"main-container"},A={class:"panel-title !text-sm"},G={class:"text-[12px] text-[#a9a9a9]"},H={class:"text-[12px] text-[#a9a9a9]"},J={class:"panel-title !text-sm"},O={class:"panel-title !text-sm"},$={class:"fixed-footer-wrap"},z={class:"fixed-footer"},De=U({__name:"system",setup(K){E().meta.title;const m=f(!0);f(k());const l=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:"",front_end_icon:"",icon:"",wechat_code:"",enterprise_wechat:"",tel:""});(async()=>{const u=await(await q()).data;Object.keys(l).forEach(s=>{u[s]!=null&&(l[s]=u[s])});const e=await(await L()).data;l.wechat_code=e.wechat_code,l.enterprise_wechat=e.enterprise_wechat,l.tel=e.tel,m.value=!1})();const h=f(),V=w({site_name:[{required:!0,message:t("siteNamePlaceholder"),trigger:"blur"}],front_end_name:[{required:!0,message:t("frontEndNamePlaceholder"),trigger:"blur"}]}),g=async u=>{m.value||!u||await u.validate(async e=>{e&&(m.value=!0,W(l).then(()=>{m.value=!1}).catch(()=>{m.value=!1}))})};return(u,e)=>{const s=D,n=I,p=S,_=B,v=F,x=R,y=T;return b(),P("div",j,[N((b(),M(v,{class:"page-form",model:l,"label-width":"150px",ref_key:"formRef",ref:h,rules:V},{default:r(()=>[o(_,{class:"box-card !border-none",shadow:"never"},{default:r(()=>[i("h3",A,c(d(t)("websiteInfo")),1),o(n,{label:d(t)("siteName"),prop:"site_name"},{default:r(()=>[o(s,{modelValue:l.site_name,"onUpdate:modelValue":e[0]||(e[0]=a=>l.site_name=a),modelModifiers:{trim:!0},placeholder:d(t)("siteNamePlaceholder"),class:"input-width",clearable:"",maxlength:"20","show-word-limit":""},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),o(n,{label:d(t)("logo")},{default:r(()=>[i("div",null,[o(p,{modelValue:l.logo,"onUpdate:modelValue":e[1]||(e[1]=a=>l.logo=a)},null,8,["modelValue"]),i("p",G,c(d(t)("logoPlaceholder")),1)])]),_:1},8,["label"]),o(n,{label:d(t)("icon")},{default:r(()=>[i("div",null,[o(p,{modelValue:l.icon,"onUpdate:modelValue":e[2]||(e[2]=a=>l.icon=a)},null,8,["modelValue"]),i("p",H,c(d(t)("iconPlaceholder")),1)])]),_:1},8,["label"]),o(n,{label:d(t)("keywords")},{default:r(()=>[o(s,{modelValue:l.keywords,"onUpdate:modelValue":e[3]||(e[3]=a=>l.keywords=a),modelModifiers:{trim:!0},placeholder:d(t)("keywordsPlaceholder"),class:"input-width",clearable:"",maxlength:"20","show-word-limit":""},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),o(n,{label:d(t)("desc")},{default:r(()=>[o(s,{modelValue:l.desc,"onUpdate:modelValue":e[4]||(e[4]=a=>l.desc=a),modelModifiers:{trim:!0},type:"textarea",rows:4,clearable:"",placeholder:d(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(()=>[i("h3",J,c(d(t)("frontEndInfo")),1),o(n,{label:d(t)("frontEndName")},{default:r(()=>[o(s,{modelValue:l.front_end_name,"onUpdate:modelValue":e[5]||(e[5]=a=>l.front_end_name=a),modelModifiers:{trim:!0},placeholder:d(t)("frontEndNamePlaceholder"),class:"input-width",clearable:"",maxlength:"20","show-word-limit":""},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),o(n,{label:d(t)("phone")},{default:r(()=>[o(s,{modelValue:l.phone,"onUpdate:modelValue":e[6]||(e[6]=a=>l.phone=a),modelModifiers:{trim:!0},placeholder:d(t)("phonePlaceholder"),class:"input-width",clearable:"",maxlength:"20","show-word-limit":""},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),o(n,{label:d(t)("logo")},{default:r(()=>[o(p,{modelValue:l.front_end_logo,"onUpdate:modelValue":e[7]||(e[7]=a=>l.front_end_logo=a)},null,8,["modelValue"])]),_:1},8,["label"]),o(n,{label:d(t)("icon")},{default:r(()=>[o(p,{modelValue:l.front_end_icon,"onUpdate:modelValue":e[8]||(e[8]=a=>l.front_end_icon=a)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),o(_,{class:"box-card mt-[15px] !border-none",shadow:"never"},{default:r(()=>[i("h3",O,c(d(t)("serviceInformation")),1),o(n,{label:d(t)("contactsTel")},{default:r(()=>[o(s,{modelValue:l.tel,"onUpdate:modelValue":e[9]||(e[9]=a=>l.tel=a),modelModifiers:{trim:!0},placeholder:d(t)("contactsTelPlaceholder"),class:"input-width",clearable:"",maxlength:"20","show-word-limit":""},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),o(n,{label:d(t)("wechatCode")},{default:r(()=>[o(p,{modelValue:l.wechat_code,"onUpdate:modelValue":e[10]||(e[10]=a=>l.wechat_code=a)},null,8,["modelValue"])]),_:1},8,["label"]),o(n,{label:d(t)("customerServiceCode")},{default:r(()=>[o(p,{modelValue:l.enterprise_wechat,"onUpdate:modelValue":e[11]||(e[11]=a=>l.enterprise_wechat=a)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1})]),_:1},8,["model","rules"])),[[y,m.value]]),i("div",$,[i("div",z,[o(x,{type:"primary",loading:m.value,onClick:e[12]||(e[12]=a=>g(h.value))},{default:r(()=>[C(c(d(t)("save")),1)]),_:1},8,["loading"])])])])}}});export{De as default};