From c6cd7e69e87a26a9d096495fc955189f267d73e9 Mon Sep 17 00:00:00 2001 From: PQZ Date: Tue, 10 Dec 2024 16:43:01 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.js | 3 ++- pages/index/addCoach.vue | 18 +++++++++--------- pages/index/cadetDetails.vue | 9 ++++----- pages/index/cadetManage.vue | 6 ++---- pages/index/courseManage.vue | 2 +- pages/index/orderDetails.vue | 4 ++-- pages/index/orderManage.vue | 9 +++++---- utils/request.js | 2 +- 8 files changed, 26 insertions(+), 27 deletions(-) diff --git a/config.js b/config.js index 109d227..236942b 100644 --- a/config.js +++ b/config.js @@ -3,7 +3,8 @@ module.exports = { // baseUrl: 'https://vue.ruoyi.vip/prod-api', //baseUrl: 'https://www.nuoyunr.com/jx', - imagesUrl: 'http://localhost:48080/admin-api', + // imagesUrl: 'http://localhost:48080/admin-api', + imagesUrl: 'http://122.51.230.86:9000', baseUrl: 'http://localhost:48080/admin-api', // imagesUrl: 'http://192.168.31.54:8016/jx', // 应用信息 diff --git a/pages/index/addCoach.vue b/pages/index/addCoach.vue index 3255b2f..f07884d 100644 --- a/pages/index/addCoach.vue +++ b/pages/index/addCoach.vue @@ -86,7 +86,7 @@ if (res.code == 0) { this.formData = res.data this.fileList1 = [{ - url: this.formData.photo + url: this.imageUrl + this.formData.photo }] } }) @@ -129,17 +129,10 @@ url: '/infra/file/upload', filePath: e, }).then((res) => { - this.formData.photo = res.data + this.formData.photo = '/' + res.data }) }, submit() { - if (!this.formData.photo || this.formData.photo.length == 0) { - uni.showToast({ - title: "请上传封面图", - icon: "none" - }) - return - } if (!this.formData.name || !this.formData.price || !this.formData.reserveMoney || !this.formData .automatic || !this.formData.license || !this.formData.describ) { uni.showToast({ @@ -148,6 +141,13 @@ }) return } + if (!this.formData.photo || this.formData.photo.length == 0) { + uni.showToast({ + title: "请上传封面图", + icon: "none" + }) + return + } if (this.formData.id) { request({ url: '/drivingSchool/system/driveSchoolCourse', diff --git a/pages/index/cadetDetails.vue b/pages/index/cadetDetails.vue index 644173d..5925281 100644 --- a/pages/index/cadetDetails.vue +++ b/pages/index/cadetDetails.vue @@ -3,7 +3,7 @@ - + {{cadetOne.name}} @@ -61,7 +61,7 @@ - + + ¥{{item.driveSchoolCourse.reserveMoney}} @@ -110,7 +110,7 @@ } ], userId: null, - imagesUrl: this.$baseUrl, + imageUrl: this.$imagesUrl, listData: ["全部订单", "已报名", "已付款", "已面签"], listDataIndex: 0, orderList: [], @@ -163,7 +163,8 @@ } else { this.orderList = res.data.records } - this.param.total = res.data.total + this.param.total = res.data.total + console.log(this.orderList,'orderList') } else { uni.showToast({ title: "网络不佳请稍后再试", diff --git a/utils/request.js b/utils/request.js index 0154bd7..8e2cb15 100644 --- a/utils/request.js +++ b/utils/request.js @@ -17,7 +17,7 @@ const request = config => { // 是否需要设置 token const isToken = (config.headers || {}).isToken === false config.header = config.header || {} - config.header['Tenant-Id'] = '1' + config.header['Tenant-Id'] = '180' if (getToken() && !isToken) { config.header['Authorization'] = 'Bearer ' + getToken() }