From 30b299c1554b91bfd678b41ff1f854c8c0b0e50b Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期三, 12 六月 2024 16:27:52 +0800
Subject: [PATCH] 响应调整

---
 src/views/log/list.vue                         |    2 +-
 src/store/modules/user.js                      |    2 +-
 src/views/message/list.vue                     |    2 +-
 src/store/modules/exam.js                      |    2 +-
 src/views/exam/question/list.vue               |    2 +-
 src/api/subject.js                             |    2 +-
 src/views/task/list.vue                        |    2 +-
 src/views/education/subject/list.vue           |    2 +-
 src/views/user/student/list.vue                |    4 ++--
 src/views/exam/paper/list.vue                  |    2 +-
 src/views/exam/question/edit/single-choice.vue |    2 +-
 src/views/user/admin/list.vue                  |    4 ++--
 src/views/exam/question/edit/true-false.vue    |    2 +-
 src/views/dashboard/index.vue                  |    2 +-
 src/views/answer/list.vue                      |    2 +-
 src/views/exam/question/edit/short-answer.vue  |    2 +-
 src/views/message/send.vue                     |    2 +-
 src/views/user/admin/edit.vue                  |    2 +-
 src/views/user/student/edit.vue                |    2 +-
 19 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/src/api/subject.js b/src/api/subject.js
