complex-request
Advanced tools
+1
-1
| ### ToDo | ||
| - 刷新Token实现 | ||
| ### 0.5.6 | ||
| ### 0.5.6/7 | ||
| - failNotice => fail | ||
@@ -6,0 +6,0 @@ - failNotice.local => fail.intercept |
+1
-1
| { | ||
| "name": "complex-request", | ||
| "version": "0.5.6", | ||
| "version": "0.5.7", | ||
| "description": "a complex request", | ||
@@ -5,0 +5,0 @@ "main": "index.ts", |
@@ -95,7 +95,7 @@ import { _Data, jsonToForm } from "complex-utils" | ||
| type: 'error', | ||
| title: '请求失败', | ||
| title: '请求错误' | ||
| }, | ||
| server: { | ||
| type: 'error', | ||
| title: '请求错误', | ||
| title: '请求失败' | ||
| }, | ||
@@ -145,2 +145,5 @@ } as Record<totalFailType, failOption> | ||
| const targetType = requestConfig.targetType || 'json' | ||
| if (requestConfig.currentType == undefined) { | ||
| requestConfig.currentType = 'json' | ||
| } | ||
| const $contentType = (this.constructor as typeof BaseRequest).$contentType | ||
@@ -169,5 +172,2 @@ const defaultContentType = targetType === 'json' ? $contentType.json : $contentType.form | ||
| requestConfig.currentType = targetType | ||
| if (requestConfig.currentType == undefined) { | ||
| requestConfig.currentType = 'json' | ||
| } | ||
| if (requestConfig.token == undefined) { | ||
@@ -174,0 +174,0 @@ requestConfig.token = true |