This commit is contained in:
PQZ 2024-08-28 19:33:03 +08:00
parent c6aac43d68
commit 05991168c0
2 changed files with 12 additions and 12 deletions

View File

@ -60,7 +60,7 @@
} }
}) })
console.log(res); console.log(res);
if (res.code == 200) { if (res.code == 0) {
uni.showToast({ uni.showToast({
title: '提交成功' title: '提交成功'
}) })
@ -97,7 +97,7 @@
uploadFilePromise(e) { uploadFilePromise(e) {
console.log(e); console.log(e);
upload({ upload({
url: '/common/upload', url: '/infra/file/upload',
filePath: e, filePath: e,
}).then((res) => { }).then((res) => {
this.photo = res.fileName this.photo = res.fileName

View File

@ -8,7 +8,7 @@
<!-- <image :src="imageUrl+schoolInfo.photo" mode=""></image> --> <!-- <image :src="imageUrl+schoolInfo.photo" mode=""></image> -->
<image :src="imageUrl+dataInfo.avatar" mode=""></image> <image :src="imageUrl+dataInfo.avatar" mode=""></image>
</view> </view>
<view class="">{{userInfo.nickName}}</view> <view class="">{{userInfo.nickname}}</view>
</view> </view>
<view @click="viewCode">点击二维码</view> <view @click="viewCode">点击二维码</view>
@ -218,21 +218,21 @@
async findCourseList() { async findCourseList() {
let res = await request({ let res = await request({
url: `/drivingSchool/system/reservationCourse/applet/getAppReservationCourseListByUserId`, url: `/drivingSchool/system/reservationCourse/applet/getAppReservationCourseListByUserId`,
method: 'get' method: 'get'
}) })
this.courseList = res.data this.courseList = res.data
}, },
getUserInfo() { getUserInfo() {
request({ request({
url: '/getJxInfo', url: '/jx/auth/getJxInfo',
method: 'get' method: 'get'
}).then((res) => { }).then((res) => {
if (res.code == 200) { if (res.code == 0) {
this.schoolInfo = res.schoolInfo this.schoolInfo = res.data.schoolInfo
this.userInfo = res.user this.userInfo = res.data.user
uni.setStorageSync("roles", res.roles) console.log(this.userInfo,'userInfo')
uni.setStorageSync("deptId", res.schoolInfo.deptId) uni.setStorageSync("roles", res.data.roles)
uni.setStorageSync("deptId", res.data.schoolInfo.deptId)
} }
}) })
}, },
@ -241,8 +241,8 @@
url: '/drivingSchool/system/reservationCourse/applet/getIndexData', url: '/drivingSchool/system/reservationCourse/applet/getIndexData',
method: 'get' method: 'get'
}).then((res) => { }).then((res) => {
if (res.code == 200) { if (res.code == 0) {
this.dataInfo = res.user this.dataInfo = res.data
} }
}) })
}, },