From 2e270c97c4c091f8403d44926fabc651c78cfdce Mon Sep 17 00:00:00 2001 From: han <151435705@qq.com> Date: Tue, 10 Dec 2024 17:16:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=9F=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/httpRequest.js | 7 +++---- subPageA/method/methoddetail/methoddetail.vue | 2 +- subPageA/method/methodlist/methodClass.vue | 2 +- subPageA/method/methodlist/methodlist.vue | 4 ++-- subPageC/bookHomestay/bookHomestay.vue | 2 +- subPageC/orderHomestay/cancelStep.vue | 2 +- 6 files changed, 9 insertions(+), 10 deletions(-) diff --git a/common/httpRequest.js b/common/httpRequest.js index 3b70c94..f2de6a2 100644 --- a/common/httpRequest.js +++ b/common/httpRequest.js @@ -250,16 +250,14 @@ module.exports = { }); }); }, - get: function (url, data, headerContentType, tentId, needAes, auth) { - + get: function (url, data, headerContentType, tentId, needAes, auth) { if (needAes !== false) { for (var key in data) { data[key] = aes.aesMinEncrypt(data[key]); } } -console.log(needAes !== false) -console.log(url, data, headerContentType, tentId, needAes, 'get 请求参数'); + headerContentType = headerContentType ? headerContentType : "application/x-www-form-urlencoded"; let headers = { @@ -271,6 +269,7 @@ console.log(url, data, headerContentType, tentId, needAes, 'get 请求参数'); // const tok = store.state.userInfo.accessToken || uni.getStorageSync('userInfo').accessToken; const tok = uni.getStorageSync('userInfo').accessToken; headers['Authorization'] = 'Bearer ' + tok; + } if (tentId && tentId !== "" && tentId !== null && tentId !== undefined) { diff --git a/subPageA/method/methoddetail/methoddetail.vue b/subPageA/method/methoddetail/methoddetail.vue index 5787143..0dab6dc 100644 --- a/subPageA/method/methoddetail/methoddetail.vue +++ b/subPageA/method/methoddetail/methoddetail.vue @@ -84,7 +84,7 @@ "type": this.$param.methodType, "guid": guid } - this.$Request.post(this.$config.getMessgeInfoDetailFormId, data).then(res => { + this.$Request.post(this.$config.getMessgeInfoDetailFormId, data, '', '', false, true).then(res => { if (!that.$util.isSuccess(res)) { return; } diff --git a/subPageA/method/methodlist/methodClass.vue b/subPageA/method/methodlist/methodClass.vue index 1fb50b3..a1225a0 100644 --- a/subPageA/method/methodlist/methodClass.vue +++ b/subPageA/method/methodlist/methodClass.vue @@ -80,7 +80,7 @@ // 获取列表数据 getListData() { console.log('adsf',this.parames) - this.$Request.get(this.$config.selectMessageWalkthroughType, this.parames, '', '', false, '').then(res => { + this.$Request.get(this.$config.selectMessageWalkthroughType, this.parames, '', '', false, true).then(res => { const curPageData = res.data || [] // 当前页数据 if (this.mescroll.num == 1) this.data_list = []; // 第一页需手动制空列表 this.data_list = [...this.data_list, ...curPageData] diff --git a/subPageA/method/methodlist/methodlist.vue b/subPageA/method/methodlist/methodlist.vue index 8eb65f3..22ecbef 100644 --- a/subPageA/method/methodlist/methodlist.vue +++ b/subPageA/method/methodlist/methodlist.vue @@ -91,7 +91,7 @@ type: this.$param.methodType, userkey: this.$param.userkey, }; - this.$Request.get(this.$config.getMethodList, requestData, '', '', false, '').then(res => { + this.$Request.get(this.$config.getMethodList, requestData, '', '', false, true).then(res => { this.class_list = res.data this.pic_list = this.class_list.filter((item, index) => { return item.isrecommend == 'YES' @@ -123,7 +123,7 @@ }, // 获取列表数据 getListData() { - this.$Request.get(this.$config.getMethodRecommendList, this.parames, '', '', false, '').then(res => { + this.$Request.get(this.$config.getMethodRecommendList, this.parames, '', '', false, true).then(res => { const curPageData = res.data || [] // 当前页数据 if (this.mescroll.num == 1) this.data_list = []; // 第一页需手动制空列表 this.data_list = [...this.data_list, ...curPageData] diff --git a/subPageC/bookHomestay/bookHomestay.vue b/subPageC/bookHomestay/bookHomestay.vue index 9d00024..2c5452e 100644 --- a/subPageC/bookHomestay/bookHomestay.vue +++ b/subPageC/bookHomestay/bookHomestay.vue @@ -177,7 +177,7 @@ "checkInPersonInfoDTOList": [this.formData] }; - this.$Request.post(this.$config.createHotelOrder, data, 'json', null, false, null).then(( + this.$Request.post(this.$config.createHotelOrder, data, 'json', null, false, true).then(( res) => { if (res.code == 0) { this.orderPay = res.data diff --git a/subPageC/orderHomestay/cancelStep.vue b/subPageC/orderHomestay/cancelStep.vue index dd60bdd..29670e8 100644 --- a/subPageC/orderHomestay/cancelStep.vue +++ b/subPageC/orderHomestay/cancelStep.vue @@ -38,7 +38,7 @@ let data = { 'orderId': orderId } - this.$Request.get(this.$config.getHomestayOrderRefund, data, null, null, false, null).then((res) => { + this.$Request.get(this.$config.getHomestayOrderRefund, data, null, null, false, true).then((res) => { console.log(res) if (res.code == 0) { this.homestayOrderRefund = res.data