super-page-runtime 2.0.35 → 2.0.38

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.
@@ -1,4 +1,3 @@
1
- import { getSystemBackendUrl } from "agilebuilder-ui/src/utils/common-util";
2
1
  import { getSessionCache } from "agilebuilder-ui/src/utils/auth";
3
2
  import http from "agilebuilder-ui/src/utils/request";
4
3
  import { getBaseUrl, getListCode } from "../common-util.js";
@@ -37,7 +36,8 @@ function getCommonFormData(pageContext) {
37
36
  const ids = additionalParamMap ? additionalParamMap.ids : null;
38
37
  const taskId = additionalParamMap ? additionalParamMap.taskId : null;
39
38
  const permissionPrefix = pageCode;
40
- const backendUrl = getSystemBackendUrl(pageContext.backendUrl);
39
+ console.log("getCommonFormData-----pageContext=", pageContext);
40
+ const backendUrl = getBaseUrl(pageContext.backendUrl, pageContext.isTest);
41
41
  const param = {
42
42
  pageCode,
43
43
  pageVersion,
@@ -152,7 +152,7 @@ function getWorkflowFormData(pageContext) {
152
152
  if (pageContext.beanName) {
153
153
  param["beanName"] = pageContext.beanName;
154
154
  }
155
- const baseUrl = getBaseUrl(pageContext.backendUrl);
155
+ const baseUrl = getBaseUrl(pageContext.backendUrl, pageContext.isTest);
156
156
  const urlForView = baseUrl + "/dsc/workflow-commons/gets";
157
157
  http.post(urlForView, param).then((commonEntity) => {
158
158
  pageContext.definitionId = commonEntity.definitionId;
@@ -1,5 +1,5 @@
1
1
  export declare function isArrayFn(value: any): boolean;
2
- export declare function getBaseUrl(backendUrl: any): any;
2
+ export declare function getBaseUrl(backendUrl: any, isTest?: boolean): any;
3
3
  export declare function getRealRestApiPath(orgRestApiPath: any, systemCode: any, backendUrl: any): any;
4
4
  /**
5
5
  * 封装模板文件列表
@@ -7,12 +7,16 @@ function isArrayFn(value) {
7
7
  return Object.prototype.toString.call(value) === "[object Array]";
8
8
  }
9
9
  }
10
- function getBaseUrl(backendUrl) {
11
- let baseUrl = window["$vueApp"].config.globalProperties.baseURL;
12
- if (backendUrl) {
13
- baseUrl = getSystemBackendUrl(backendUrl);
10
+ function getBaseUrl(backendUrl, isTest) {
11
+ if (isTest) {
12
+ return backendUrl;
13
+ } else {
14
+ let baseUrl = window["$vueApp"].config.globalProperties.baseURL;
15
+ if (backendUrl) {
16
+ baseUrl = getSystemBackendUrl(backendUrl);
17
+ }
18
+ return baseUrl;
14
19
  }
15
- return baseUrl;
16
20
  }
17
21
  function getRealRestApiPath(orgRestApiPath, systemCode, backendUrl) {
18
22
  let path = orgRestApiPath;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "super-page-runtime",
3
- "version": "2.0.35",
3
+ "version": "2.0.38",
4
4
  "description": "AgileBuilder super page runtime",
5
5
  "license": "ISC",
6
6
  "main": "dist/es/index.js",