@ywfe/fe-tools 1.2.1-beta.26 → 1.2.1-beta.27

Sign up to get free protection for your applications and to get access to all the features.
@@ -8760,6 +8760,35 @@ function request(_a) {
8760
8760
  });
8761
8761
  }
8762
8762
 
8763
+ function userInputToJson(_a) {
8764
+ return __awaiter(this, arguments, void 0, function (_b) {
8765
+ var res, result;
8766
+ var input = _b.input;
8767
+ return __generator(this, function (_c) {
8768
+ switch (_c.label) {
8769
+ case 0:
8770
+ console.log("input", input);
8771
+ return [4 /*yield*/, request({
8772
+ input: {
8773
+ url: "https://fc-typechat.ywwl.com/userInputToJson",
8774
+ method: "GET",
8775
+ params: input,
8776
+ },
8777
+ })];
8778
+ case 1:
8779
+ res = _c.sent();
8780
+ if (res.success) {
8781
+ result = res.data;
8782
+ return [2 /*return*/, result.success ? result.data : result];
8783
+ }
8784
+ else {
8785
+ return [2 /*return*/, res.success ? res.data : res];
8786
+ }
8787
+ }
8788
+ });
8789
+ });
8790
+ }
8791
+
8763
8792
  // Ctrl-S保存代码
8764
8793
  function JSON2String(_a) {
8765
8794
  var input = _a.input;
@@ -8776,5 +8805,5 @@ function JSON2String(_a) {
8776
8805
  }
8777
8806
  }
8778
8807
 
8779
- export { JSON2String, request };
8808
+ export { JSON2String, request, userInputToJson };
8780
8809
  //# sourceMappingURL=ywfe-tools.esm.js.map