uni-ticket-system/src/http/init.js

26 lines
629 B
JavaScript
Raw Normal View History

2023-12-11 10:46:53 +00:00
import {uniRequest} from "@/http/main";
export default uniRequest.created({
//baseUrl: 'http://172.16.100.93:9052',
baseUrl: 'http://192.168.88.122:9021',
header: {
Authorization: uni.getStorageSync('token') ?? ''
},
interceptor: {
request(config){
uni.showLoading({
title: '加载中...',
mask: true
})
setTimeout(()=>{
uni.hideLoading()
},5000)
return config
},
response(response) {
uni.hideLoading()
return response.data
}
}
})