feat: 添加vue3bbs前端

This commit is contained in:
橙子
2023-02-26 13:17:19 +08:00
parent 72decd970a
commit 3e31f7783f
30 changed files with 5842 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
import axios from 'axios';
const myaxios = axios.create({
// baseURL:'/'//
// baseURL: process.env.VUE_APP_BASE_API, // /dev-apis
timeout: 50000,
// transformResponse: [data => {
// const json = JsonBig({
// storeAsString: true
// })
// return json.parse(data)
// }],
headers: {
'Authorization': 'Bearer ' + ""
},
})
// 请求拦截器
myaxios.interceptors.request.use(function (config) {
return config;
}, function (error) {
return Promise.reject(error);
});
// 响应拦截器
myaxios.interceptors.response.use(function (response) {
return response;
}, function (error) {
return Promise.reject(error);
});
export default myaxios