@das-fed/utils 6.4.0-dev.54 → 6.4.0-dev.54.2

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.
Files changed (51) hide show
  1. package/api-services/index.js +22 -9
  2. package/api-services/index.js.gz +0 -0
  3. package/api-services/modules/app-manage/index.js +113 -100
  4. package/api-services/modules/app-manage/index.js.gz +0 -0
  5. package/api-services/modules/authentication/index.js +159 -146
  6. package/api-services/modules/authentication/index.js.gz +0 -0
  7. package/api-services/modules/bems/index.js +113 -100
  8. package/api-services/modules/bems/index.js.gz +0 -0
  9. package/api-services/modules/contract/index.js +159 -146
  10. package/api-services/modules/contract/index.js.gz +0 -0
  11. package/api-services/modules/duty-manage/index.js +113 -100
  12. package/api-services/modules/duty-manage/index.js.gz +0 -0
  13. package/api-services/modules/enterpriseright/index.js +159 -146
  14. package/api-services/modules/enterpriseright/index.js.gz +0 -0
  15. package/api-services/modules/file/index.js +22 -9
  16. package/api-services/modules/file/index.js.gz +0 -0
  17. package/api-services/modules/gateway-edge/index.js +159 -146
  18. package/api-services/modules/gateway-edge/index.js.gz +0 -0
  19. package/api-services/modules/index.js +22 -9
  20. package/api-services/modules/index.js.gz +0 -0
  21. package/api-services/modules/iot/index.js +113 -100
  22. package/api-services/modules/iot/index.js.gz +0 -0
  23. package/api-services/modules/justauth/index.js +158 -145
  24. package/api-services/modules/justauth/index.js.gz +0 -0
  25. package/api-services/modules/knowledge/index.js +113 -100
  26. package/api-services/modules/knowledge/index.js.gz +0 -0
  27. package/api-services/modules/link/index.js +113 -100
  28. package/api-services/modules/link/index.js.gz +0 -0
  29. package/api-services/modules/permission/index.js +159 -146
  30. package/api-services/modules/permission/index.js.gz +0 -0
  31. package/api-services/modules/platformManage/index.js +113 -100
  32. package/api-services/modules/platformManage/index.js.gz +0 -0
  33. package/api-services/modules/portal/index.js +159 -146
  34. package/api-services/modules/portal/index.js.gz +0 -0
  35. package/api-services/modules/space-manage/index.js +113 -100
  36. package/api-services/modules/space-manage/index.js.gz +0 -0
  37. package/api-services/modules/super-admin/index.js +158 -145
  38. package/api-services/modules/super-admin/index.js.gz +0 -0
  39. package/api-services/modules/supplier/index.js +113 -100
  40. package/api-services/modules/supplier/index.js.gz +0 -0
  41. package/api-services/modules/supplychain-manage/index.js +113 -100
  42. package/api-services/modules/supplychain-manage/index.js.gz +0 -0
  43. package/api-services/modules/systemConfiguration/index.js +159 -146
  44. package/api-services/modules/systemConfiguration/index.js.gz +0 -0
  45. package/api-services/modules/tool/index.js +159 -146
  46. package/api-services/modules/tool/index.js.gz +0 -0
  47. package/api-services/src/create-service/index.js +159 -146
  48. package/api-services/src/create-service/index.js.gz +0 -0
  49. package/create-api-service/index.js +159 -146
  50. package/create-api-service/index.js.gz +0 -0
  51. package/package.json +4 -4
@@ -3072,16 +3072,29 @@ const xn = He(), Cn = xn.sso ?? !0, Nn = xn.noRedireLogin ?? !1, Fn = () => {
3072
3072
  let n = ((u = t.response) == null ? void 0 : u.status) || 500, r = (l = t.response) == null ? void 0 : l.message, o = {};
3073
3073
  const a = { 400: C("参数校验错误"), 404: C("接口地址未找到"), 500: C("服务器内部错误") };
3074
3074
  let i = ((c = t == null ? void 0 : t.response) == null ? void 0 : c.data) || {};
3075
- return !(Un("code") || "") && !Nn && (n === 401 || (i == null ? void 0 : i.code) === 401) ? (Cn ? kn({ ...Mn, redirect_uri: jn }) : Fn(), o = i) : (t.response ? (i instanceof Blob && (i = await new Promise((g) => {
3076
- const y = new FileReader();
3077
- y.readAsText(i, "utf-8"), y.onload = () => {
3078
- try {
3079
- g(JSON.parse(y.result || "{}"));
3080
- } catch {
3081
- g({ code: 400, msg: C("blob解析错误") });
3075
+ if (!(Un("code") || "") && !Nn && (n === 401 || (i == null ? void 0 : i.code) === 401))
3076
+ Cn ? kn({ ...Mn, redirect_uri: jn }) : Fn(), o = i;
3077
+ else {
3078
+ if (t.response) {
3079
+ if (i instanceof Blob && (i = await new Promise((g) => {
3080
+ const y = new FileReader();
3081
+ y.readAsText(i, "utf-8"), y.onload = () => {
3082
+ try {
3083
+ g(JSON.parse(y.result || "{}"));
3084
+ } catch {
3085
+ g({ code: 400, msg: C("blob解析错误") });
3086
+ }
3087
+ };
3088
+ })), i.code) {
3089
+ n = i.code;
3090
+ const g = (i == null ? void 0 : i.status) ?? "错误提示";
3091
+ r = !(i != null && i.data) || !i.data.length ? C(g) : C(g, ...i.data), o = i;
3082
3092
  }
3083
- };
3084
- })), i.code && (n = i.code, r = C(i.status, ...i.data), o = i), r || (r = a[t.response.status] || t.message)) : t.request ? t.code === "ERR_CANCELED" ? t.abortReason && (r = t.abortReason) : r = C("网络异常,请检查您的网络情况") : t.code === "ERR_CANCELED" ? t.abortReason && (r = t.abortReason) : r = C("请求配置异常"), e != null && e.customErrorMessage && (r = e == null ? void 0 : e.customErrorMessage(r, t)), !(e != null && e.ignoreErrorMessage) && r && ((d = (p = window.DasMessage) == null ? void 0 : p.error) == null || d.call(p, { message: r, showClose: !0 }))), { ...o, code: n, msg: r, error: t };
3093
+ r || (r = a[t.response.status] || t.message);
3094
+ } else t.request ? t.code === "ERR_CANCELED" ? t.abortReason && (r = t.abortReason) : r = C("网络异常,请检查您的网络情况") : t.code === "ERR_CANCELED" ? t.abortReason && (r = t.abortReason) : r = C("请求配置异常");
3095
+ e != null && e.customErrorMessage && (r = e == null ? void 0 : e.customErrorMessage(r, t)), !(e != null && e.ignoreErrorMessage) && r && ((d = (p = window.DasMessage) == null ? void 0 : p.error) == null || d.call(p, { message: r, showClose: !0 }));
3096
+ }
3097
+ return { ...o, code: n, msg: r, error: t };
3085
3098
  }, Y = (t, e) => {
3086
3099
  const n = $.create();
3087
3100
  return Bn(n, async (r) => {