From bc360d868e256ce989a6b7e180e2d16823d11cd9 Mon Sep 17 00:00:00 2001
From: yuetsh <517252939@qq.com>
Date: Mon, 3 Mar 2025 09:21:50 +0800
Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E7=BA=BF=E7=99=BB=E5=BD=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/App.vue | 4 ++--
src/api.ts | 2 +-
src/components/Editors.vue | 8 +++++---
src/components/Login.vue | 10 +++++++---
4 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/src/App.vue b/src/App.vue
index d1c9c4e..2a6fb2d 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -23,8 +23,8 @@ whenever(ctrl_s, () => {})
whenever(ctrl_r, () => {})
onMounted(async () => {
- // const data = await getMyProfile()
- // username.value = data
+ const data = await getMyProfile()
+ username.value = data
})
watch(authed, (v) => {
diff --git a/src/api.ts b/src/api.ts
index 9db7ab6..517e029 100644
--- a/src/api.ts
+++ b/src/api.ts
@@ -2,7 +2,7 @@ import axios from "axios"
import { router } from "./router"
const http = axios.create({
- baseURL: "http://localhost:8000/api",
+ baseURL: "https://webapi.xuyue.cc/api",
xsrfCookieName: "xsrfCookieName",
xsrfHeaderName: "X-CSRFTOKEN",
withCredentials: true,
diff --git a/src/components/Editors.vue b/src/components/Editors.vue
index ae916cb..6e8c964 100644
--- a/src/components/Editors.vue
+++ b/src/components/Editors.vue
@@ -68,9 +68,11 @@
-
+ {{ username }}
+
+ 登录
+
+ 退出
diff --git a/src/components/Login.vue b/src/components/Login.vue
index 1d0f2ba..0cfa74a 100644
--- a/src/components/Login.vue
+++ b/src/components/Login.vue
@@ -7,10 +7,14 @@
>
-
+
-
+
- 登录
+ 登录