diff --git a/request/index.js b/request/index.js index 8695144..44859a3 100644 --- a/request/index.js +++ b/request/index.js @@ -25,7 +25,8 @@ module.exports = (vm) => { // 请求拦截 uni.$u.http.interceptors.request.use( (config) => { - const {noLoading = false} = config.params + console.log(config) + const {noLoading = false} = config.custom // 可使用async await 做异步操作 if(!noLoading){ uni.showLoading({ diff --git a/request/order/index.js b/request/order/index.js index 85d6d60..118fffe 100644 --- a/request/order/index.js +++ b/request/order/index.js @@ -2,7 +2,8 @@ export default { getMyOrder() { return uni.$u.http .get('/app/getMyOrder', { - params: {noLoading:true}, + params: {}, + custom: {noLoading: true}, }) .then((res) => res) .catch((err) => { @@ -68,7 +69,8 @@ export default { getHomeOrder(params) { return uni.$u.http .get(`/app/getHomeOrder?shopId=${params.shopId}`, { - params: {noLoading:true}, + params: {}, + custom: {noLoading: true}, }) .then((res) => res) .catch((err) => {