作业布置

This commit is contained in:
lyc 2024-08-13 16:14:41 +08:00
parent 2b5acf272d
commit bc5a6e961d
2 changed files with 13 additions and 28 deletions

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({