Решение проблемы скачивания файлов в режиме "Удаленная библиотека"

(запрашивался не тот файл из-за несовпадения bookId)
This commit is contained in:
Book Pauk
2022-11-13 01:59:42 +07:00
parent 4d3661b758
commit 2db2b8cff4
8 changed files with 43 additions and 26 deletions

View File

@@ -231,12 +231,12 @@ class Api {
return await this.request({action: 'get-genre-tree'});
}
async getBookLink(bookId) {
return await this.request({action: 'get-book-link', bookId}, 120);
async getBookLink(bookUid) {
return await this.request({action: 'get-book-link', bookUid}, 120);
}
async getBookInfo(bookId) {
return await this.request({action: 'get-book-info', bookId}, 120);
async getBookInfo(bookUid) {
return await this.request({action: 'get-book-info', bookUid}, 120);
}
async getConfig() {

View File

@@ -130,7 +130,7 @@ export default class BaseList {
try {
//подготовка
const response = await this.api.getBookLink(book.id);
const response = await this.api.getBookLink(book._uid);
const link = response.link;
const href = `${window.location.origin}${link}`;
@@ -164,7 +164,7 @@ export default class BaseList {
}
} else if (action == 'bookInfo') {
//информация о книге
const response = await this.api.getBookInfo(book.id);
const response = await this.api.getBookInfo(book._uid);
this.$emit('listEvent', {action: 'bookInfo', data: response.bookInfo});
}
} catch(e) {