From cbce6daaef27435fcd3e09a3536ea16cd5bd0d2a Mon Sep 17 00:00:00 2001 From: wangxiaohua <1214073490@qq.com> Date: Sat, 4 Dec 2021 16:58:24 +0800 Subject: [PATCH] init --- pages/center/Piabodata/Employeesstatistics.vue | 1 + uview-ui/libs/request/index.js | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pages/center/Piabodata/Employeesstatistics.vue b/pages/center/Piabodata/Employeesstatistics.vue index aae6022..9b9b9cf 100644 --- a/pages/center/Piabodata/Employeesstatistics.vue +++ b/pages/center/Piabodata/Employeesstatistics.vue @@ -249,6 +249,7 @@ }, //接待量排名 staffStatisticsReceptionTop10(promse){ + this.$u.post('/cusLvStatistics/staffStatisticsReceptionTop10',promse).then(res=>{ res.result.forEach(item=>{ item.zxl=item.data diff --git a/uview-ui/libs/request/index.js b/uview-ui/libs/request/index.js index 4cf35c9..b47e0e9 100644 --- a/uview-ui/libs/request/index.js +++ b/uview-ui/libs/request/index.js @@ -137,7 +137,8 @@ class Request { // get请求 this.get = (url, data = {}, header = { 'Authorization': 'Bearer '+token.token, - 'content-type': 'application/x-www-form-urlencoded' + 'content-type': 'application/json', + // application/x-www-form-urlencoded }) => { return this.request({ method: 'GET', @@ -150,7 +151,7 @@ class Request { // post请求 this.post = (url, data = {}, header = { 'Authorization': 'Bearer '+token.token, - 'content-type': 'application/x-www-form-urlencoded' + 'content-type': 'application/json' }) => { return this.request({ url, @@ -163,7 +164,7 @@ class Request { // put请求,不支持支付宝小程序(HX2.6.15) this.put = (url, data = {}, header = { 'Authorization': 'Bearer '+token.token, - 'content-type': 'application/x-www-form-urlencoded' + 'content-type': 'application/json' }) => { return this.request({ url, @@ -176,7 +177,7 @@ class Request { // delete请求,不支持支付宝和头条小程序(HX2.6.15) this.delete = (url, data = {}, header = { 'Authorization': 'Bearer '+token.token, - 'content-type': 'application/x-www-form-urlencoded' + 'content-type': 'application/json' }) => { return this.request({ url,