@steedos/service-pages 2.6.2-beta.9 → 2.6.4-beta.1

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,8 +1,8 @@
1
1
  /*
2
2
  * @Author: 孙浩林 6194896+sunhaolin@users.noreply.github.com
3
3
  * @Date: 2023-12-10 11:09:40
4
- * @LastEditors: 孙浩林 6194896+sunhaolin@users.noreply.github.com
5
- * @LastEditTime: 2023-12-10 13:25:51
4
+ * @LastEditors: 孙浩林 sunhaolin@steedos.com
5
+ * @LastEditTime: 2023-12-12 17:19:23
6
6
  * @FilePath: /steedos-platform-2.3/services/service-pages/main/default/routes/page_render.router.js
7
7
  * @Description: 支持使用schemaApi动态渲染页面,支持匿名访问。
8
8
  */
@@ -13,7 +13,8 @@ const ejs = require('ejs');
13
13
  router.get('/api/page/render', async function (req, res) {
14
14
  try {
15
15
  res.set('Content-Type', 'text/html');
16
- const { schemaApi } = req.query;
16
+ const { schemaApi, data: queryData } = req.query;
17
+
17
18
  const pageSchema = {
18
19
  "type": "page",
19
20
  "body": {
@@ -52,7 +53,8 @@ router.get('/api/page/render', async function (req, res) {
52
53
  spaceId: ""
53
54
  },
54
55
  pageSchema: pageSchema,
55
- __meteor_runtime_config__: __meteor_runtime_config__
56
+ __meteor_runtime_config__: __meteor_runtime_config__,
57
+ queryData,
56
58
  }
57
59
  const options = {}
58
60
  ejs.renderFile(filename, data, options, function (err, str) {
@@ -1,8 +1,8 @@
1
1
  <!--
2
2
  * @Author: baozhoutao@steedos.com
3
3
  * @Date: 2023-08-01 17:47:18
4
- * @LastEditors: baozhoutao@steedos.com
5
- * @LastEditTime: 2023-09-07 16:22:47
4
+ * @LastEditors: liaodaxue
5
+ * @LastEditTime: 2023-12-28 13:26:17
6
6
  * @Description:
7
7
  -->
8
8
  <!DOCTYPE html>
@@ -58,7 +58,7 @@
58
58
 
59
59
 
60
60
 
61
- <link rel="stylesheet" type="text/css" href="<%=STEEDOS_UNPKG_URL%>/@salesforce-ux/design-system@2.19.0/assets/styles/salesforce-lightning-design-system.min.css">
61
+ <link rel="stylesheet" type="text/css" href="<%=STEEDOS_UNPKG_URL%>/@salesforce-ux/design-system@2.22.2/assets/styles/salesforce-lightning-design-system.min.css">
62
62
  <link rel="stylesheet" href="<%=STEEDOS_AMIS_URL%>/lib/themes/antd.css" />
63
63
  <link rel="stylesheet" href="<%=STEEDOS_AMIS_URL%>/lib/helper.css" />
64
64
  <link rel="stylesheet" href="<%=STEEDOS_AMIS_URL%>/sdk/iconfont.css" />
@@ -189,8 +189,11 @@
189
189
 
190
190
  const container = $(".page-template-root")[0];
191
191
 
192
+ const queryData = <%- JSON.stringify(locals.queryData || {}) %>;
193
+
192
194
  Steedos.Page.render(container, page, Object.assign({}, {
193
- appId: appId
195
+ appId: appId,
196
+ ...queryData
194
197
  }));
195
198
 
196
199
  </script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steedos/service-pages",
3
- "version": "2.6.2-beta.9",
3
+ "version": "2.6.4-beta.1",
4
4
  "main": "package.service.js",
5
5
  "scripts": {},
6
6
  "license": "MIT",
@@ -8,7 +8,7 @@
8
8
  "publishConfig": {
9
9
  "access": "public"
10
10
  },
11
- "gitHead": "736185f3d7532c39baa65b1b26999b0141b6bb58",
11
+ "gitHead": "3c48181d4c11b106c75f3618d9557e628242cba9",
12
12
  "dependencies": {
13
13
  "ejs": "^3.1.8"
14
14
  }