新增SMTP邮件通知、仪表盘图表、授权编辑功能、API文档

This commit is contained in:
Fei-Qing committed 2026-06-23 19:05:43 +08:00
1 parent d6d7a1a27e
commit 044e526c80
87 files changed
+1851 -237

No files matched your search

@@ -0,0 +1 @@
import{_ as hl,m as oe,F as xl,G as xe,o as r,c as h,b as e,w as a,B as O,H as P,l as c,I as El,J as Cl,K as Sl,u as Vl,L as Ml,r as u,T as ne,M as y,N as Bl,a as n,E as zl,O as Fl,A as z,P as Tl,Q as Il,R as Rl,S as g,U as Al,V as N,W as Ll,X as Pl,Y as Ul,i as b,C as F,Z as Dl,$ as $l,a0 as Gl,a1 as Ol,a2 as Nl,a3 as Hl,a4 as Kl,d as jl,a5 as Ee,e as Wl,f as ql,h as Yl,a6 as Jl,D as _,k as x}from"./index-CZJEDzxI.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{u as Ql}from"./user-iqLWbJfU.js";import{r as Ce}from"./index-CxGbf_5w.js";const Xl={class:"logo-icon"},Zl={key:0,class:"logo-text"},ea={key:0,class:"sidebar-footer"},la={class:"theme-label"},aa={class:"theme-dots"},ta=["title","onClick"],oa={key:1,class:"sidebar-footer-collapse"},na=["title"],sa={class:"header-left"},ua={class:"header-right"},ra=["title"],da={class:"user-info"},ia={class:"user-name"},pa={class:"profile-avatar-section"},ma={class:"avatar-overlay"},ca=768,Se="cardauth_sidebar_theme",Ve="cardauth_primary_theme",fa={__name:"MainLayout",setup(_a){const H=Vl(),U=Ml(),k=Ql(),i=_(()=>k.user),f=c(!1),Me=_(()=>U.path),se=_(()=>{var t;return["admin","project_admin"].includes((t=i.value)==null?void 0:t.role)}),Be=_(()=>{var t;return((t=i.value)==null?void 0:t.role)==="agent"}),K=_(()=>{var t;return((t=i.value)==null?void 0:t.role)==="admin"}),ze=_(()=>se.value),v=c(!1),E=c(!1);function j(){v.value=window.innerWidth<ca,v.value&&(f.value=!1,E.value=!1)}function Fe(){v.value?E.value=!E.value:f.value=!f.value}function ue(){E.value=!1}function Te(){v.value&&(E.value=!1)}function Ie(){ue(),H.push("/dashboard")}oe(()=>{j(),window.addEventListener("resize",j)}),xl(()=>{window.removeEventListener("resize",j)});const re=_(()=>{var l,m;return{admin:"超级管理员",project_admin:"项目管理员",agent:"代理"}[(l=i.value)==null?void 0:l.role]||((m=i.value)==null?void 0:m.role)}),de=c(null),W=c({top:"0px",opacity:0});function q(){El(()=>{const t=de.value;if(!t)return;const l=t.querySelector(".el-menu-item.is-active");if(!l){W.value={top:"0px",opacity:0};return}const m=t.getBoundingClientRect(),s=l.getBoundingClientRect();W.value={top:`${s.top-m.top}px`,height:`${s.height}px`,opacity:1}})}xe(()=>U.path,q),xe(f,()=>{setTimeout(q,350)});const T=[{key:"dark-blue",label:"深海蓝",color:"#1a1a2e"},{key:"dark",label:"暗夜黑",color:"#141414"},{key:"light",label:"简约白",color:"#ffffff"},{key:"purple",label:"罗兰紫",color:"#2d1b4e"},{key:"green",label:"森林绿",color:"#0d2f23"}],V=c("dark-blue"),Re=_(()=>{var t;return((t=T.find(l=>l.key===V.value))==null?void 0:t.color)||"#1a1a2e"}),Ae=_(()=>{var t;return((t=T.find(l=>l.key===V.value))==null?void 0:t.label)||"深海蓝"});function ie(t){V.value=t,localStorage.setItem(Se,t)}oe(()=>{const t=localStorage.getItem(Se);t&&T.some(l=>l.key===t)&&(V.value=t),q()});const I=[{key:"indigo",label:"靛蓝",color:"#6366f1"},{key:"blue",label:"天蓝",color:"#0ea5e9"},{key:"rose",label:"玫瑰",color:"#f43f5e"},{key:"amber",label:"琥珀",color:"#f59e0b"},{key:"emerald",label:"翠绿",color:"#10b981"}],M=c("indigo"),Le=_(()=>{var t;return((t=I.find(l=>l.key===M.value))==null?void 0:t.color)||"#6366f1"}),Pe=_(()=>{var t;return((t=I.find(l=>l.key===M.value))==null?void 0:t.label)||"靛蓝"});function pe(t){const l=document.body.classList;I.forEach(m=>l.remove(`theme-primary-${m.key}`)),l.add(`theme-primary-${t}`)}function Ue(t){M.value=t,localStorage.setItem(Ve,t),pe(t)}oe(()=>{const t=localStorage.getItem(Ve);t&&I.some(l=>l.key===t)&&(M.value=t),pe(M.value)});const De={"/dashboard":[],"/projects":[{path:"/dashboard",title:"业务管理"}],"/products":[{path:"/dashboard",title:"业务管理"}],"/cards":[{path:"/dashboard",title:"业务管理"}],"/authorizations":[{path:"/dashboard",title:"业务管理"}],"/orders":[{path:"/dashboard",title:"订单与代理"}],"/coupons":[{path:"/dashboard",title:"订单与代理"}],"/blacklist":[{path:"/dashboard",title:"订单与代理"}],"/agents":[{path:"/dashboard",title:"订单与代理"}],"/users":[{path:"/dashboard",title:"系统管理"}],"/payment-config":[{path:"/dashboard",title:"系统管理"}],"/system":[{path:"/dashboard",title:"系统管理"}],"/logs":[{path:"/dashboard",title:"系统管理"}]},me=_(()=>[...De[U.path]||[],{title:U.meta.title}]),R=c(!1),Y=c(!1),J=c(null),C=c({old_password:"",new_password:""}),$e={old_password:[{required:!0,message:"请输入原密码",trigger:"blur"}],new_password:[{required:!0,min:6,message:"新密码至少6位",trigger:"blur"}]};function Ge(t){var l,m,s,D,d;if(t==="logout"){const Z=(l=i.value)==null?void 0:l.role;k.logout(),H.push(Z==="agent"?"/agent/login":"/login")}else t==="changePwd"?(C.value={old_password:"",new_password:""},R.value=!0):t==="profile"&&(p.value={nickname:((m=i.value)==Line truncated