diff --git a/config/api.js b/config/api.js index ff930c6..3a2cecb 100644 --- a/config/api.js +++ b/config/api.js @@ -135,7 +135,7 @@ export const masterPage = (params) => http.get('business/booking/master/page', { // 4,实操预约详情 export const masterDetail = (params) => http.get('business/booking/master/get', {params}) // 5实操取消预约 -export const masterCancelBooking = (data) => http.put('business/booking/master/cancelBooking', data) +export const masterCancelBooking = (data) => http.put('business/booking/master/cancelBooking/'+data, ) diff --git a/config/request.js b/config/request.js index e4c48b2..7605741 100644 --- a/config/request.js +++ b/config/request.js @@ -48,18 +48,15 @@ module.exports = (vm) => { // console.log(data) if(data.code==406&&response.config.url!='member/auth/refresh-token'&&response.config.url!=='member/auth/logout') { await vm.$store.dispatch('refreshToken') - // uni.$u.toast('登录过期,请重新登录') - // setTimeout(()=>{ - // vm.$store.commit('goLogin') - // },1500) - // console.log(response.config) - let obj = response.config - let method = obj.method.toLowerCase() - if(method=='get') { - return uni.$u.http.method(obj.url, {params: obj.params}) - }else{ - return uni.$u.http.method(obj.url, obj.data ) - } + setTimeout(()=>{ + let obj = response.config + let method = obj.method.toLowerCase() + if(method=='get') { + return uni.$u.http[method](obj.url, {params: obj.params}) + }else{ + return uni.$u.http[method](obj.url, obj.data ) + } + }) } if(data.code==401) { vm.$store.commit('goLogin') @@ -67,7 +64,7 @@ module.exports = (vm) => { // 自定义参数 const custom = response.config?.custom - if (data.code !== 0) { + if (data.code !== 0&&data.code!=406) { // 如果没有显式定义custom的toast参数为false的话,默认对报错进行toast弹出提示 if (custom.toast !== false) { uni.$u.toast(data.msg) diff --git a/pages/carEntry/operaAppointment/comp/pickDate.vue b/pages/carEntry/operaAppointment/comp/pickDate.vue index cab0b50..1f5b423 100644 --- a/pages/carEntry/operaAppointment/comp/pickDate.vue +++ b/pages/carEntry/operaAppointment/comp/pickDate.vue @@ -37,7 +37,7 @@ 上午 - +