Compare commits

..

No commits in common. "d68e4fef0bafbd0a92e632566f9f61fce0cf637b" and "14c4ede80eb36953eab6b2583776b0d5f782198f" have entirely different histories.

1 changed files with 6 additions and 8 deletions

View File

@ -253,11 +253,10 @@ const getAllSubject = async () => {
}
})
bookList.value = dataList
const session = sessionStore.get('subject.curNode')
console.log('session',session);
let filePath = import.meta.env.VITE_APP_RES_FILE_PATH;
if(session.rootid){
const idx = dataList.findIndex(item => item.id === session.rootid)
const { id, rootid } = sessionStore.get('subject.curNode')
if(id && rootid){
const idx = dataList.findIndex(item => item.id === id && item.rootid === rootid)
let filePath = import.meta.env.VITE_APP_RES_FILE_PATH;
if(idx > -1){
bookInfo.value = {...dataList[idx]}
filePath += dataList[idx].fileurl.replace('.txt','.pdf')
@ -266,10 +265,9 @@ const getAllSubject = async () => {
filePath += dataList[0].fileurl.replace('.txt','.pdf')
}
await loadPdfAnimation(filePath)
}else{
bookInfo.value = {...dataList[0]}
filePath += dataList[0].fileurl.replace('.txt','.pdf')
}
}
const bookChange = async (item, idx) => {
booksel.value = idx