diff --git a/pages/teacher/Addrc.vue b/pages/teacher/Addrc.vue index 0b94172..f880159 100644 --- a/pages/teacher/Addrc.vue +++ b/pages/teacher/Addrc.vue @@ -60,7 +60,7 @@ } }) console.log(res); - if (res.code == 200) { + if (res.code == 0) { uni.showToast({ title: '提交成功' }) @@ -97,7 +97,7 @@ uploadFilePromise(e) { console.log(e); upload({ - url: '/common/upload', + url: '/infra/file/upload', filePath: e, }).then((res) => { this.photo = res.fileName diff --git a/pages/teacher/index.vue b/pages/teacher/index.vue index 08899e9..74c3ab7 100644 --- a/pages/teacher/index.vue +++ b/pages/teacher/index.vue @@ -8,7 +8,7 @@ - {{userInfo.nickName}} + {{userInfo.nickname}} 点击二维码 @@ -218,21 +218,21 @@ async findCourseList() { let res = await request({ url: `/drivingSchool/system/reservationCourse/applet/getAppReservationCourseListByUserId`, - method: 'get' }) this.courseList = res.data }, getUserInfo() { request({ - url: '/getJxInfo', + url: '/jx/auth/getJxInfo', method: 'get' }).then((res) => { - if (res.code == 200) { - this.schoolInfo = res.schoolInfo - this.userInfo = res.user - uni.setStorageSync("roles", res.roles) - uni.setStorageSync("deptId", res.schoolInfo.deptId) + if (res.code == 0) { + this.schoolInfo = res.data.schoolInfo + this.userInfo = res.data.user + console.log(this.userInfo,'userInfo') + uni.setStorageSync("roles", res.data.roles) + uni.setStorageSync("deptId", res.data.schoolInfo.deptId) } }) }, @@ -241,8 +241,8 @@ url: '/drivingSchool/system/reservationCourse/applet/getIndexData', method: 'get' }).then((res) => { - if (res.code == 200) { - this.dataInfo = res.user + if (res.code == 0) { + this.dataInfo = res.data } }) },