Commit 4c5c7ff2 by songbingqi

修改接口loading传参方式

parent 7f90dec7
......@@ -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({
......
......@@ -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) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment