diff --git a/public/favicon.ico b/public/favicon.ico index df36fcf..dca1286 100644 Binary files a/public/favicon.ico and b/public/favicon.ico differ diff --git a/src/App.vue b/src/App.vue index 0ff54b2..1026311 100644 --- a/src/App.vue +++ b/src/App.vue @@ -73,14 +73,30 @@ export default { } }, logout(){ - localStorage.removeItem('user'); - this.login=false; - if(this.$route.name!=="login"){ - this.$router.push("login"); - } - $.ajax({ - url: this.$apiUrl + "/userAction/logout", - method: "GET", + this.$confirm( + "确定要退出登录吗?", + '提示', + { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + } + ).then(() => { + localStorage.removeItem('user'); + this.login = false; + if (this.$route.name !== "login") { + this.$router.push("login"); + } + $.ajax({ + url: this.$apiUrl + "/userAction/logout", + method: "GET", + }); + }).catch(() => { + this.$message({ + type: 'info', + message: '取消退出', + showClose: true + }); }); } }, diff --git a/src/apiConfig.js b/src/apiConfig.js index 93ca137..0a6ea78 100644 --- a/src/apiConfig.js +++ b/src/apiConfig.js @@ -1,5 +1,5 @@ export default { install(Vue) { - Vue.prototype.$apiUrl = 'http://localhost:8080'; + Vue.prototype.$apiUrl = ''; } }; \ No newline at end of file diff --git a/src/components/HelloWorld.vue b/src/components/HelloWorld.vue deleted file mode 100644 index b2c8940..0000000 --- a/src/components/HelloWorld.vue +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - diff --git a/src/views/course/CourseList.vue b/src/views/course/CourseList.vue index 00c894a..ea84b75 100644 --- a/src/views/course/CourseList.vue +++ b/src/views/course/CourseList.vue @@ -367,7 +367,7 @@ export default { page: this.courseList.page, pageSize: this.courseList.pageSize, keyword: this.courseSearchForm.courseName, - courseType: this.courseSearchForm.courseType + type: this.courseSearchForm.courseType }, success: (data) => { console.log(data); diff --git a/src/views/login/loginView.vue b/src/views/login/loginView.vue index 7d98cbc..f561338 100644 --- a/src/views/login/loginView.vue +++ b/src/views/login/loginView.vue @@ -42,7 +42,7 @@ export default { if (this.$route.query.redirect){ this.$router.push({ name: this.$route.query.redirect }); }else{ - this.$route.push("student"); + this.$router.push("student"); } }else{ diff --git a/src/views/student/studentList.vue b/src/views/student/studentList.vue index a5b0e00..0c8673b 100644 --- a/src/views/student/studentList.vue +++ b/src/views/student/studentList.vue @@ -163,8 +163,9 @@ export default { data: { name: this.studentSearchForm.name, code: this.studentSearchForm.code, - sex: (this.studentSearchForm.sex === '' ? -1 : this.studentSearchForm.sex), + sex: (this.studentSearchForm.sex % 1 !== 0 || this.studentSearchForm.sex === '' ? -1 : this.studentSearchForm.sex), grade: (this.studentSearchForm.grade % 1 !== 0 || this.studentSearchForm.grade === '' ? -1 : parseInt(this.studentSearchForm.grade)), + major: (this.studentSearchForm.major % 1 !== 0 || this.studentSearchForm.major === '' ? -1 : parseInt(this.studentSearchForm.major)), page: this.studentList.page, pageSize: this.studentList.pageSize }, @@ -199,6 +200,7 @@ export default { code: '', sex: '', grade: '', + major: '', }; this.studentListGet(); },