又优化了很多

This commit is contained in:
likun 2025-05-12 11:09:11 +08:00
parent a83ca924b7
commit d562c644dd
52 changed files with 465 additions and 5 deletions

View File

@ -63,7 +63,12 @@ func (svc *CommonResourceService) List(projectId int, resource string, listParam
// 执行各个项目特定的钩子方法
if hook, ok := projects.GetProjectResourceHook(projectEt, resource).(projects.IPostResourceOpListHook); ok {
return hook.List(projectEt, resource, listParams, fieldsDescInfo, totalCount, retList)
totalCount1, fieldsDescInfo1, retList1, err1 := hook.List(projectEt, resource, listParams, fieldsDescInfo, totalCount, retList)
if err1 != nil {
xlog.Warnf("list resource %v, hook return error:%v", resource, err1)
return totalCount, fieldsDescInfo, retList, nil
}
return totalCount1, fieldsDescInfo1, retList1, nil
}
return totalCount, fieldsDescInfo, retList, nil

View File

@ -6,6 +6,7 @@ import (
)
func (srv *Server) Route(engine *web.Engine, sdkEngine *web.Engine) {
{ // gm后台内部路由
engine.Use(srv.CheckToken)

View File

@ -78,6 +78,7 @@ func (repo *commonResourceRepoImpl) GetById(id int) ([]*dto.CommonDtoFieldDesc,
func (repo *commonResourceRepoImpl) Create(dtoObj dto.CommonDtoValues) (*entity.CommonResource, error) {
if pass, find := dtoObj["UserPass"]; find {
dtoObj["UserPass"] = passlib.EncryptPassword(pass.(string))
xlog.Tracef("create user %v pwd %v, encrypted pwd %v", dtoObj["UserName"], pass, dtoObj["UserPass"])
}
et := (&entity.CommonResource{}).FromPo(repo.newEmptyPo()).FromDto(dtoObj)
err := repo.db.Create(et.Po).Error

View File

@ -5,6 +5,7 @@ import (
"admin/apps/user/model"
"admin/internal/errcode"
"admin/lib/passlib"
"admin/lib/xlog"
"time"
)
@ -21,6 +22,10 @@ func (svc *CommonResourceService) Login(user, pwd string) (*entity.User, error)
return nil, errcode.New(errcode.UserOrPassInValid, "")
}
pwd1 := passlib.EncryptPassword(pwd)
xlog.Tracef("user %v pass %v(%v), db pass:%v", user, pwd, pwd1, userEt.Po.UserPass)
if !passlib.ComparePassword(userEt.Po.UserPass, pwd) {
return nil, errcode.New(errcode.UserOrPassInValid, "")
}

View File

@ -6,6 +6,7 @@ import (
)
func (srv *Server) Route(engine *web.Engine) {
engine.Use(srv.CheckToken)
apiGroup := engine.Group("/api", "")

1
admin/cmd/all_in_one/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
udniugm*

View File

@ -7,6 +7,9 @@ import (
"admin/lib/node"
"admin/lib/web"
"admin/lib/xlog"
"admin/ui"
"github.com/gin-gonic/gin"
"net/http"
)
func New() *node.Node {
@ -15,6 +18,18 @@ func New() *node.Node {
nd.AddInitTask("初始化全局api监听服务", func() error {
global.GLOB_API_ENGINE = web.New(context.NewWebContext)
global.GLOB_API_ENGINE.GetRawEngine().Use(ui.Serve("/", ui.EmbedFolder(ui.UI, "static")))
global.GLOB_API_ENGINE.GetRawEngine().NoRoute(func(c *gin.Context) {
data, err := ui.UI.ReadFile("static/index.html")
if err != nil {
c.AbortWithError(http.StatusInternalServerError, err)
return
}
c.Data(http.StatusOK, "text/html; charset=utf-8", data)
})
return nil
})

View File

@ -71,6 +71,10 @@ func Request(addr string, method string, body interface{}, resData interface{})
}
res, err = http.Get(removeUrl)
if err != nil {
xlog.Warnf(err)
return errcode.New(errcode.ServerError, "数据请求失败:%v", err)
}
}
// 获取数据

View File

@ -23,6 +23,10 @@ func (e *Engine) Use(middlewares ...HandlerFunc) {
e.rawEngine.Use(getGinHandlerFunWithRequest(e.newContextFun, middlewares...)...)
}
func (e *Engine) GetRawEngine() *gin.Engine {
return e.rawEngine
}
func (e *Engine) Run(addr string) error {
return e.rawEngine.Run(addr)
}

BIN
admin/ui/static/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -0,0 +1,16 @@
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="UTF-8">
<link rel="icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vite App</title>
<script type="module" crossorigin src="/static/js/index-CYkgYYGI.js"></script>
<link rel="modulepreload" crossorigin href="/static/js/vendor-IqGmXQdF.js">
<link rel="stylesheet" crossorigin href="/static/css/vendor-CBmCU95C.css">
<link rel="stylesheet" crossorigin href="/static/css/index-C-gpRTJ4.css">
</head>
<body>
<div id="app"></div>
</body>
</html>

View File

@ -0,0 +1 @@
.login-box[data-v-4bf741f4]{width:100%;display:flex;justify-content:center;align-items:center;height:100vh;background-color:#f6f5f7;background-size:cover;background-image:url(/static/svg/login-background-aYUymIuP.svg)}.container[data-v-4bf741f4]{position:relative;width:768px;height:480px;background-color:#fff;box-shadow:0 14px 28px #00000040,0 10px 10px #0003;border-radius:10px;overflow:hidden}.form-container[data-v-4bf741f4]{position:absolute;top:0;width:50%;height:100%;background-color:#fff;transition:all .6s ease-in-out}.form[data-v-4bf741f4]{display:flex;text-align:-webkit-center;flex-direction:column;justify-content:center;align-items:center;height:100%;padding:0 50px}.form-item[data-v-4bf741f4]{width:100%}.form-item[data-v-4bf741f4] .el-input-group__append :deep(.el-button){width:60px}[data-v-4bf741f4] .el-input__wrapper{border-radius:30px}[data-v-4bf741f4] .el-input-group__append{border-radius:20px;margin-left:10px;background:#fff;color:#fafafa}.forget[data-v-4bf741f4]{font-size:12px;color:#32323299;position:relative;top:50px}button[data-v-4bf741f4]:active{transform:scale(.95)}.container.active .sign-up-container[data-v-4bf741f4]{transform:translate(100%);z-index:5}.container.active .sign-in-container[data-v-4bf741f4]{transform:translate(100%)}.container.active .overlay_container[data-v-4bf741f4]{transform:translate(-100%)}.container.active .overlay[data-v-4bf741f4]{transform:translate(50%)}.theme-button[data-v-4bf741f4]{background:#409effb3;padding:10px 50px;border:1px solid transparent;border-radius:20px;text-transform:uppercase;color:#fff;margin-top:10px;outline:none;transition:transform 80}.overlay_container[data-v-4bf741f4]{position:absolute;top:0;width:50%;height:100%;z-index:100;right:0;overflow:hidden;transition:all .6s ease-in-out}.overlay[data-v-4bf741f4]{position:absolute;width:200%;height:100%;left:-100%;background-color:#42b983}.overlay_panel[data-v-4bf741f4]{position:absolute;display:flex;flex-direction:column;justify-content:center;align-items:center;width:50%;height:100%;color:#fff;padding:0;text-align:center}.overlay_panel button[data-v-4bf741f4]{background-color:transparent;border:1px solid white}.overlay_panel p[data-v-4bf741f4]{font-size:12px;margin:10px 0 15px}.overlay_right_container[data-v-4bf741f4]{right:0}

View File

@ -0,0 +1 @@
body{min-height:100vh;color:var(--color-text);background:var(--color-background);transition:color .5s,background-color .5s;line-height:1.6;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:15px;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.el-table .el-table__header-wrapper th,.el-table .el-table__fixed-header-wrapper th{word-break:break-word;background-color:#f8f8f9!important;color:#515a6e;height:40px!important;font-size:13px}.el-table .el-table__body-wrapper .el-button [class*=el-icon-]+span{margin-left:1px}.el-table .fixed-width .el-button--small{padding-left:0;padding-right:0;width:inherit}.el-table .el-dropdown-link{cursor:pointer;color:#409eff;margin-left:10px}.el-table .el-dropdown,.el-icon-arrow-down{font-size:12px}h1[data-v-91a3a3e6]{color:#333;text-align:center;margin-bottom:20px}.layout-container[data-v-91a3a3e6]{height:100vh;overflow:hidden}.layout-container .el-aside-demo[data-v-91a3a3e6]{position:fixed;left:0;top:0;bottom:0;width:200px;z-index:1000;overflow-y:auto;box-shadow:2px 0 6px #0000001a;background-color:#4d4f52}.layout-container .el-aside-demo .sidebar-content[data-v-91a3a3e6]{overflow-y:auto}.layout-container .el-container-right[data-v-91a3a3e6]{min-height:100vh;margin-left:200px;flex-direction:column}.layout-container .el-container-right .el-header-demo[data-v-91a3a3e6]{height:60px;background:#fff;border-bottom:1px solid #e6e6e6;box-shadow:0 1px 4px #0000001a}.layout-container .el-container-right .el-main-demo[data-v-91a3a3e6]{flex:1;padding:20px;background:#f0f2f5}.sidebar-logo[data-v-91a3a3e6]{display:flex;align-items:center;padding:20px 0;text-align:center;background:transparent;position:relative;z-index:1;cursor:pointer}.sidebar-logo .logo[data-v-91a3a3e6]{width:50px;height:50px;margin-bottom:10px;filter:drop-shadow(0 0 2px rgba(255,255,255,.5))}.sidebar-logo .system-name[data-v-91a3a3e6]{color:#ffffffe6;margin:0;font-size:15px;font-weight:500;letter-spacing:1px;text-shadow:1px 1px 2px rgba(0,0,0,.2)}.el-menu-vertical-demo[data-v-91a3a3e6]{flex:1;background-color:#4d4f52}[data-v-91a3a3e6] .el-menu-vertical-demo .el-menu-item,[data-v-91a3a3e6] .el-menu-vertical-demo .el-sub-menu{color:#fff;background-color:#4d4f52}[data-v-91a3a3e6] .el-menu-vertical-demo .el-sub-menu__title{color:#fff}[data-v-91a3a3e6] .el-menu-vertical-demo .el-menu-item:hover,[data-v-91a3a3e6] .el-menu-vertical-demo .el-sub-menu__title:hover{background-color:#1f2d3d}[data-v-91a3a3e6] .el-menu-vertical-demo .el-menu-item.is-active,[data-v-91a3a3e6] .el-menu-vertical-demo .el-sub-menu__title.is-active{background-color:#e91f63;color:#545c64}[data-v-91a3a3e6] .el-menu-vertical-demo .el-sub-menu__title i,[data-v-91a3a3e6] .el-menu-vertical-demo .el-menu-item i{margin-right:10px}.avatar-container[data-v-91a3a3e6]{height:50px;overflow:hidden;position:relative;float:right;background:#fff;box-shadow:0 1px 4px #00152914;margin-right:40px}.avatar-container .avatar-wrapper[data-v-91a3a3e6]{margin-top:5px;position:relative;align-items:center;cursor:pointer}.avatar-container .avatar-wrapper i[data-v-91a3a3e6]{cursor:pointer;position:absolute;right:-20px;top:25px;font-size:12px}

View File

@ -0,0 +1 @@
.demo-pagination-block[data-v-8d4ddc4c]{margin-top:10px}.demo-pagination-block .el-pagination[data-v-8d4ddc4c]{right:40px;position:absolute}

View File

@ -0,0 +1 @@
.demo-pagination-block[data-v-b57ef680]{margin-top:10px}.demo-pagination-block .el-pagination[data-v-b57ef680]{right:40px;position:absolute}

View File

@ -0,0 +1 @@
.demo-pagination-block[data-v-bc76aa70]{margin-top:10px}.demo-pagination-block .el-pagination[data-v-bc76aa70]{right:40px;position:absolute}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
import{r as e,a4 as a,f as o,o as s,g as r,h as l,w as t,X as n,_ as u,a5 as d,Q as i,p,W as c,a6 as m}from"./vendor-IqGmXQdF.js";import{_ as f,l as v,L as _,E as g,r as h}from"./index-CYkgYYGI.js";const y={class:"login-box"},k={class:m({container:!0,animate__animated:!0,animate__flipInX:!0})},w={class:"form-container sign-in-container"},C=f({__name:"Login",setup(m){e(void 0);const{proxy:f}=a(),C=e({user:"",password:""}),V={user:[{required:!0,trigger:"blur",message:"请输入您的账号"}],password:[{required:!0,trigger:"blur",message:"请输入您的密码"}]},b=e=>{e&&f.$refs.ruleFormRef.validate((e=>{if(!e)return!1;v(C.value).then((e=>{_.setCache("token",e.data.token_info.token),_.setCache("user",e.data.user_info),g.setCache("token",e.data.token_info.token,e.data.token_info.expire_at),h.push({path:"/"})}),(e=>{}))}))};return(e,a)=>{const m=u,f=n,v=i,_=c;return s(),o("div",y,[r("div",k,[r("div",w,[l(_,{ref:"ruleFormRef",model:C.value,"status-icon":"",rules:V,class:"form"},{default:t((()=>[l(f,{class:"form-item",prop:"username"},{default:t((()=>[l(m,{modelValue:C.value.user,"onUpdate:modelValue":a[0]||(a[0]=e=>C.value.user=e),placeholder:"用户名",autocomplete:"off",onKeyup:a[1]||(a[1]=d((e=>b(C.value)),["enter"]))},null,8,["modelValue"])])),_:1}),l(f,{class:"form-item",prop:"password"},{default:t((()=>[l(m,{modelValue:C.value.password,"onUpdate:modelValue":a[2]||(a[2]=e=>C.value.password=e),placeholder:"密码",type:"password",autocomplete:"off",onKeyup:a[3]||(a[3]=d((e=>b(C.value)),["enter"]))},null,8,["modelValue"])])),_:1}),l(v,{class:"theme-button",type:"primary",onClick:a[4]||(a[4]=e=>b(C.value)),onKeydown:a[5]||(a[5]=d((e=>{var a;13!==a.keyCode&&100!==a.keyCode||b(C.value)}),["enter"]))},{default:t((()=>a[7]||(a[7]=[p("登 陆 ")]))),_:1}),r("p",{class:"forget",onClick:a[6]||(a[6]=a=>{e.currentModel=!e.currentModel,e.isForget=!0})}," --- Forget Passwoed---- ")])),_:1},8,["model"])]),a[8]||(a[8]=r("div",{class:"overlay_container"},[r("div",{class:"overlay"},[r("div",{class:"overlay_panel overlay_right_container"},[r("h2",{class:"container-title"},"hello friend!"),r("p",null,"输入您的个人信息,以便使用后台管理系统")])])],-1))])])}}},[["__scopeId","data-v-4bf741f4"]]);export{C as default};

View File

@ -0,0 +1 @@
import{r as m,a4 as y,f as k,o as w,g as a,h as r,w as u,X as C,_ as V,a5 as i,Q as b,p as F,W as E,a6 as x}from"./vendor-CRW8T6mY.js";import{_ as $,l as I,L as p,E as B,r as K}from"./index-CP0cWiMx.js";const L={class:"login-box"},h={class:x({container:!0,animate__animated:!0,animate__flipInX:!0})},N={class:"form-container sign-in-container"},R={__name:"Login",setup(q){m(void 0);const{proxy:f}=y(),o=m({user:"",password:""}),c={user:[{required:!0,trigger:"blur",message:"请输入您的账号"}],password:[{required:!0,trigger:"blur",message:"请输入您的密码"}]},l=s=>{s&&f.$refs.ruleFormRef.validate(e=>{if(e)I(o.value).then(t=>{p.setCache("token",t.data.token_info.token),p.setCache("user",t.data.user_info),B.setCache("token",t.data.token_info.token,t.data.token_info.expire_at),console.log("登录成功,返回数据:",t.data),K.push({path:"/"})},t=>{console.log("login response error:"),console.log(t)});else return console.log("error submit!"),!1})},_=s=>{(s.keyCode===13||s.keyCode===100)&&l(o.value)};return(s,e)=>{const t=V,d=C,v=b,g=E;return w(),k("div",L,[a("div",h,[a("div",N,[r(g,{ref:"ruleFormRef",model:o.value,"status-icon":"",rules:c,class:"form"},{default:u(()=>[r(d,{class:"form-item",prop:"username"},{default:u(()=>[r(t,{modelValue:o.value.user,"onUpdate:modelValue":e[0]||(e[0]=n=>o.value.user=n),placeholder:"用户名",autocomplete:"off",onKeyup:e[1]||(e[1]=i(n=>l(o.value),["enter"]))},null,8,["modelValue"])]),_:1}),r(d,{class:"form-item",prop:"password"},{default:u(()=>[r(t,{modelValue:o.value.password,"onUpdate:modelValue":e[2]||(e[2]=n=>o.value.password=n),placeholder:"密码",type:"password",autocomplete:"off",onKeyup:e[3]||(e[3]=i(n=>l(o.value),["enter"]))},null,8,["modelValue"])]),_:1}),r(v,{class:"theme-button",type:"primary",onClick:e[4]||(e[4]=n=>l(o.value)),onKeydown:e[5]||(e[5]=i(n=>_(),["enter"]))},{default:u(()=>e[7]||(e[7]=[F("登 陆 ")])),_:1}),a("p",{class:"forget",onClick:e[6]||(e[6]=n=>{s.currentModel=!s.currentModel,s.isForget=!0})}," --- Forget Passwoed---- ")]),_:1},8,["model"])]),e[8]||(e[8]=a("div",{class:"overlay_container"},[a("div",{class:"overlay"},[a("div",{class:"overlay_panel overlay_right_container"},[a("h2",{class:"container-title"},"hello friend!"),a("p",null,"输入您的个人信息,以便使用后台管理系统")])])],-1))])])}}},X=$(R,[["__scopeId","data-v-4bf741f4"]]);export{X as default};

View File

@ -0,0 +1 @@
import{t as c}from"./tableUser-DwKF4gi-.js";import{L as r}from"./index-CP0cWiMx.js";import{f as a,o as t,c as o,n as s}from"./vendor-CRW8T6mY.js";import"./empty-CtTj_a0M.js";const _={__name:"character",setup(u){let e={meta:{desc:"character",resource:"character",resource_url:"/resource/character",methods:{get:!0,post:!0,put:!0,delete:!0}}};return r.getCache("user").character!=="admin"&&(e.meta.methods={}),r.setCache("resource",e),(n,l)=>(t(),a("div",null,[(t(),o(s(c)))]))}};export{_ as default};

View File

@ -0,0 +1 @@
import{t as e}from"./tableUser-D7ZU8dg2.js";import{L as r}from"./index-CYkgYYGI.js";import{f as t,o as a,c as s,n as c}from"./vendor-IqGmXQdF.js";import"./empty-CWW-hwh3.js";const o={__name:"character",setup(o){let m={meta:{desc:"character",resource:"character",resource_url:"/resource/character",methods:{get:!0,post:!0,put:!0,delete:!0}}};return"admin"!==r.getCache("user").character&&(m.meta.methods={}),r.setCache("resource",m),(r,o)=>(a(),t("div",null,[(a(),s(c(e)))]))}};export{o as default};

View File

@ -0,0 +1 @@
import{s as t,_ as r}from"./index-CYkgYYGI.js";import{c as o,o as e,a9 as n}from"./vendor-IqGmXQdF.js";function a(r,o){return t({url:r,method:"get",params:o})}function s(r,o){return t({url:r,method:"post",data:{dto:o}})}function u(r,o){return t({url:r,method:"put",data:{dto:o}})}function d(r,o){return t({url:r,method:"delete",data:o})}function i(r){return t({url:"/project/"+r.toString()+"/items",method:"get"})}const c=r({},[["render",function(t,r){const a=n;return e(),o(a,{description:"没有权限!请联系管理员添加权限!"})}]]);export{d as a,s as b,u as c,i as d,c as e,a as r};

View File

@ -0,0 +1 @@
import{s as r,_ as s}from"./index-CP0cWiMx.js";import{c,o as n,a9 as a}from"./vendor-CRW8T6mY.js";function p(e,t){return r({url:e,method:"get",params:t})}function l(e,t){return r({url:e,method:"post",data:{dto:t}})}function _(e,t){return r({url:e,method:"put",data:{dto:t}})}function f(e,t){return r({url:e,method:"delete",data:t})}function h(e){return r({url:"/project/"+e.toString()+"/items",method:"get"})}const u={};function m(e,t){const o=a;return n(),c(o,{description:"没有权限!请联系管理员添加权限!"})}const g=s(u,[["render",m]]);export{f as a,l as b,_ as c,h as d,g as e,p as r};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
import{t as r}from"./table-DS5C1zSj.js";import{L as e,c}from"./index-CP0cWiMx.js";import{a,f as s,o as t,c as n,n as m}from"./vendor-CRW8T6mY.js";import"./empty-CtTj_a0M.js";import"./string-srpbcqxF.js";const j={__name:"project",setup(u){e.setCache("project",{}),a();let o=c;return e.getCache("user").character!=="admin"&&(o.meta.methods={}),e.setCache("resource",o),(i,l)=>(t(),s("div",null,[(t(),n(m(r)))]))}};export{j as default};

View File

@ -0,0 +1 @@
import{t as e}from"./table-FMBVQptC.js";import{L as t,c as s}from"./index-CYkgYYGI.js";import{a,f as r,o,c as m,n as c}from"./vendor-IqGmXQdF.js";import"./empty-CWW-hwh3.js";import"./string-C8RKaQUb.js";const p={__name:"project",setup(p){t.setCache("project",{}),a();let i=s;return"admin"!==t.getCache("user").character&&(i.meta.methods={}),t.setCache("resource",i),(t,s)=>(o(),r("div",null,[(o(),m(c(e)))]))}};export{p as default};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
import{t}from"./table-FMBVQptC.js";import{c as o,o as s,n as r}from"./vendor-IqGmXQdF.js";import"./empty-CWW-hwh3.js";import"./index-CYkgYYGI.js";import"./string-C8RKaQUb.js";const p={__name:"project_op",setup:p=>(p,a)=>(s(),o(r(t)))};export{p as default};

View File

@ -0,0 +1 @@
import{t as o}from"./table-DS5C1zSj.js";import{c as t,o as e,n as r}from"./vendor-CRW8T6mY.js";import"./empty-CtTj_a0M.js";import"./index-CP0cWiMx.js";import"./string-srpbcqxF.js";const l={__name:"project_op",setup(p){return(a,c)=>(e(),t(r(o)))}};export{l as default};

View File

@ -0,0 +1 @@
function e(e){switch(e){case"eq":return"等于";case"gt":return"大于";case"lt":return"小于";case"ge":return"大于等于";case"le":return"小于等于";case"like":return"包含";case"range":return""}}export{e as g};

View File

@ -0,0 +1 @@
function r(e){switch(e){case"eq":return"等于";case"gt":return"大于";case"lt":return"小于";case"ge":return"大于等于";case"le":return"小于等于";case"like":return"包含";case"range":return""}}export{r as g};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
import{t as o}from"./tableUser-DwKF4gi-.js";import{L as r}from"./index-CP0cWiMx.js";import{f as s,o as t,c,n as a}from"./vendor-CRW8T6mY.js";import"./empty-CtTj_a0M.js";const h={__name:"user",setup(u){let e={meta:{desc:"user",resource:"user",resource_url:"/resource/user",methods:{get:!0,post:!0,put:!0,delete:!0}}};return r.getCache("user").character!=="admin"&&(e.meta.methods={}),r.setCache("resource",e),(n,l)=>(t(),s("div",null,[(t(),c(a(o)))]))}};export{h as default};

View File

@ -0,0 +1 @@
import{t as e}from"./tableUser-D7ZU8dg2.js";import{L as r}from"./index-CYkgYYGI.js";import{f as s,o as t,c as o,n as a}from"./vendor-IqGmXQdF.js";import"./empty-CWW-hwh3.js";const u={__name:"user",setup(u){let m={meta:{desc:"user",resource:"user",resource_url:"/resource/user",methods:{get:!0,post:!0,put:!0,delete:!0}}};return"admin"!==r.getCache("user").character&&(m.meta.methods={}),r.setCache("resource",m),(r,u)=>(t(),s("div",null,[(t(),o(a(e)))]))}};export{u as default};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
import{f as n,o as r,g as s,h as l,p as t,t as p,u as i,a3 as m,F as c}from"./vendor-CRW8T6mY.js";import{L as d}from"./index-CP0cWiMx.js";const f={style:{"font-size":"40px"}},_={style:{color:"darkslategrey","font-size":"50px"}},k={__name:"welcome",setup(u){const o=d.getCache("user");return(x,e)=>{const a=m;return r(),n(c,null,[s("span",f,[e[0]||(e[0]=t("亲爱的")),s("span",_,p(i(o).nick_name),1),e[1]||(e[1]=t("!欢迎使用本公司后台管理系统!"))]),l(a),e[2]||(e[2]=s("span",{style:{"font-size":"40px"}},"硬盘有价,数据无价,操作不规范,亲人两行泪。",-1))],64)}}};export{k as default};

View File

@ -0,0 +1 @@
import{f as s,o as e,g as a,h as t,p as n,t as o,u as r,a3 as p,F as l}from"./vendor-IqGmXQdF.js";import{L as c}from"./index-CYkgYYGI.js";const f={style:{"font-size":"40px"}},i={style:{color:"darkslategrey","font-size":"50px"}},m={__name:"welcome",setup(m){const u=c.getCache("user");return(c,m)=>{const x=p;return e(),s(l,null,[a("span",f,[m[0]||(m[0]=n("亲爱的")),a("span",i,o(r(u).nick_name),1),m[1]||(m[1]=n("!欢迎使用本公司后台管理系统!"))]),t(x),m[2]||(m[2]=a("span",{style:{"font-size":"40px"}},"硬盘有价,数据无价,操作不规范,亲人两行泪。",-1))],64)}}};export{m as default};

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

View File

@ -0,0 +1,67 @@
<svg width="100%" height="100%" id="svg" viewBox="0 0 1440 400" xmlns="http://www.w3.org/2000/svg" class="transition duration-300 ease-in-out delay-150"><style>
.path-0{
animation:pathAnim-0 4s;
animation-timing-function: linear;
animation-iteration-count: infinite;
}
@keyframes pathAnim-0{
0%{
d: path("M 0,400 C 0,400 0,100 0,100 C 50.8103747173373,109.20471951536959 101.6207494346746,118.4094390307392 143,110 C 184.3792505653254,101.5905609692608 216.32737697863888,75.56696339241286 262,74 C 307.6726230213611,72.43303660758714 367.0697426507697,95.32270739960937 415,100 C 462.9302573492303,104.67729260039063 499.3936524182825,91.14220700914969 539,86 C 578.6063475817175,80.85779299085031 621.3556476761007,84.1084645637919 664,85 C 706.6443523238993,85.8915354362081 749.1837568773142,84.42393473568269 789,75 C 828.8162431226858,65.57606526431731 865.9093248146424,48.19579649347729 914,66 C 962.0906751853576,83.80420350652271 1021.1789438641165,136.79287929040817 1067,137 C 1112.8210561358835,137.20712070959183 1145.3748997288917,84.63268634489012 1179,69 C 1212.6251002711083,53.36731365510988 1247.3214572203167,74.67637533003139 1291,86 C 1334.6785427796833,97.32362466996861 1387.3392713898415,98.6618123349843 1440,100 C 1440,100 1440,400 1440,400 Z");
}
25%{
d: path("M 0,400 C 0,400 0,100 0,100 C 38.085950711769925,108.68663884161857 76.17190142353985,117.37327768323715 122,109 C 167.82809857646015,100.62672231676285 221.3983450176105,75.19352810866998 267,81 C 312.6016549823895,86.80647189133002 350.2347185060181,123.85260988208296 390,128 C 429.7652814939819,132.14739011791704 471.66278095831717,103.39603236299823 522,94 C 572.3372190416828,84.60396763700177 631.1141576607127,94.5632606659241 675,109 C 718.8858423392873,123.4367393340759 747.880588398832,142.35092497330533 791,132 C 834.119411601168,121.64907502669469 891.3634887439594,82.03303944085465 931,79 C 970.6365112560406,75.96696055914535 992.6654566253305,109.51691726327608 1035,108 C 1077.3345433746695,106.48308273672392 1139.974684754719,69.89929150604104 1189,66 C 1238.025315245281,62.100708493958955 1273.4358043557945,90.8859167125597 1313,102 C 1352.5641956442055,113.1140832874403 1396.2820978221027,106.55704164372014 1440,100 C 1440,100 1440,400 1440,400 Z");
}
50%{
d: path("M 0,400 C 0,400 0,100 0,100 C 37.01395207173833,109.69011844829022 74.02790414347666,119.38023689658044 118,124 C 161.97209585652334,128.61976310341956 212.90233549783164,128.16917086196852 257,118 C 301.09766450216836,107.83082913803148 338.3627538651966,87.94307965554552 379,89 C 419.6372461348034,90.05692034445448 463.6466490413816,112.05851051584946 506,126 C 548.3533509586184,139.94148948415054 589.0506499692768,145.8228782810566 636,128 C 682.9493500307232,110.1771217189434 736.1507510815113,68.64997635992414 788,67 C 839.8492489184887,65.35002364007586 890.3463457046779,103.57721627924685 928,111 C 965.6536542953221,118.42278372075315 990.4638660997771,95.04115852308847 1038,95 C 1085.536133900223,94.95884147691153 1155.798189896214,118.25814962839925 1199,128 C 1242.201810103786,137.74185037160075 1258.3433743153673,133.9262429633145 1294,127 C 1329.6566256846327,120.0737570366855 1384.8283128423163,110.03687851834275 1440,100 C 1440,100 1440,400 1440,400 Z");
}
75%{
d: path("M 0,400 C 0,400 0,100 0,100 C 45.604500645453754,100.93447183466468 91.20900129090751,101.86894366932935 134,96 C 176.7909987090925,90.13105633067065 216.76849548182372,77.45869715734729 262,80 C 307.2315045181763,82.54130284265271 357.7170167817977,100.29626770128152 403,97 C 448.2829832182023,93.70373229871848 488.3634373909856,69.35623203752661 522,63 C 555.6365626090144,56.64376796247338 582.82923365426,68.27880414861198 634,70 C 685.17076634574,71.72119585138802 760.3196279919748,63.528551368025504 809,76 C 857.6803720080252,88.4714486319745 879.8922543778411,121.606990379286 917,133 C 954.1077456221589,144.393009620714 1006.1113544966613,134.04348711483055 1052,117 C 1097.8886455033387,99.95651288516945 1137.6623276355142,76.21906116139176 1177,73 C 1216.3376723644858,69.78093883860824 1255.2393349612817,87.08026823960235 1299,95 C 1342.7606650387183,102.91973176039765 1391.3803325193592,101.45986588019883 1440,100 C 1440,100 1440,400 1440,400 Z");
}
100%{
d: path("M 0,400 C 0,400 0,100 0,100 C 50.8103747173373,109.20471951536959 101.6207494346746,118.4094390307392 143,110 C 184.3792505653254,101.5905609692608 216.32737697863888,75.56696339241286 262,74 C 307.6726230213611,72.43303660758714 367.0697426507697,95.32270739960937 415,100 C 462.9302573492303,104.67729260039063 499.3936524182825,91.14220700914969 539,86 C 578.6063475817175,80.85779299085031 621.3556476761007,84.1084645637919 664,85 C 706.6443523238993,85.8915354362081 749.1837568773142,84.42393473568269 789,75 C 828.8162431226858,65.57606526431731 865.9093248146424,48.19579649347729 914,66 C 962.0906751853576,83.80420350652271 1021.1789438641165,136.79287929040817 1067,137 C 1112.8210561358835,137.20712070959183 1145.3748997288917,84.63268634489012 1179,69 C 1212.6251002711083,53.36731365510988 1247.3214572203167,74.67637533003139 1291,86 C 1334.6785427796833,97.32362466996861 1387.3392713898415,98.6618123349843 1440,100 C 1440,100 1440,400 1440,400 Z");
}
}</style><defs><linearGradient id="gradient" x1="4%" y1="70%" x2="96%" y2="30%"><stop offset="5%" stop-color="#8ed1fc"></stop><stop offset="95%" stop-color="#32ded4"></stop></linearGradient></defs><path d="M 0,400 C 0,400 0,100 0,100 C 50.8103747173373,109.20471951536959 101.6207494346746,118.4094390307392 143,110 C 184.3792505653254,101.5905609692608 216.32737697863888,75.56696339241286 262,74 C 307.6726230213611,72.43303660758714 367.0697426507697,95.32270739960937 415,100 C 462.9302573492303,104.67729260039063 499.3936524182825,91.14220700914969 539,86 C 578.6063475817175,80.85779299085031 621.3556476761007,84.1084645637919 664,85 C 706.6443523238993,85.8915354362081 749.1837568773142,84.42393473568269 789,75 C 828.8162431226858,65.57606526431731 865.9093248146424,48.19579649347729 914,66 C 962.0906751853576,83.80420350652271 1021.1789438641165,136.79287929040817 1067,137 C 1112.8210561358835,137.20712070959183 1145.3748997288917,84.63268634489012 1179,69 C 1212.6251002711083,53.36731365510988 1247.3214572203167,74.67637533003139 1291,86 C 1334.6785427796833,97.32362466996861 1387.3392713898415,98.6618123349843 1440,100 C 1440,100 1440,400 1440,400 Z" stroke="none" stroke-width="0" fill="url(#gradient)" fill-opacity="0.4" class="transition-all duration-300 ease-in-out delay-150 path-0"></path><style>
.path-1{
animation:pathAnim-1 4s;
animation-timing-function: linear;
animation-iteration-count: infinite;
}
@keyframes pathAnim-1{
0%{
d: path("M 0,400 C 0,400 0,200 0,200 C 33.037747977312605,204.17407595636058 66.07549595462521,208.3481519127212 114,202 C 161.9245040453748,195.6518480872788 224.73576415881178,178.78146830547584 277,172 C 329.2642358411882,165.21853169452416 370.98144741012777,168.5259748653755 407,172 C 443.01855258987223,175.4740251346245 473.3384462006769,179.1146322330221 516,189 C 558.6615537993231,198.8853677669779 613.6647677871649,215.01549620253616 666,207 C 718.3352322128351,198.98450379746384 768.0024826506634,166.8233829568334 801,163 C 833.9975173493366,159.1766170431666 850.3253016101814,183.69097197013028 892,189 C 933.6746983898186,194.30902802986972 1000.6963109086112,180.41272916264552 1056,174 C 1111.3036890913888,167.58727083735448 1154.8894547553741,168.65811137928773 1197,175 C 1239.1105452446259,181.34188862071227 1279.745870069893,192.9548253202035 1320,198 C 1360.254129930107,203.0451746797965 1400.1270649650535,201.52258733989825 1440,200 C 1440,200 1440,400 1440,400 Z");
}
25%{
d: path("M 0,400 C 0,400 0,200 0,200 C 50.144999548448,205.21959416984376 100.289999096896,210.43918833968752 145,205 C 189.710000903104,199.56081166031248 228.98500316086404,183.46284081109366 270,183 C 311.01499683913596,182.53715918890634 353.76998825964773,197.70944841593783 395,201 C 436.23001174035227,204.29055158406217 475.93504380054515,195.699365525155 521,193 C 566.0649561994549,190.300634474845 616.489836538172,193.49308948344222 657,190 C 697.510163461828,186.50691051655778 728.1056100467666,176.32827654107615 778,184 C 827.8943899532334,191.67172345892385 897.0877232747614,217.1938043522531 938,223 C 978.9122767252386,228.8061956477469 991.5434968541877,214.89650604991155 1031,213 C 1070.4565031458123,211.10349395008845 1136.738289308488,221.22017144810076 1183,218 C 1229.261710691512,214.77982855189924 1255.5033459118606,198.2228081576855 1295,193 C 1334.4966540881394,187.7771918423145 1387.2483270440698,193.88859592115725 1440,200 C 1440,200 1440,400 1440,400 Z");
}
50%{
d: path("M 0,400 C 0,400 0,200 0,200 C 36.84512474345648,198.16914961246212 73.69024948691296,196.33829922492424 119,194 C 164.30975051308704,191.66170077507576 218.08412679580465,188.81595271276512 264,200 C 309.91587320419535,211.18404728723488 347.97324332986847,236.39788992401526 385,236 C 422.02675667013153,235.60211007598474 458.02289988472137,209.5924875911737 504,198 C 549.9771001152786,186.4075124088263 605.9351571312458,189.23215971129002 656,203 C 706.0648428687542,216.76784028870998 750.2364715902953,241.47887356366618 794,228 C 837.7635284097047,214.52112643633382 881.1189565075728,162.85234603404527 919,166 C 956.8810434924272,169.14765396595473 989.2877023794135,227.1117423001528 1038,233 C 1086.7122976205865,238.8882576998472 1151.730233974773,192.70068476534348 1196,180 C 1240.269766025227,167.29931523465652 1263.7913617214933,188.0855186384733 1301,197 C 1338.2086382785067,205.9144813615267 1389.1043191392532,202.95724068076333 1440,200 C 1440,200 1440,400 1440,400 Z");
}
75%{
d: path("M 0,400 C 0,400 0,200 0,200 C 52.74494394557294,199.86307526398085 105.48988789114588,199.7261505279617 149,193 C 192.51011210885412,186.2738494720383 226.78539238098944,172.95847315213408 271,185 C 315.21460761901056,197.04152684786592 369.3685425848962,234.43995686350206 413,235 C 456.6314574151038,235.56004313649794 489.7404372794257,199.28169939385782 527,183 C 564.2595627205743,166.71830060614218 605.669708297401,170.43324556106666 646,178 C 686.330291702599,185.56675443893334 725.5807295309703,196.98531836187553 773,211 C 820.4192704690297,225.01468163812447 876.0073735787179,241.62548099143115 926,229 C 975.9926264212821,216.37451900856885 1020.3897761541582,174.51275767239986 1059,173 C 1097.6102238458418,171.48724232760014 1130.4335218046497,210.32348831896928 1170,227 C 1209.5664781953503,243.67651168103072 1255.8761366272429,238.19328905172307 1302,230 C 1348.1238633727571,221.80671094827693 1394.0619316863786,210.90335547413846 1440,200 C 1440,200 1440,400 1440,400 Z");
}
100%{
d: path("M 0,400 C 0,400 0,200 0,200 C 33.037747977312605,204.17407595636058 66.07549595462521,208.3481519127212 114,202 C 161.9245040453748,195.6518480872788 224.73576415881178,178.78146830547584 277,172 C 329.2642358411882,165.21853169452416 370.98144741012777,168.5259748653755 407,172 C 443.01855258987223,175.4740251346245 473.3384462006769,179.1146322330221 516,189 C 558.6615537993231,198.8853677669779 613.6647677871649,215.01549620253616 666,207 C 718.3352322128351,198.98450379746384 768.0024826506634,166.8233829568334 801,163 C 833.9975173493366,159.1766170431666 850.3253016101814,183.69097197013028 892,189 C 933.6746983898186,194.30902802986972 1000.6963109086112,180.41272916264552 1056,174 C 1111.3036890913888,167.58727083735448 1154.8894547553741,168.65811137928773 1197,175 C 1239.1105452446259,181.34188862071227 1279.745870069893,192.9548253202035 1320,198 C 1360.254129930107,203.0451746797965 1400.1270649650535,201.52258733989825 1440,200 C 1440,200 1440,400 1440,400 Z");
}
}</style><defs><linearGradient id="gradient" x1="4%" y1="70%" x2="96%" y2="30%"><stop offset="5%" stop-color="#8ed1fc"></stop><stop offset="95%" stop-color="#32ded4"></stop></linearGradient></defs><path d="M 0,400 C 0,400 0,200 0,200 C 33.037747977312605,204.17407595636058 66.07549595462521,208.3481519127212 114,202 C 161.9245040453748,195.6518480872788 224.73576415881178,178.78146830547584 277,172 C 329.2642358411882,165.21853169452416 370.98144741012777,168.5259748653755 407,172 C 443.01855258987223,175.4740251346245 473.3384462006769,179.1146322330221 516,189 C 558.6615537993231,198.8853677669779 613.6647677871649,215.01549620253616 666,207 C 718.3352322128351,198.98450379746384 768.0024826506634,166.8233829568334 801,163 C 833.9975173493366,159.1766170431666 850.3253016101814,183.69097197013028 892,189 C 933.6746983898186,194.30902802986972 1000.6963109086112,180.41272916264552 1056,174 C 1111.3036890913888,167.58727083735448 1154.8894547553741,168.65811137928773 1197,175 C 1239.1105452446259,181.34188862071227 1279.745870069893,192.9548253202035 1320,198 C 1360.254129930107,203.0451746797965 1400.1270649650535,201.52258733989825 1440,200 C 1440,200 1440,400 1440,400 Z" stroke="none" stroke-width="0" fill="url(#gradient)" fill-opacity="0.53" class="transition-all duration-300 ease-in-out delay-150 path-1"></path><style>
.path-2{
animation:pathAnim-2 4s;
animation-timing-function: linear;
animation-iteration-count: infinite;
}
@keyframes pathAnim-2{
0%{
d: path("M 0,400 C 0,400 0,300 0,300 C 51.227644191181795,301.9763528409705 102.45528838236359,303.952705681941 145,297 C 187.5447116176364,290.047294318059 221.4064906617274,274.16553011320667 262,285 C 302.5935093382726,295.83446988679333 349.91874897072705,333.38517386523216 398,331 C 446.08125102927295,328.61482613476784 494.9185134553645,286.29377442586485 537,283 C 579.0814865446355,279.70622557413515 614.4071972078149,315.4397284313083 656,328 C 697.5928027921851,340.5602715686917 745.452697713376,329.94731184890185 792,315 C 838.547302286624,300.05268815109815 883.782011938681,280.77102417308436 929,279 C 974.217988061319,277.22897582691564 1019.4192545318997,292.9685914587609 1058,289 C 1096.5807454681003,285.0314085412391 1128.5409699337195,261.35460999187205 1174,264 C 1219.4590300662805,266.64539000812795 1278.416865733223,295.61296857375083 1325,306 C 1371.583134266777,316.38703142624917 1405.7915671333885,308.1935157131246 1440,300 C 1440,300 1440,400 1440,400 Z");
}
25%{
d: path("M 0,400 C 0,400 0,300 0,300 C 54.53282428960243,293.6367148971435 109.06564857920486,287.2734297942871 148,277 C 186.93435142079514,266.7265702057129 210.27022997278294,252.54299571999525 247,264 C 283.72977002721706,275.45700428000475 333.8534315296634,312.5545873257319 378,320 C 422.1465684703366,327.4454126742681 460.3160439085634,305.2386549770771 509,294 C 557.6839560914366,282.7613450229229 616.8823928360831,282.4907927659598 664,290 C 711.1176071639169,297.5092072340402 746.1543847471042,312.798173959084 787,319 C 827.8456152528958,325.201826040916 874.5000681754998,322.31651139770406 924,313 C 973.4999318245002,303.68348860229594 1025.8453425508972,287.93578045009997 1062,281 C 1098.1546574491028,274.06421954990003 1118.1185616209123,275.9403668018961 1160,286 C 1201.8814383790877,296.0596331981039 1265.6804109654536,314.3027523423154 1316,318 C 1366.3195890345464,321.6972476576846 1403.1597945172732,310.8486238288423 1440,300 C 1440,300 1440,400 1440,400 Z");
}
50%{
d: path("M 0,400 C 0,400 0,300 0,300 C 32.00253223284501,282.3792505653254 64.00506446569003,264.7585011306508 106,273 C 147.99493553430997,281.2414988693492 199.98227437008495,315.3452460427221 249,317 C 298.01772562991505,318.6547539572779 344.0658380539702,287.8605146984607 386,284 C 427.9341619460298,280.1394853015393 465.75437341403415,303.2126951634353 508,307 C 550.2456265859659,310.7873048365647 596.9166682898929,295.2887046477983 642,297 C 687.0833317101071,298.7112953522017 730.5789534263944,317.6324862453716 784,310 C 837.4210465736056,302.3675137546284 900.7675180045297,268.1813503707154 939,267 C 977.2324819954703,265.8186496292846 990.3509745554868,297.64211227176696 1030,315 C 1069.6490254445132,332.35788772823304 1135.8285837735227,335.2502005422166 1185,320 C 1234.1714162264773,304.7497994577834 1266.334690350422,271.3570855593667 1306,265 C 1345.665309649578,258.6429144406333 1392.832654824789,279.3214572203167 1440,300 C 1440,300 1440,400 1440,400 Z");
}
75%{
d: path("M 0,400 C 0,400 0,300 0,300 C 54.93754592992266,285.7678031020738 109.87509185984533,271.53560620414754 149,274 C 188.12490814015467,276.46439379585246 211.43717849054133,295.6253782854836 252,301 C 292.5628215094587,306.3746217145164 350.3761941779894,297.96288065391815 393,306 C 435.6238058220106,314.03711934608185 463.058044797501,338.52309909884383 502,336 C 540.941955202499,333.47690090115617 591.3916266320064,303.9447229507065 636,295 C 680.6083733679936,286.0552770492935 719.3754486744734,297.69800909833026 766,307 C 812.6245513255266,316.30199090166974 867.1065786700998,323.26324065597225 921,309 C 974.8934213299002,294.73675934402775 1028.1982366451277,259.24902827778067 1071,267 C 1113.8017633548723,274.75097172221933 1146.1004747493887,325.74064623290525 1185,328 C 1223.8995252506113,330.25935376709475 1269.3998643573175,283.7883867905985 1313,271 C 1356.6001356426825,258.2116132094015 1398.3000678213411,279.1058066047008 1440,300 C 1440,300 1440,400 1440,400 Z");
}
100%{
d: path("M 0,400 C 0,400 0,300 0,300 C 51.227644191181795,301.9763528409705 102.45528838236359,303.952705681941 145,297 C 187.5447116176364,290.047294318059 221.4064906617274,274.16553011320667 262,285 C 302.5935093382726,295.83446988679333 349.91874897072705,333.38517386523216 398,331 C 446.08125102927295,328.61482613476784 494.9185134553645,286.29377442586485 537,283 C 579.0814865446355,279.70622557413515 614.4071972078149,315.4397284313083 656,328 C 697.5928027921851,340.5602715686917 745.452697713376,329.94731184890185 792,315 C 838.547302286624,300.05268815109815 883.782011938681,280.77102417308436 929,279 C 974.217988061319,277.22897582691564 1019.4192545318997,292.9685914587609 1058,289 C 1096.5807454681003,285.0314085412391 1128.5409699337195,261.35460999187205 1174,264 C 1219.4590300662805,266.64539000812795 1278.416865733223,295.61296857375083 1325,306 C 1371.583134266777,316.38703142624917 1405.7915671333885,308.1935157131246 1440,300 C 1440,300 1440,400 1440,400 Z");
}
}</style><defs><linearGradient id="gradient" x1="4%" y1="70%" x2="96%" y2="30%"><stop offset="5%" stop-color="#8ed1fc"></stop><stop offset="95%" stop-color="#32ded4"></stop></linearGradient></defs><path d="M 0,400 C 0,400 0,300 0,300 C 51.227644191181795,301.9763528409705 102.45528838236359,303.952705681941 145,297 C 187.5447116176364,290.047294318059 221.4064906617274,274.16553011320667 262,285 C 302.5935093382726,295.83446988679333 349.91874897072705,333.38517386523216 398,331 C 446.08125102927295,328.61482613476784 494.9185134553645,286.29377442586485 537,283 C 579.0814865446355,279.70622557413515 614.4071972078149,315.4397284313083 656,328 C 697.5928027921851,340.5602715686917 745.452697713376,329.94731184890185 792,315 C 838.547302286624,300.05268815109815 883.782011938681,280.77102417308436 929,279 C 974.217988061319,277.22897582691564 1019.4192545318997,292.9685914587609 1058,289 C 1096.5807454681003,285.0314085412391 1128.5409699337195,261.35460999187205 1174,264 C 1219.4590300662805,266.64539000812795 1278.416865733223,295.61296857375083 1325,306 C 1371.583134266777,316.38703142624917 1405.7915671333885,308.1935157131246 1440,300 C 1440,300 1440,400 1440,400 Z" stroke="none" stroke-width="0" fill="url(#gradient)" fill-opacity="1" class="transition-all duration-300 ease-in-out delay-150 path-2"></path></svg>

After

Width:  |  Height:  |  Size: 20 KiB

96
admin/ui/template.go Normal file
View File

@ -0,0 +1,96 @@
package ui
import (
"embed"
"github.com/gin-gonic/gin"
"io/fs"
"net/http"
"os"
"path"
"strings"
)
//go:embed static
var UI embed.FS
const INDEX = "index.html"
type ServeFileSystem interface {
http.FileSystem
Exists(prefix string, path string) bool
}
type localFileSystem struct {
http.FileSystem
root string
indexes bool
}
func LocalFile(root string, indexes bool) *localFileSystem {
return &localFileSystem{
FileSystem: gin.Dir(root, indexes),
root: root,
indexes: indexes,
}
}
func (l *localFileSystem) Exists(prefix string, filepath string) bool {
if p := strings.TrimPrefix(filepath, prefix); len(p) < len(filepath) {
name := path.Join(l.root, p)
stats, err := os.Stat(name)
if err != nil {
return false
}
if stats.IsDir() {
if !l.indexes {
index := path.Join(name, INDEX)
_, err := os.Stat(index)
if err != nil {
return false
}
}
}
return true
}
return false
}
func ServeRoot(urlPrefix, root string) gin.HandlerFunc {
return Serve(urlPrefix, LocalFile(root, false))
}
// Static returns a middleware handler that serves static files in the given directory.
func Serve(urlPrefix string, fs ServeFileSystem) gin.HandlerFunc {
fileserver := http.FileServer(fs)
if urlPrefix != "" {
fileserver = http.StripPrefix(urlPrefix, fileserver)
}
return func(c *gin.Context) {
if fs.Exists(urlPrefix, c.Request.URL.Path) {
fileserver.ServeHTTP(c.Writer, c.Request)
c.Abort()
}
}
}
type embedFileSystem struct {
http.FileSystem
}
func (e embedFileSystem) Exists(prefix string, path string) bool {
_, err := e.Open(path)
if err != nil {
return false
}
return true
}
func EmbedFolder(fsEmbed embed.FS, targetPath string) ServeFileSystem {
fsys, err := fs.Sub(fsEmbed, targetPath)
if err != nil {
panic(err)
}
return embedFileSystem{
FileSystem: http.FS(fsys),
}
}

View File

@ -1,2 +1,3 @@
VITE_APP_ENV = 'development'
VITE_APP_BASE_API = '/api'
VITE_APP_BASE_URL = 'http://192.168.78.128:8080/api'

2
ui/.env.production Normal file
View File

@ -0,0 +1,2 @@
VITE_APP_BASE_API = '/api'
VITE_APP_ENV = 'production'

66
ui/package-lock.json generated
View File

@ -20,6 +20,7 @@
"sass": "^1.87.0",
"sass-embedded": "^1.87.0",
"sass-loader": "^16.0.5",
"terser": "^5.39.0",
"unplugin-auto-import": "^19.1.2",
"unplugin-icons": "^22.1.0",
"unplugin-vue-components": "^28.5.0",
@ -1067,6 +1068,17 @@
"node": ">=6.0.0"
}
},
"node_modules/@jridgewell/source-map": {
"version": "0.3.6",
"resolved": "https://registry.npmmirror.com/@jridgewell/source-map/-/source-map-0.3.6.tgz",
"integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"@jridgewell/gen-mapping": "^0.3.5",
"@jridgewell/trace-mapping": "^0.3.25"
}
},
"node_modules/@jridgewell/sourcemap-codec": {
"version": "1.5.0",
"resolved": "https://registry.npmmirror.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz",
@ -2303,6 +2315,13 @@
"dev": true,
"license": "MIT/X11"
},
"node_modules/buffer-from": {
"version": "1.1.2",
"resolved": "https://registry.npmmirror.com/buffer-from/-/buffer-from-1.1.2.tgz",
"integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",
"dev": true,
"license": "MIT"
},
"node_modules/bundle-name": {
"version": "4.1.0",
"resolved": "https://registry.npmmirror.com/bundle-name/-/bundle-name-4.1.0.tgz",
@ -2462,6 +2481,13 @@
"node": ">= 0.8"
}
},
"node_modules/commander": {
"version": "2.20.3",
"resolved": "https://registry.npmmirror.com/commander/-/commander-2.20.3.tgz",
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
"dev": true,
"license": "MIT"
},
"node_modules/confbox": {
"version": "0.2.2",
"resolved": "https://registry.npmmirror.com/confbox/-/confbox-0.2.2.tgz",
@ -4701,6 +4727,16 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true,
"license": "BSD-3-Clause",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/source-map-js": {
"version": "1.2.1",
"resolved": "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.2.1.tgz",
@ -4710,6 +4746,17 @@
"node": ">=0.10.0"
}
},
"node_modules/source-map-support": {
"version": "0.5.21",
"resolved": "https://registry.npmmirror.com/source-map-support/-/source-map-support-0.5.21.tgz",
"integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==",
"dev": true,
"license": "MIT",
"dependencies": {
"buffer-from": "^1.0.0",
"source-map": "^0.6.0"
}
},
"node_modules/speakingurl": {
"version": "14.0.1",
"resolved": "https://registry.npmmirror.com/speakingurl/-/speakingurl-14.0.1.tgz",
@ -4807,6 +4854,25 @@
"node": ">=16.0.0"
}
},
"node_modules/terser": {
"version": "5.39.0",
"resolved": "https://registry.npmmirror.com/terser/-/terser-5.39.0.tgz",
"integrity": "sha512-LBAhFyLho16harJoWMg/nZsQYgTrg5jXOn2nCYjRUcZZEdE3qa2zb8QEDRUGVZBW4rlazf2fxkg8tztybTaqWw==",
"dev": true,
"license": "BSD-2-Clause",
"dependencies": {
"@jridgewell/source-map": "^0.3.3",
"acorn": "^8.8.2",
"commander": "^2.20.0",
"source-map-support": "~0.5.20"
},
"bin": {
"terser": "bin/terser"
},
"engines": {
"node": ">=10"
}
},
"node_modules/tinyexec": {
"version": "0.3.2",
"resolved": "https://registry.npmmirror.com/tinyexec/-/tinyexec-0.3.2.tgz",

View File

@ -21,6 +21,7 @@
"sass": "^1.87.0",
"sass-embedded": "^1.87.0",
"sass-loader": "^16.0.5",
"terser": "^5.39.0",
"unplugin-auto-import": "^19.1.2",
"unplugin-icons": "^22.1.0",
"unplugin-vue-components": "^28.5.0",

View File

@ -7,6 +7,7 @@
- [x] 表格各种项目支持分页(难点是账户、角色、订单这种来自各个游戏区服数据如何分)
- [x] 执行历史记录
- [x] 奖励码接入
- [ ] 前端打包部署
* 中优先级
@ -16,11 +17,11 @@
* 低优先级
- [ ] 执行历史查看和条件检索
- [ ] 用户执行历史查看和条件检索
- [ ] 分页总条数数据、远程获取的区服信息、道具列表等加入缓存,避免每次获取都拉取影响性能
- [ ] 表格定制化按钮-实现定制化单选、多选数据行发送到服务器,比如服务器列表支持单个服务器维护、一键维护
- [ ] 表格定制化按钮-实现带参数页面跳转,比如角色页面快速封禁
- [ ] 表格字段排序
- [ ] 表格字段排序(先按创建时间最近排前面了,后边有需求再说)
- [ ] 公告发送游戏
- [ ] 订单列表从游戏服拉取可以查看
- [ ] 优化header右上角昵称部分显示

View File

@ -16,6 +16,7 @@ export default defineConfig(({mode, command}) => {
const env = loadEnv(mode, process.cwd())
const {VITE_APP_ENV, VITE_APP_BASE_URL, VITE_APP_BASE_URL_WS} = env
return {
base: VITE_APP_ENV === 'production' ? '/' : '/',
plugins: [
vue(),
vueDevTools(),
@ -93,8 +94,31 @@ export default defineConfig(({mode, command}) => {
}
]
}
},
build: {
outDir: '../admin/ui/static',
assetsDir: '../admin/ui/assets',
// 代码分割配置
rollupOptions: {
output: {
manualChunks(id) {
if (id.includes('node_modules')) {
return 'vendor'
}
},
chunkFileNames: 'static/js/[name]-[hash].js',
entryFileNames: 'static/js/[name]-[hash].js',
assetFileNames: 'static/[ext]/[name]-[hash].[ext]'
}
},
minify: "terser",
terserOptions: {
compress: {
//生产环境时移除console
drop_console: true,
drop_debugger: true,
},
},
}
,
}
})