We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1c491ac commit a65793eCopy full SHA for a65793e
src/common/iServer/CommonServiceBase.js
@@ -125,7 +125,14 @@ export class CommonServiceBase {
125
* @param {Object} [options.headers] - 请求头。
126
*/
127
request(options) {
128
- const format = options.scope.format;
+ let format = options.scope.format;
129
+ // 兼容 callback 未传,dataFormat 传入的情况
130
+ if (typeof options.success === 'string') {
131
+ format = options.success;
132
+ options.success = null;
133
+ options.failure = null;
134
+ }
135
+
136
if (format && !this.supportDataFormat(format)) {
137
throw new Error(`${this.CLASS_NAME} is not surport ${format} format!`);
138
}
0 commit comments