mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-08-02 01:47:43 +00:00
14395488b9
* update rdagent cmd * fix log error message * use multiProcessing.Process instead of subprocess.Popen * add traces to gitignore * add user interactor in RDLoop (finance scenarios) * add interactor (feedback, hypothesis) for quant scens * fix the test_end in qlib conf * add features init config, general instruction to qlib scenarios * set base features for based exp * fix bug when combine factors * move traces folder to git_ignore_folder * fix bug in features init * fix quant interact bug * fix logger warning error * bug fixes * modify rdagent logger, now it can set file output * adjust cli functions and fix logger bug * fix server port transport problem * update server_ui in cli * add web code * fix CI problem * black fix * update web ui README * update README * update readme
37 lines
786 B
JavaScript
37 lines
786 B
JavaScript
import axios from 'axios'
|
|
|
|
axios.defaults.headers.post['Content-Type'] = 'application/json'
|
|
|
|
const service = axios.create({
|
|
baseURL: ''
|
|
})
|
|
service.defaults.timeout = 5 * 60 * 1000;
|
|
|
|
// request拦截器
|
|
service.interceptors.request.use(
|
|
config => {
|
|
if (config.data) {}
|
|
if (config.params) {
|
|
// console.log('request: ', config.params)
|
|
}
|
|
return config
|
|
},
|
|
error => {
|
|
console.log('error-request: ', error)
|
|
return error
|
|
}
|
|
)
|
|
|
|
// respone拦截器
|
|
service.interceptors.response.use(
|
|
response => {
|
|
return response.data
|
|
},
|
|
error => {
|
|
console.log('error-response: ', error)
|
|
console.log('error-response: ', error.response)
|
|
return error.response
|
|
}
|
|
)
|
|
|
|
export default service |