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

26 lines
630 B
JavaScript
Raw Normal View History

2023-12-11 10:46:53 +00:00
import {uniRequest} from "@/http/main";
export default uniRequest.created({
2023-12-11 11:57:05 +00:00
baseUrl: 'http://172.16.100.93:9052',
// baseUrl: 'http://192.168.88.122:9021',
2023-12-11 10:46:53 +00:00
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
}
}
})