Compare commits
2 Commits
14c4ede80e
...
d68e4fef0b
Author | SHA1 | Date |
---|---|---|
qinqing | d68e4fef0b | |
qinqing | 944d94a202 |
|
@ -253,10 +253,11 @@ const getAllSubject = async () => {
|
|||
}
|
||||
})
|
||||
bookList.value = dataList
|
||||
const { id, rootid } = sessionStore.get('subject.curNode')
|
||||
if(id && rootid){
|
||||
const idx = dataList.findIndex(item => item.id === id && item.rootid === rootid)
|
||||
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)
|
||||
if(idx > -1){
|
||||
bookInfo.value = {...dataList[idx]}
|
||||
filePath += dataList[idx].fileurl.replace('.txt','.pdf')
|
||||
|
@ -265,9 +266,10 @@ 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
|
||||
|
|
Loading…
Reference in New Issue