update url

This commit is contained in:
2023-12-14 12:56:28 +08:00
parent 4ab1f6da4f
commit 82a0e72122
39 changed files with 299 additions and 350 deletions

View File

@@ -85,7 +85,6 @@ async function SendQuestion() {
})
.catch((err) => {
message.error('发送失败')
console.error(err)
})
.finally(() => {
isSending.value = false
@@ -112,7 +111,7 @@ function OnFileListChange(files: UploadFileInfo[]) {
}
function getPublicQuestions() {
isGetting.value = true
QueryGetAPI<QAInfo[]>(QUESTION_API_URL + 'get-public', {
QueryGetAPI<QAInfo[]>(QUESTION_API_URL() + 'get-public', {
id: userInfo?.id,
})
.then((data) => {
@@ -124,7 +123,6 @@ function getPublicQuestions() {
})
.catch((err) => {
message.error('获取公开提问失败')
console.error(err)
})
.finally(() => {
isGetting.value = false

View File

@@ -30,7 +30,7 @@ const errMessage = ref('')
async function get() {
isLoading.value = true
await QueryGetAPI<ScheduleWeekInfo[]>(SCHEDULE_API_URL + 'get', {
await QueryGetAPI<ScheduleWeekInfo[]>(SCHEDULE_API_URL() + 'get', {
id: props.userInfo?.id,
})
.then((data) => {
@@ -42,7 +42,6 @@ async function get() {
}
})
.catch((err) => {
console.error(err)
message.error('加载失败')
})
.finally(() => {

View File

@@ -45,20 +45,18 @@ const settings = ref<Setting_SongRequest>({} as Setting_SongRequest)
async function getSongRequestInfo() {
try {
const data = await QueryGetAPI<{ songs: SongRequestInfo[]; setting: Setting_SongRequest }>(SONG_REQUEST_API_URL + 'get-active-and-settings', {
const data = await QueryGetAPI<{ songs: SongRequestInfo[]; setting: Setting_SongRequest }>(SONG_REQUEST_API_URL() + 'get-active-and-settings', {
id: props.userInfo?.id,
})
if (data.code == 200) {
return data.data
}
} catch (err) {
console.error(err)
}
} catch (err) {}
return {} as { songs: SongRequestInfo[]; setting: Setting_SongRequest }
}
async function getSongs() {
isLoading.value = true
await QueryGetAPI<SongsInfo[]>(SONG_API_URL + 'get', {
await QueryGetAPI<SongsInfo[]>(SONG_API_URL() + 'get', {
id: props.userInfo?.id,
})
.then((data) => {
@@ -70,7 +68,6 @@ async function getSongs() {
}
})
.catch((err) => {
console.error(err)
message.error('加载失败')
})
.finally(() => {
@@ -88,7 +85,7 @@ async function requestSong(song: SongsInfo) {
} else {
if (props.userInfo) {
try {
const data = await QueryPostAPIWithParams(SONG_REQUEST_API_URL + 'add-from-web', {
const data = await QueryPostAPIWithParams(SONG_REQUEST_API_URL() + 'add-from-web', {
target: props.userInfo?.id,
song: song.key,
})
@@ -117,7 +114,6 @@ onMounted(async () => {
}
}, 1000)
} catch (err) {
console.error(err)
message.error('加载失败')
}
} else {