@ywfe/fe-tools 1.2.1-beta.31 → 1.2.1-beta.33

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,5 +4,9 @@ interface userInput {
4
4
  }
5
5
  declare function userInputToJson({ input }: {
6
6
  input: userInput;
7
- }): Promise<any>;
7
+ }): Promise<{
8
+ message: string;
9
+ success: boolean;
10
+ data: any;
11
+ }>;
8
12
  export default userInputToJson;
@@ -8760,28 +8760,21 @@ function request(_a) {
8760
8760
 
8761
8761
  function userInputToJson(_a) {
8762
8762
  return __awaiter(this, arguments, void 0, function (_b) {
8763
- var res, result;
8763
+ var res;
8764
8764
  var input = _b.input;
8765
8765
  return __generator(this, function (_c) {
8766
8766
  switch (_c.label) {
8767
- case 0:
8768
- console.log("input", input);
8769
- return [4 /*yield*/, request({
8770
- input: {
8771
- url: "https://fc-typechat.ywwl.com/userInputToJson",
8772
- method: "GET",
8773
- params: input,
8774
- },
8775
- })];
8767
+ case 0: return [4 /*yield*/, request({
8768
+ input: {
8769
+ url: "https://fc-typechat.ywwl.com/userInputToJson",
8770
+ method: "GET",
8771
+ params: input,
8772
+ },
8773
+ })];
8776
8774
  case 1:
8777
8775
  res = _c.sent();
8778
- if (res.success) {
8779
- result = res.data;
8780
- return [2 /*return*/, result.success ? result.data : result];
8781
- }
8782
- else {
8783
- return [2 /*return*/, res.success ? res.data : res];
8784
- }
8776
+ console.log('userINput1', res);
8777
+ return [2 /*return*/, res];
8785
8778
  }
8786
8779
  });
8787
8780
  });