mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-26 16:46:19 +08:00
feat: add error handle
This commit is contained in:
16
src/api/demo/error.ts
Normal file
16
src/api/demo/error.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
|
||||
enum Api {
|
||||
// 该地址不存在
|
||||
Error = '/error',
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 触发ajax错误
|
||||
*/
|
||||
export function fireErrorApi() {
|
||||
return defHttp.request({
|
||||
url: Api.Error,
|
||||
method: 'GET',
|
||||
});
|
||||
}
|
Reference in New Issue
Block a user