2 lines
3.4 KiB
JavaScript
2 lines
3.4 KiB
JavaScript
import{d as N,O as B,r as g,n as C,h,c as E,a as r,t as p,u as s,y,I as D,w as m,e as o,N as i,i as I,aM as F,X as O,$ as S,Y as U,E as j,a0 as J,_ as L}from"./index-4dcc0234.js";/* empty css *//* empty css *//* empty css *//* empty css */import{_ as R}from"./index-742b412a.js";import"./el-form-item-4ed993c7.js";/* empty css */import{J as T,K as $}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 *//* 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 k={class:"main-container"},K={class:"flex ml-[18px] justify-between items-center mt-[20px]"},M={class:"text-[20px]"},X={class:"panel-title !text-sm"},Y={class:"form-tip"},q={class:"panel-title !text-sm"},z={class:"form-tip"},A={class:"fixed-footer-wrap"},G={class:"fixed-footer"},H=N({__name:"adminlogin",setup(P){const b=B().meta.title,_=g(!0),d=g(),e=C({is_captcha:0,is_site_captcha:0,bg:"",site_bg:""});(async(c=0)=>{const t=await(await T()).data;Object.keys(e).forEach(a=>{["is_captcha","is_site_captcha"].includes(a)?e[a]=Boolean(Number(t[a])):e[a]=t[a]}),_.value=!1})();const v=async c=>{_.value||!c||await c.validate(t=>{if(t){const a=JSON.parse(JSON.stringify(e));Object.keys(a).forEach(l=>{["is_captcha","is_site_captcha"].includes(l)&&(a[l]=Number(a[l]))}),$(a).then(()=>{_.value=!1}).catch(()=>{_.value=!1})}})};return(c,t)=>{const a=F,l=O,u=R,f=S,x=U,V=j,w=J;return h(),E("div",k,[r("div",K,[r("span",M,p(s(b)),1)]),y((h(),D(x,{model:e,"label-width":"150px",ref_key:"ruleFormRef",ref:d,class:"page-form"},{default:m(()=>[o(f,{class:"box-card !border-none",shadow:"never"},{default:m(()=>[r("h3",X,p(s(i)("admin")),1),o(l,{label:s(i)("isCaptcha"),prop:"formData.is_auth_register"},{default:m(()=>[o(a,{modelValue:e.is_captcha,"onUpdate:modelValue":t[0]||(t[0]=n=>e.is_captcha=n)},null,8,["modelValue"])]),_:1},8,["label"]),o(l,{label:s(i)("bgImg")},{default:m(()=>[o(u,{modelValue:e.bg,"onUpdate:modelValue":t[1]||(t[1]=n=>e.bg=n)},null,8,["modelValue"]),r("div",Y,p(s(i)("adminBgImgTip")),1)]),_:1},8,["label"])]),_:1}),o(f,{class:"box-card !border-none mt-4",shadow:"never"},{default:m(()=>[r("h3",q,p(s(i)("site")),1),o(l,{label:s(i)("isCaptcha"),prop:"formData.is_auth_register"},{default:m(()=>[o(a,{modelValue:e.is_site_captcha,"onUpdate:modelValue":t[2]||(t[2]=n=>e.is_site_captcha=n)},null,8,["modelValue"])]),_:1},8,["label"]),o(l,{label:s(i)("bgImg")},{default:m(()=>[o(u,{modelValue:e.site_bg,"onUpdate:modelValue":t[3]||(t[3]=n=>e.site_bg=n)},null,8,["modelValue"]),r("div",z,p(s(i)("siteBgImgTip")),1)]),_:1},8,["label"])]),_:1})]),_:1},8,["model"])),[[w,_.value]]),r("div",A,[r("div",G,[o(V,{type:"primary",onClick:t[4]||(t[4]=n=>v(d.value))},{default:m(()=>[I(p(s(i)("save")),1)]),_:1})])])])}}});const It=L(H,[["__scopeId","data-v-09344233"]]);export{It as default};
|