diff --git a/module/server/koa/index.js b/module/server/koa/index.js index 7910ce0..c15501d 100644 --- a/module/server/koa/index.js +++ b/module/server/koa/index.js @@ -5,6 +5,7 @@ import koaStatic from 'koa-static'; import registry from "./registry.js"; import * as log4js from "../log4js.js"; import auth from "./auth.js"; +import login from "./login.js"; const app = new Koa(); const router = new Router(); @@ -22,6 +23,7 @@ app.proxy = true; app.use(auth) app.use(router.routes()); app.use(registry) +app.use(login) app.use(router.allowedMethods()); app.use(koaStatic('/www')) diff --git a/module/web/src/views/login.vue b/module/web/src/views/login.vue index bc7260f..efd38af 100644 --- a/module/web/src/views/login.vue +++ b/module/web/src/views/login.vue @@ -9,10 +9,11 @@ const servers = ref([]) const account = ref('') const password = ref('') const agree = ref(false) +const srvId = ref('') async function handleLogin() { if (!agree.value) return ElMessage.error('请勾选同意用户协议') - const {data} = await request.post('/api/server/list', { + const {data} = await request.post('/api/login', { username: account, password }) @@ -43,10 +44,10 @@ onMounted(() => { 神临苍月 - +
我已阅读并同意 用户协议及隐私协议