@ywfe/fe-tools 1.2.1-beta.1 → 1.2.1-beta.10
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/ywfe-tools.cjs +13 -6
- package/lib/ywfe-tools.cjs.map +1 -1
- package/lib/ywfe-tools.esm.js +13 -6
- package/lib/ywfe-tools.esm.js.map +1 -1
- package/package.json +1 -2
- package/request.ts +1 -1
- package/rollup.config.js +1 -4
- package/userInputToJson.ts +19 -12
package/lib/ywfe-tools.cjs
CHANGED
|
@@ -8757,21 +8757,28 @@ function request(_a) {
|
|
|
8757
8757
|
|
|
8758
8758
|
function userInputToJson(_a) {
|
|
8759
8759
|
return __awaiter(this, arguments, void 0, function (_b) {
|
|
8760
|
-
var res;
|
|
8760
|
+
var res, result;
|
|
8761
8761
|
var input = _b.input;
|
|
8762
8762
|
return __generator(this, function (_c) {
|
|
8763
8763
|
switch (_c.label) {
|
|
8764
8764
|
case 0:
|
|
8765
|
-
input
|
|
8766
|
-
return [4 /*yield*/,
|
|
8765
|
+
console.log("input", input);
|
|
8766
|
+
return [4 /*yield*/, request({
|
|
8767
8767
|
input: {
|
|
8768
8768
|
url: "https://fc-typechat.ywwl.com/userInputToJson",
|
|
8769
|
-
method: "GET"
|
|
8770
|
-
|
|
8769
|
+
method: "GET",
|
|
8770
|
+
params: input,
|
|
8771
|
+
},
|
|
8771
8772
|
})];
|
|
8772
8773
|
case 1:
|
|
8773
8774
|
res = _c.sent();
|
|
8774
|
-
|
|
8775
|
+
if (res.success) {
|
|
8776
|
+
result = res.data;
|
|
8777
|
+
return [2 /*return*/, result.success ? result.data : result];
|
|
8778
|
+
}
|
|
8779
|
+
else {
|
|
8780
|
+
return [2 /*return*/, res.success ? res.data : res];
|
|
8781
|
+
}
|
|
8775
8782
|
}
|
|
8776
8783
|
});
|
|
8777
8784
|
});
|