mirror of
https://github.com/wushuo894/ani-rss.git
synced 2026-03-15 01:20:23 +00:00
refactor: 优化bgm授权
This commit is contained in:
@@ -139,7 +139,7 @@
|
||||
},
|
||||
load(code, authorization) {
|
||||
this.loading = true
|
||||
fetch(`/api/bgm/oauth/callback?code=${code}&s=${authorization}`)
|
||||
fetch(`api/bgm/oauth/callback?code=${code}&s=${authorization}`)
|
||||
.then(res => res.json())
|
||||
.then(async res => {
|
||||
let {code, message} = res
|
||||
@@ -100,13 +100,18 @@
|
||||
import {ElText} from "element-plus";
|
||||
import api from "@/js/api.js";
|
||||
import BangumiMe from "@/config/basic/BangumiMe.vue";
|
||||
import {onMounted} from "vue";
|
||||
|
||||
let bangumiMe = ref()
|
||||
|
||||
let props = defineProps(['config'])
|
||||
|
||||
let setRedirectUri = () => {
|
||||
props.config['bgmRedirectUri'] = `${location.href}bgm/oauth/callback.html`
|
||||
let redirectUri = location.href
|
||||
if (!redirectUri.endsWith("/")) {
|
||||
redirectUri += '/';
|
||||
}
|
||||
props.config['bgmRedirectUri'] = redirectUri + 'BgmOauthCallback.html'
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
Reference in New Issue
Block a user