@steedos/service-pages 3.0.0-beta.98 → 3.0.0

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,5 +1,5 @@
1
1
  name: pages
2
- label: Micro Pages
2
+ label: Custom Pages
3
3
  description:
4
4
  fields:
5
5
  dashboard_filters_enabled:
@@ -9,25 +9,14 @@ const auth = require('@steedos/auth');
9
9
  const ejs = require('ejs');
10
10
  const fs = require('fs');
11
11
  const _ = require('lodash');
12
- const path = require('path');
13
12
  const objectql = require('@steedos/objectql');
14
13
 
15
- const getPublicAssetUrls = function(assetUrls){
16
- const values = _.map(_.split(assetUrls), (item)=>{
17
- if(_.startsWith(item, '/')){
18
- return Meteor.absoluteUrl(item) ;
19
- }else{
20
- return item;
21
- }
22
- })
23
- return _.join(values, ',')
24
- }
25
14
 
26
15
  router.get('/api/pageDesign', auth.requireAuthentication, async function (req, res) {
27
16
  try {
28
17
  res.set('Content-Type', 'text/html');
29
18
  const userSession = req.user;
30
- let assetUrls = getPublicAssetUrls(req.query.assetUrls);
19
+ let assetUrls = req.query.assetUrls;
31
20
  const assetUrl = `assetUrl=${assetUrls.split(',').join("&assetUrl=")}&`;
32
21
 
33
22
  // const dataContext = {
@@ -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: 孙浩林 sunhaolin@steedos.com
5
- * @LastEditTime: 2025-03-05 10:04:42
4
+ * @LastEditors: 殷亮辉 yinlianghui@hotoa.com
5
+ * @LastEditTime: 2025-09-30 16:39:29
6
6
  * @FilePath: /steedos-platform-3.0/services/service-pages/main/default/routes/page_render.router.js
7
7
  * @Description: 支持使用schemaApi动态渲染页面,支持匿名访问。
8
8
  */
@@ -32,6 +32,14 @@ router.get('/api/page/render', async function (req, res) {
32
32
  locale = "zh-CN";
33
33
  }
34
34
 
35
+ let parsedQueryData = {};
36
+ try {
37
+ parsedQueryData = typeof queryData === "string" ? JSON.parse(queryData) : queryData;
38
+ }
39
+ catch (error) {
40
+ parsedQueryData = {};
41
+ }
42
+
35
43
  const filename = __dirname + '/page_view.ejs';
36
44
  const data = {
37
45
  Title: 'page.label',
@@ -54,7 +62,7 @@ router.get('/api/page/render', async function (req, res) {
54
62
  },
55
63
  pageSchema: pageSchema,
56
64
  // __meteor_runtime_config__: __meteor_runtime_config__,
57
- queryData,
65
+ queryData: parsedQueryData,
58
66
  STEEDOS_PUBLIC_USE_OPEN_API: process.env.STEEDOS_PUBLIC_USE_OPEN_API
59
67
  }
60
68
  const options = {}
@@ -4,7 +4,7 @@ CustomApplications:
4
4
  description: null
5
5
  CustomLabels:
6
6
  menu_user_interface: User Interface
7
- menu_pages: Micro Pages
7
+ menu_pages: Custom Pages
8
8
  page_assignments_error_not_allowed_to_application_pages: Prohibit assigning permissions to application pages
9
9
  page_assignments_error_organization_default_already_exists: Authorization for 'Organization Default Settings' already exists
10
10
  page_assignments_error_application_default_already_exists: Authorization for 'Application Default Settings' already exists
package/package.json CHANGED
@@ -1,14 +1,12 @@
1
1
  {
2
2
  "name": "@steedos/service-pages",
3
- "version": "3.0.0-beta.98",
3
+ "version": "3.0.0",
4
4
  "main": "package.service.js",
5
- "scripts": {},
6
5
  "license": "MIT",
7
- "private": false,
8
6
  "publishConfig": {
9
7
  "access": "public"
10
8
  },
11
- "gitHead": "4b7a81157f9279ab1750ef877d94c9d64ae7968e",
9
+ "gitHead": "20ea485d800dd4ad0a99c82b26000879c2f85741",
12
10
  "dependencies": {
13
11
  "clone": "^2.1.2",
14
12
  "ejs": "^3.1.8"