Skip to content

Commit

Permalink
perf(projects): perf code
Browse files Browse the repository at this point in the history
  • Loading branch information
honghuangdc committed Feb 29, 2024
1 parent b235ef3 commit 7fa87f5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
14 changes: 10 additions & 4 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
{
"recommendations": [
"afzalsayed96.icones",
"antfu.iconify",
"antfu.unocss",
"dbaeumer.vscode-eslint",
"editorconfig.editorconfig",
"esbenp.prettier-vscode",
"formulahendry.auto-complete-tag",
"formulahendry.auto-close-tag",
"formulahendry.auto-complete-tag",
"formulahendry.auto-rename-tag",
"kisstkondoros.vscode-gutter-preview",
"mariusalchimavicius.json-to-ts",
"lokalise.i18n-ally",
"mhutchie.git-graph",
"mikestead.dotenv",
"naumovs.color-highlight",
"pkief.material-icon-theme",
"sdras.vue-vscode-snippets",
"vue.volar",
"vue.vscode-typescript-vue-plugin"
"vue.vscode-typescript-vue-plugin",
"whtouche.vscode-js-console-utils",
"zhuangtongfa.material-theme"
]
}
1 change: 0 additions & 1 deletion packages/axios/src/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export interface RequestOption<ResponseData = any> {
*
* @param response Axios response
* @param instance Axios instance
* @returns
*/
onBackendFail: (
response: AxiosResponse<ResponseData>,
Expand Down
4 changes: 2 additions & 2 deletions src/service/request/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const request = createFlatRequest<App.Service.Response>(
},
async onBackendFail(_response) {
// when the backend response code is not "0000", it means the request is fail
// for example: the token is expired, refetch token and retry request
// for example: the token is expired, refresh token and retry request
},
transformBackendResponse(response) {
return response.data.data;
Expand Down Expand Up @@ -73,7 +73,7 @@ export const demoRequest = createRequest<App.Service.DemoResponse>(
},
async onBackendFail(_response) {
// when the backend response code is not "200", it means the request is fail
// for example: the token is expired, refetch token and retry request
// for example: the token is expired, refresh token and retry request
},
transformBackendResponse(response) {
return response.data.result;
Expand Down

0 comments on commit 7fa87f5

Please sign in to comment.