remove unused

This commit is contained in:
AceDataCloud committed 2023-04-07 13:05:35 +08:00
1 parent 301dab1ca5
commit ea1c3413a5
88 files changed
+29 -5766

No files matched your search

+4 -4
View File
@@ -1,7 +1,7 @@
<script lang="ts">
import { defineComponent } from 'vue';
import { getCookie, removeCookie } from 'typescript-cookie';
import { getAuthBaseUrl, getDataBaseUrl } from '@/utils';
import { getCookie } from 'typescript-cookie';
import { getAuthBaseUrl, getChatBaseUrl } from '@/utils';
import { removeCookies } from '@/utils/cookie';
interface IData {
@@ -37,10 +37,10 @@ export default defineComponent({
}
} else {
console.debug('access token and refresh token not found, try to re-auth again');
const dataBaseUrl = getDataBaseUrl();
const chatBaseUrl = getChatBaseUrl();
const authBaseUrl = getAuthBaseUrl();
// callback url used to init access token and then redirect back of `redirect`
const callbackUrl = `${dataBaseUrl}/auth/callback?redirect=${this.redirect}`;
const callbackUrl = `${chatBaseUrl}/auth/callback?redirect=${this.redirect}`;
// redirect to auth service to get access token then redirect back
const targetUrl = `${authBaseUrl}/auth/login?redirect=${callbackUrl}`;
window.location.href = targetUrl;
+3 -3
View File
@@ -1,5 +1,5 @@
<script lang="ts">
import { getAuthBaseUrl, getDataBaseUrl } from '@/utils';
import { getAuthBaseUrl, getChatBaseUrl } from '@/utils';
import { defineComponent } from 'vue';
interface IData {
@@ -14,10 +14,10 @@ export default defineComponent({
};
},
async mounted() {
const dataBaseUrl = getDataBaseUrl();
const chatBaseUrl = getChatBaseUrl();
const authBaseUrl = getAuthBaseUrl();
// callback url used to init access token and then redirect back of `redirect`
const callbackUrl = `${dataBaseUrl}/auth/callback?redirect=${this.redirect}`;
const callbackUrl = `${chatBaseUrl}/auth/callback?redirect=${this.redirect}`;
// redirect to auth service to get access token then redirect back
const targetUrl = `${authBaseUrl}/auth/login?redirect=${callbackUrl}`;
window.location.href = targetUrl;