From bf6155b1bdb93fd8c9d9f182e196ce6c28f313b2 Mon Sep 17 00:00:00 2001 From: Xwen <929716663@qq.com> Date: Tue, 9 Jan 2024 20:46:55 +0800 Subject: [PATCH 1/9] =?UTF-8?q?feat:=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Yi.Bbs.Vue3/src/views/Auth/index.vue | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/Yi.Bbs.Vue3/src/views/Auth/index.vue b/Yi.Bbs.Vue3/src/views/Auth/index.vue index 77923230..b2fd5939 100644 --- a/Yi.Bbs.Vue3/src/views/Auth/index.vue +++ b/Yi.Bbs.Vue3/src/views/Auth/index.vue @@ -13,6 +13,7 @@ const code = ref(route.query.code); const type = ref(route.query.state); const message = ref(""); +const scheme = ref(""); watch( () => code.value, async (val) => { @@ -20,12 +21,21 @@ watch( // 使用正则表达式提取路由参数 const regex = /\/auth\/([\w-]+)[?]?/; const result = regex.exec(route.fullPath); - const authParam = result != null ? result[1].toUpperCase() : null; - console.log(type.value, "类型"); + const authParam = result != null ? result[1] : null; + switch (authParam) { + case "gitee": + scheme.value = "Gitee"; + break; + case "qq": + scheme.value = "QQ"; + break; + } if (type.value === "0") { - const res = await authOtherLogin({ code: val }, authParam); + const res = await authOtherLogin({ code: val }, scheme.value); + console.log(res, "登录的"); } else if (type.value === "1") { - const res = await authOtherBind({ code: val }, authParam); + const res = await authOtherBind({ code: val }, scheme.value); + console.log(res, "绑定的"); } message.value = "授权成功"; // window.close(); From 9d826c7063428aa331640f5d9fe6a46fb900d10f Mon Sep 17 00:00:00 2001 From: Xwen <929716663@qq.com> Date: Tue, 9 Jan 2024 21:46:09 +0800 Subject: [PATCH 2/9] =?UTF-8?q?perf:=E4=BC=98=E5=8C=96=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E4=BA=A4=E4=BA=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Yi.Bbs.Vue3/src/views/home/Index.vue | 2 +- .../src/views/home/components/RecommendFriend/index.vue | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Yi.Bbs.Vue3/src/views/home/Index.vue b/Yi.Bbs.Vue3/src/views/home/Index.vue index b938fff7..3bea4a12 100644 --- a/Yi.Bbs.Vue3/src/views/home/Index.vue +++ b/Yi.Bbs.Vue3/src/views/home/Index.vue @@ -215,7 +215,7 @@ const isPointFinished = ref(false); const friendList = ref([]); const isFriendFinished = ref(false); const themeList = ref([]); -const isThemeFinished = ref([]); +const isThemeFinished = ref(false); const allDiscussList = ref([]); const isAllDiscussFinished = ref(false); const userAnalyseInfo = ref({}); diff --git a/Yi.Bbs.Vue3/src/views/home/components/RecommendFriend/index.vue b/Yi.Bbs.Vue3/src/views/home/components/RecommendFriend/index.vue index 8abe08d5..706a01f8 100644 --- a/Yi.Bbs.Vue3/src/views/home/components/RecommendFriend/index.vue +++ b/Yi.Bbs.Vue3/src/views/home/components/RecommendFriend/index.vue @@ -1,7 +1,7 @@