Skip to content

Commit

Permalink
Fix: get oauth2 list
Browse files Browse the repository at this point in the history
  • Loading branch information
LazyCreeper committed Dec 12, 2023
1 parent 8ac4760 commit e8f534d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/services/apis/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const logOutApi = useDefineApi<{ headers: { Authorization: string } }, an
});

// 获取可用的oauth2平台
export const OAuth2Platforms = useDefineApi<any, { enabled: string[] }>({
export const OAuth2Platforms = useDefineApi<any, { enabled: string[] | null }>({
url: "/oauth2/enabled",
method: "GET"
});
Expand Down
2 changes: 1 addition & 1 deletion src/views/auth/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ onMounted(async () => {
<button class="btn m-[10px]" @click="login">登录</button>
</form>
<br />
<div class="sm:w-96 w-full m-auto">
<div v-if="OAuth2Platforms_?.enabled" class="sm:w-96 w-full m-auto">
<h4 class="text-[18px] font-bold">使用第三方平台登录</h4>
<button
v-for="item in OAuth2Platforms_?.enabled"
Expand Down

0 comments on commit e8f534d

Please sign in to comment.