fix: solve the token error

fix: remove useless defineProps
fix: add the missing dependencies to package.json
fix: add ES2022 into tsconfig.json
This commit is contained in:
huankong233
2024-12-10 09:44:38 +08:00
parent 3c872df97a
commit 16881f057a
12 changed files with 46 additions and 35 deletions

View File

@@ -1,3 +1,5 @@
import { request } from '@/utils/request.js';
import { EventSourcePolyfill } from 'event-source-polyfill';
type LogListItem = string;
type LogListData = LogListItem[];
@@ -13,7 +15,7 @@ export class LogManager {
}
public async GetLogList(): Promise<LogListData> {
try {
const ConfigResponse = await fetch(`${this.apiPrefix}/Log/GetLogList`, {
const ConfigResponse = await request(`${this.apiPrefix}/Log/GetLogList`, {
method: 'GET',
headers: {
Authorization: 'Bearer ' + this.retCredential,
@@ -33,7 +35,7 @@ export class LogManager {
}
public async GetLog(FileName: string): Promise<string> {
try {
const ConfigResponse = await fetch(`${this.apiPrefix}/Log/GetLog?id=${FileName}`, {
const ConfigResponse = await request(`${this.apiPrefix}/Log/GetLog?id=${FileName}`, {
method: 'GET',
headers: {
Authorization: 'Bearer ' + this.retCredential,