lyc-dev #125

Merged
lyc merged 6 commits from lyc-dev into main 2024-08-13 16:23:05 +08:00
2 changed files with 13 additions and 28 deletions
Showing only changes of commit bc5a6e961d - Show all commits

View File

@ -126,12 +126,8 @@ async function createLinkWin(data) {
let cookieDetails = { ...data.cookieData }
await linkWin[data.key].webContents.session.cookies
.set(cookieDetails)
.then(() => {
console.log('Cookie is successful')
})
.catch((error) => {
console.error('Cookie is error', error)
})
.then(() => {})
.catch((error) => {})
data.fullPath = data.fullPath.replaceAll('//', '/')
linkWin[data.key].loadURL(data.fullPath)

View File

@ -192,7 +192,6 @@ export default {
//
userStore: '',
entpcourseid: '',
timerId: null,
//
setDialog: false,
row: ''
@ -205,13 +204,7 @@ export default {
)
}
},
watch: {
$route(to) {
if (to.path != '/prepare' && this.timerId) {
clearInterval(this.timerId)
}
}
},
created() {
this.userStore = useUserStore().user
ipcRenderer.removeAllListeners('copy-file-default-reply')
@ -229,6 +222,13 @@ export default {
setTimeout(this.initReserv, 500)
}
)
// electron
const curWin = Remote.getCurrentWindow()
curWin.on('focus', ()=>{
this.initHomeWork()
})
},
// activated() {
// if (this.uploadData.textbookId !== null) {
@ -423,9 +423,7 @@ export default {
await this.asyncAllFile()
},
async initHomeWork() {
if (this.timerId) {
clearInterval(this.timerId)
}
if (this.uploadData.levelSecondId) {
// ID
let { rows } = await this.getChapterId()
@ -468,10 +466,7 @@ export default {
},
//
handleOutLink(key) {
if (key == 'homeWork') {
//
this.createTimer()
}
// key linkConfig.js
let configObj = outLink()[key]
//
@ -483,19 +478,13 @@ export default {
},
// ID ID
getChapterId() {
console.log(this.userStore, 'this.userStore')
return listEntpcourse({
evalid: this.uploadData.levelSecondId,
edituserid: this.userStore.userId,
pageSize: 500
})
},
//
createTimer() {
this.timerId = setInterval(() => {
this.getHomeWorkList()
}, 2500)
},
//
getHomeWorkList() {
homeworklist({