jinjian1.1/utils/interceptor.js

26 lines
394 B
JavaScript
Raw Permalink Normal View History

2024-11-05 16:29:09 +08:00
const whiteList = [
'/api/login',
'/api/smscode',
'/api/spread_validator',
'/api/register'
]
const config = {
invoke(args){
},
returnValue(data){
console.log(data)
},
success(){
console.log("成功回调拦截")
},
fail(e){
console.log(e)
Vue.prototype.$u.toast("接口异常")
},
complete(){
console.log("完成回调拦截")
}
}
uni.addInterceptor("request",config)