From 482307854e5aa2e9c2e8727b6bd67c07a9804876 Mon Sep 17 00:00:00 2001 From: PQZ Date: Wed, 11 Dec 2024 18:13:56 +0800 Subject: [PATCH] 1 --- config.js | 2 +- main.js | 1 + pages/index/Details.vue | 2 +- pages/index/ScheduleTraining.vue | 4 ++-- pages/index/TextInfo.vue | 2 +- pages/index/bmPage.vue | 4 ++-- pages/index/bookingInfo.vue | 2 +- pages/index/courseInfo.vue | 2 +- pages/index/index.vue | 2 +- pages/index/jlInfo.vue | 2 +- pages/index/schoolCounseling.vue | 2 +- pages/index/schoolList.vue | 2 +- pages/index/selfInfo.vue | 2 +- pages/login/login.vue | 4 ++-- pages/my/my.vue | 2 +- utils/request.js | 3 ++- 16 files changed, 20 insertions(+), 18 deletions(-) diff --git a/config.js b/config.js index 1dd3904..74ef1cd 100644 --- a/config.js +++ b/config.js @@ -2,7 +2,7 @@ module.exports = { // baseUrl: 'https://vue.ruoyi.vip/prod-api', - imagesUrl: 'http://localhost:48080/admin-api', + imagesUrl: 'http://122.51.230.86:9000', baseUrl: 'http://localhost:48080/admin-api', // baseUrl: 'http://192.168.31.54:8016/jx', // imagesUrl: 'http://192.168.31.54:8016/jx', diff --git a/main.js b/main.js index 81d835f..51e0d37 100644 --- a/main.js +++ b/main.js @@ -9,6 +9,7 @@ import './uni.promisify.adaptor' Vue.config.productionTip = false App.mpType = 'app' Vue.prototype.$baseUrl = config.baseUrl +Vue.prototype.$imagesUrl = config.imagesUrl const app = new Vue({ ...App }) diff --git a/pages/index/Details.vue b/pages/index/Details.vue index 1e3ac58..105cc55 100644 --- a/pages/index/Details.vue +++ b/pages/index/Details.vue @@ -150,7 +150,7 @@ qhindex: 0, swxw: 0, Phone: null, - baseUrl: this.$baseUrl, + baseUrl: this.$imagesUrl, newId: null, typelist: [{ name: '成人班', diff --git a/pages/index/ScheduleTraining.vue b/pages/index/ScheduleTraining.vue index fa4c141..e89a48c 100644 --- a/pages/index/ScheduleTraining.vue +++ b/pages/index/ScheduleTraining.vue @@ -100,7 +100,7 @@ data() { return { titles: "预约训练", - baseUrl: this.$baseUrl, + baseUrl: this.$imagesUrl, indicatorDots: false, autoplay: true, interval: 2000, @@ -253,7 +253,7 @@ icon: "success", duration: 4000 }) - if (res.code == 200) { + if (res.code == 0) { console.log('进了', res); uni.navigateTo({ url: '/pages/reservation/reservation' diff --git a/pages/index/TextInfo.vue b/pages/index/TextInfo.vue index b89cc97..f307bb6 100644 --- a/pages/index/TextInfo.vue +++ b/pages/index/TextInfo.vue @@ -32,7 +32,7 @@ data() { return { titles: "平台公告", - baseUrl: this.$baseUrl, + baseUrl: this.$imagesUrl, msg: "1", List: [], show: false, diff --git a/pages/index/bmPage.vue b/pages/index/bmPage.vue index 97d3d22..c140353 100644 --- a/pages/index/bmPage.vue +++ b/pages/index/bmPage.vue @@ -161,7 +161,7 @@ popupShow: false, sfzimg: null, fileList1: [], - baseUrl: this.$baseUrl, + baseUrl: this.$imagesUrl, status: 'loading', sexlist: [ "男", @@ -447,7 +447,7 @@ }, method: 'post', }) - if (res.code == 200) { + if (res.code == 0) { uni.navigateTo({ url: '/pages/index/contract?Address=' + this.Address + '&name=' + this.name diff --git a/pages/index/bookingInfo.vue b/pages/index/bookingInfo.vue index 40a8352..e2a5d17 100644 --- a/pages/index/bookingInfo.vue +++ b/pages/index/bookingInfo.vue @@ -109,7 +109,7 @@ List: [], show: false, status: 'loading', - baseUrl: this.$baseUrl, + baseUrl: this.$imagesUrl, bookingData: [], bookingId: null, userId: null, diff --git a/pages/index/courseInfo.vue b/pages/index/courseInfo.vue index 4337a16..ae0fe61 100644 --- a/pages/index/courseInfo.vue +++ b/pages/index/courseInfo.vue @@ -72,7 +72,7 @@ show: false, status: 'loading', courseId: null, - baseUrl: this.$baseUrl, + baseUrl: this.$imagesUrl, bmTypeById: [], content: '', kcInfo: null, diff --git a/pages/index/index.vue b/pages/index/index.vue index 33f57ed..1e96acc 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -155,7 +155,7 @@ status: 'loading', swiperListData: [], jxglInfoData: [], - baseUrl: this.$baseUrl, + baseUrl: this.$imagesUrl, kcListInfo: [], preferentialCurrentIndex: 0, searchSchool: null, diff --git a/pages/index/jlInfo.vue b/pages/index/jlInfo.vue index 6993f9c..0fbed8d 100644 --- a/pages/index/jlInfo.vue +++ b/pages/index/jlInfo.vue @@ -29,7 +29,7 @@ List: [], show: false, status: 'loading', - baseUrl: this.$baseUrl, + baseUrl: this.$imagesUrl, newId: null, content: null } diff --git a/pages/index/schoolCounseling.vue b/pages/index/schoolCounseling.vue index 13b742a..3311a06 100644 --- a/pages/index/schoolCounseling.vue +++ b/pages/index/schoolCounseling.vue @@ -32,7 +32,7 @@ data() { return { titles: "平台公告", - baseUrl: this.$baseUrl, + baseUrl: this.$imagesUrl, msg: "1", List: [], show: false, diff --git a/pages/index/schoolList.vue b/pages/index/schoolList.vue index b50fe9c..6af64fc 100644 --- a/pages/index/schoolList.vue +++ b/pages/index/schoolList.vue @@ -53,7 +53,7 @@ List: [], show: false, status: 'loading', - baseUrl: this.$baseUrl, + baseUrl: this.$imagesUrl, schoolList: [], queryParams: { pageNum: 1, diff --git a/pages/index/selfInfo.vue b/pages/index/selfInfo.vue index 251c43c..bc16d36 100644 --- a/pages/index/selfInfo.vue +++ b/pages/index/selfInfo.vue @@ -46,7 +46,7 @@ return { titles: "设置", fileList1: [], - baseUrl: this.$baseUrl, + baseUrl: this.$imagesUrl, avatar: '', selfInfo: '' } diff --git a/pages/login/login.vue b/pages/login/login.vue index 620a8be..52fde5b 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -65,7 +65,7 @@ yd: false, shenfen: 'jcyh', show: false, - baseUrl: this.$baseUrl, + baseUrl: this.$imagesUrl, privacyPolicyChecked: false, phoneNumber: "", isButtonDisabled: false, @@ -162,7 +162,7 @@ getPhone(e) { console.log('执行了'); config.header = config.header || {} - config.header['Tenant-Id'] = '1' + config.header['tenant-id'] = '180' if (this.privacyPolicyChecked == false) { uni.showToast({ icon: "none", diff --git a/pages/my/my.vue b/pages/my/my.vue index a8c6fc4..7ae9b60 100644 --- a/pages/my/my.vue +++ b/pages/my/my.vue @@ -86,7 +86,7 @@ export default { data() { return { - baseUrl: this.$baseUrl, + baseUrl: this.$imagesUrl, titles: "我的", msg: "3", List: [], diff --git a/utils/request.js b/utils/request.js index 9cf5a14..8a38a1f 100644 --- a/utils/request.js +++ b/utils/request.js @@ -17,10 +17,11 @@ 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() } + // get请求映射params参数 if (config.params) { let url = config.url + '?' + tansParams(config.params)