@hylid/call 0.0.90011477778-dev.13 → 0.0.90011477778-dev.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/webCall.js +10 -0
- package/package.json +3 -3
package/lib/webCall.js
CHANGED
|
@@ -140,6 +140,16 @@ export function webCall(apiName, options, config) {
|
|
|
140
140
|
appMethod: apiName,
|
|
141
141
|
jsMethod: "",
|
|
142
142
|
data: options || {} // 参数对象
|
|
143
|
+
}).then(function (res) {
|
|
144
|
+
var _a = options || {},
|
|
145
|
+
success = _a.success,
|
|
146
|
+
fail = _a.fail,
|
|
147
|
+
complete = _a.complete;
|
|
148
|
+
if (res.error || res.errorCode) {
|
|
149
|
+
fail === null || fail === void 0 ? void 0 : fail(res);
|
|
150
|
+
} else {
|
|
151
|
+
success === null || success === void 0 ? void 0 : success(res);
|
|
152
|
+
}
|
|
143
153
|
});
|
|
144
154
|
// @ts-ignore
|
|
145
155
|
} else if (window[apiName]) {
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hylid/call",
|
|
3
|
-
"version": "0.0.90011477778-dev.
|
|
3
|
+
"version": "0.0.90011477778-dev.14",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"files": [
|
|
6
6
|
"lib"
|
|
7
7
|
],
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@hylid/env": "^0.0.90011477778-dev.
|
|
10
|
-
"@hylid/types": "^0.0.90011477778-dev.
|
|
9
|
+
"@hylid/env": "^0.0.90011477778-dev.14",
|
|
10
|
+
"@hylid/types": "^0.0.90011477778-dev.14"
|
|
11
11
|
},
|
|
12
12
|
"publishConfig": {
|
|
13
13
|
"access": "public"
|