index d2bed4f..f040209 100644
--- a/src/api/subject.js
+++ b/src/api/subject.js
@@ -2,7 +2,7 @@
 
 export default {
   list: query => post('/api/admin/subject/list'),
-  pageList: query => post('/api/admin/education/subject/page', query),
+  pageList: query => post('/api/admin/subject/page', query),
   edit: query => post('/api/admin/education/subject/edit', query),
   select: id => post('/api/admin/education/subject/select/' + id),
   deleteSubject: id => post('/api/admin/education/subject/delete/' + id)
diff --git a/src/store/modules/exam.js b/src/store/modules/exam.js
index 816c71d..41ae19a 100644
--- a/src/store/modules/exam.js
+++ b/src/store/modules/exam.js
@@ -19,7 +19,7 @@
 const actions = {
   initSubject ({ commit }, action) {
     subjectApi.list().then(re => {
-      commit('setSubjects', re.response)
+      commit('setSubjects', re.data)
       if (action !== undefined) {
         action()
       }
diff --git a/src/store/modules/user.js b/src/store/modules/user.js
index fb4e831..3e103a3 100644
--- a/src/store/modules/user.js
+++ b/src/store/modules/user.js
@@ -10,7 +10,7 @@
 const actions = {
   initUserInfo ({ commit }) {
     userApi.getCurrentUser().then(re => {
-      commit('setUserInfo', re.response)
+      commit('setUserInfo', re.data)
     })
   }
 }
diff --git a/src/views/answer/list.vue b/src/views/answer/list.vue
index 0abe28a..08e7c74 100644
--- a/src/views/answer/list.vue
+++ b/src/views/answer/list.vue
@@ -61,7 +61,7 @@
     search () {
       this.listLoading = true
       examPaperAnswerApi.page(this.queryParam).then(data => {
-        const re = data.response
+        const re = data.data
         this.tableData = re.list
         this.total = re.total
         this.queryParam.pageIndex = re.pageNum
diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue
index df4a797..18759fa 100644
--- a/src/views/dashboard/index.vue
+++ b/src/views/dashboard/index.vue
@@ -91,7 +91,7 @@
     let _this = this
     this.loading = true
     dashboardApi.index().then(re => {
-      let response = re.response
+      let response = re.data
       _this.examPaperCount = response.examPaperCount
       _this.questionCount = response.questionCount
       _this.doExamPaperCount = response.doExamPaperCount
diff --git a/src/views/education/subject/list.vue b/src/views/education/subject/list.vue
index 20a66e0..3a4e0c9 100644
--- a/src/views/education/subject/list.vue
+++ b/src/views/education/subject/list.vue
@@ -58,7 +58,7 @@
     search () {
       this.listLoading = true
       subjectApi.pageList(this.queryParam).then(data => {
-        const re = data.response
+        const re = data.data
         this.tableData = re.list
         this.total = re.total
         this.queryParam.pageIndex = re.pageNum
diff --git a/src/views/exam/paper/list.vue b/src/views/exam/paper/list.vue
index d766adf..bd9c2e5 100644
--- a/src/views/exam/paper/list.vue
+++ b/src/views/exam/paper/list.vue
@@ -72,7 +72,7 @@
     search () {
       this.listLoading = true
       examPaperApi.pageList(this.queryParam).then(data => {
-        const re = data.response
+        const re = data.data
         this.tableData = re.list
         this.total = re.total
         this.queryParam.pageIndex = re.pageNum
diff --git a/src/views/exam/question/edit/short-answer.vue b/src/views/exam/question/edit/short-answer.vue
index 6f96816..d00367f 100644
--- a/src/views/exam/question/edit/short-answer.vue
+++ b/src/views/exam/question/edit/short-answer.vue
@@ -114,7 +114,7 @@
     if (id && parseInt(id) !== 0) {
       _this.formLoading = true
       questionApi.select(id).then(re => {
-        _this.form = re.response
+        _this.form = re.data
         _this.formLoading = false
       })
     }
diff --git a/src/views/exam/question/edit/single-choice.vue b/src/views/exam/question/edit/single-choice.vue
index 6b017a6..c090bb8 100644
--- a/src/views/exam/question/edit/single-choice.vue
+++ b/src/views/exam/question/edit/single-choice.vue
@@ -129,7 +129,7 @@
     if (id && parseInt(id) !== 0) {
       _this.formLoading = true
       questionApi.select(id).then(re => {
-        _this.form = re.response
+        _this.form = re.data
         _this.formLoading = false
       })
     }
diff --git a/src/views/exam/question/edit/true-false.vue b/src/views/exam/question/edit/true-false.vue
index 65d5c05..9f3d150 100644
--- a/src/views/exam/question/edit/true-false.vue
+++ b/src/views/exam/question/edit/true-false.vue
@@ -125,7 +125,7 @@
     if (id && parseInt(id) !== 0) {
       _this.formLoading = true
       questionApi.select(id).then(re => {
-        _this.form = re.response
+        _this.form = re.data
         _this.formLoading = false
       })
     }
diff --git a/src/views/exam/question/list.vue b/src/views/exam/question/list.vue
index 36bb9c4..1a0f8ec 100644
--- a/src/views/exam/question/list.vue
+++ b/src/views/exam/question/list.vue
@@ -100,7 +100,7 @@
     search () {
       this.listLoading = true
       questionApi.pageList(this.queryParam).then(data => {
-        const re = data.response
+        const re = data.data
         this.tableData = re.list
         this.total = re.total
         this.queryParam.pageIndex = re.pageNum
diff --git a/src/views/log/list.vue b/src/views/log/list.vue
index 60069de..6755b4a 100644
--- a/src/views/log/list.vue
+++ b/src/views/log/list.vue
@@ -54,7 +54,7 @@
     search () {
       this.listLoading = true
       userApi.getUserEventPageList(this.queryParam).then(data => {
-        const re = data.response
+        const re = data.data
         this.tableData = re.list
         this.total = re.total
         this.queryParam.pageIndex = re.pageNum
diff --git a/src/views/message/list.vue b/src/views/message/list.vue
index e9597fd..b3f57bd 100644
--- a/src/views/message/list.vue
+++ b/src/views/message/list.vue
@@ -50,7 +50,7 @@
     search () {
       this.listLoading = true
       messageApi.pageList(this.queryParam).then(data => {
-        const re = data.response
+        const re = data.data
         this.tableData = re.list
         this.total = re.total
         this.queryParam.pageIndex = re.pageNum
diff --git a/src/views/message/send.vue b/src/views/message/send.vue
index 95e2547..53f64a1 100644
--- a/src/views/message/send.vue
+++ b/src/views/message/send.vue
@@ -59,7 +59,7 @@
         _this.selectLoading = true
         userApi.selectByUserName(query).then(re => {
           _this.selectLoading = false
-          _this.options = re.response
+          _this.options = re.data
         })
       } else {
         _this.options = []
diff --git a/src/views/task/list.vue b/src/views/task/list.vue
index 45334b7..1678dd9 100644
--- a/src/views/task/list.vue
+++ b/src/views/task/list.vue
@@ -55,7 +55,7 @@
     search () {
       this.listLoading = true
       taskApi.pageList(this.queryParam).then(data => {
-        const re = data.response
+        const re = data.data
         this.tableData = re.list
         this.total = re.total
         this.queryParam.pageIndex = re.pageNum
diff --git a/src/views/user/admin/edit.vue b/src/views/user/admin/edit.vue
index cc5f41e..40d73a9 100644
--- a/src/views/user/admin/edit.vue
+++ b/src/views/user/admin/edit.vue
@@ -74,7 +74,7 @@
     if (id && parseInt(id) !== 0) {
       _this.formLoading = true
       userApi.selectUser(id).then(re => {
-        _this.form = re.response
+        _this.form = re.data
         _this.formLoading = false
       })
     }
diff --git a/src/views/user/admin/list.vue b/src/views/user/admin/list.vue
index 84c860d..a6482f7 100644
--- a/src/views/user/admin/list.vue
+++ b/src/views/user/admin/list.vue
@@ -70,7 +70,7 @@
     search () {
       this.listLoading = true
       userApi.getUserPageList(this.queryParam).then(data => {
-        const re = data.response
+        const re = data.data
         this.tableData = re.list
         this.total = re.total
         this.queryParam.pageIndex = re.pageNum
@@ -81,7 +81,7 @@
       let _this = this
       userApi.changeStatus(row.id).then(re => {
         if (re.code === 1) {
-          row.status = re.response
+          row.status = re.data
           _this.$message.success(re.message)
         } else {
           _this.$message.error(re.message)
diff --git a/src/views/user/student/edit.vue b/src/views/user/student/edit.vue
index ac7748b..5ed5f1b 100644
--- a/src/views/user/student/edit.vue
+++ b/src/views/user/student/edit.vue
@@ -83,7 +83,7 @@
     if (id && parseInt(id) !== 0) {
       _this.formLoading = true
       userApi.selectUser(id).then(re => {
-        _this.form = re.response
+        _this.form = re.data
         _this.formLoading = false
       })
     }
diff --git a/src/views/user/student/list.vue b/src/views/user/student/list.vue
index 85005d9..8144dd3 100644
--- a/src/views/user/student/list.vue
+++ b/src/views/user/student/list.vue
@@ -74,7 +74,7 @@
     search () {
       this.listLoading = true
       userApi.getUserPageList(this.queryParam).then(data => {
-        const re = data.response
+        const re = data.data
         this.tableData = re.list
         this.total = re.total
         this.queryParam.pageIndex = re.pageNum
@@ -85,7 +85,7 @@
       let _this = this
       userApi.changeStatus(row.id).then(re => {
         if (re.code === 1) {
-          row.status = re.response
+          row.status = re.data
           _this.$message.success(re.message)
         } else {
           _this.$message.error(re.message)

--
Gitblit v1.8.0