整理

上级 57cce4a8
......@@ -223,11 +223,12 @@ export default {
this.getAllQuestionType()
},
mounted() {
// 在页面加载时从localStorage中获取currentPage的值
const storedPage = localStorage.getItem('algorithmLastPage')
if (storedPage) {
this.currentPage = parseInt(storedPage)
}
this.currentPage = 1
// // 在页面加载时从localStorage中获取currentPage的值
// const storedPage = localStorage.getItem('algorithmLastPage')
// if (storedPage) {
// this.currentPage = parseInt(storedPage)
// }
},
methods: {
prepareAdd() {
......@@ -296,6 +297,7 @@ export default {
leetcodeLink: this.form.leetcodeLink,
})
if (res.code === 200) {
this.currentPage = 1
this.form.questionName = ''
this.form.questionType = 0
this.form.degreeOfImportance = 5
......
......@@ -144,11 +144,12 @@ export default {
this.interviewPage()
},
mounted() {
// 在页面加载时从localStorage中获取currentPage的值
const storedPage = localStorage.getItem('poetryLastPage')
if (storedPage) {
this.currentPage = parseInt(storedPage)
}
this.currentPage = 1
// // 在页面加载时从localStorage中获取currentPage的值
// const storedPage = localStorage.getItem('poetryLastPage')
// if (storedPage) {
// this.currentPage = parseInt(storedPage)
// }
},
methods: {
prepareAdd() {
......@@ -203,6 +204,8 @@ export default {
})
if (res.code === 200) {
this.form.poetryText = ''
this.currentPage=1
this.interviewPage()
} else {
console.error('Received non-200 status code', res)
this.errorMsg(res.message)
......
......@@ -153,11 +153,12 @@ export default {
this.getQuestionType()
},
mounted() {
// 在页面加载时从localStorage中获取currentPage的值
const storedPage = localStorage.getItem('interviewLastPage')
if (storedPage) {
this.currentPage = parseInt(storedPage)
}
this.currentPage = 1
// // 在页面加载时从localStorage中获取currentPage的值
// const storedPage = localStorage.getItem('interviewLastPage')
// if (storedPage) {
// this.currentPage = parseInt(storedPage)
// }
},
methods: {
prepareAdd() {
......@@ -210,6 +211,7 @@ export default {
questionType: this.form.questionType,
})
if (res.code === 200) {
this.currentPage = 1
this.form.question = ''
this.form.questionType = 0
this.getQuestionType() // 确保这个方法是有效的
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册