chore: update deps

This commit is contained in:
vben
2024-06-23 13:19:55 +08:00
parent 7574a5914c
commit 1279872089
25 changed files with 389 additions and 3136 deletions

View File

@@ -42,7 +42,7 @@
"ant-design-vue": "^4.2.3",
"dayjs": "^1.11.11",
"pinia": "2.1.7",
"vue": "^3.4.29",
"vue": "^3.4.30",
"vue-router": "^4.4.0"
},
"devDependencies": {

View File

@@ -10,23 +10,31 @@ import { useAccessStore } from '@vben-core/stores';
import { message } from 'ant-design-vue';
interface HttpResponse<T = any> {
/**
* 0 表示成功 其他表示失败
* 0 means success, others means fail
*/
code: number;
message: string;
result: T;
}
/**
* 创建请求实例
* Create a request instance
*/
function createRequestClient() {
const client = new RequestClient({
baseURL: import.meta.env.VITE_GLOB_API_URL,
// 为每个请求携带 Authorization
makeAuthorization: () => {
return {
handle: () => {
handler: () => {
const accessStore = useAccessStore();
return accessStore.getAccessToken;
},
// 默认
// key: 'Authorization',
key: 'Authorization',
};
},
});