- 将 entcms/wwwroot/* 移到 wwwroot/ - 将 dingdingflow/wwwroot/* 移到 wwwroot/dingdingflow/ - 更新 config.json 使用单一 wwwroot 映射 - 更新 init_any_permissions.py 扫描新路径 - 更新 init_superuser_permissions.py 用法说明 - 废弃 entcms/scripts/load_path.py 和 dingdingflow/scripts/load_path.py - 更新 build.sh 构建步骤 - 更新 README.md 和 docs/architecture.md 目录说明
21 lines
628 B
Plaintext
21 lines
628 B
Plaintext
import json
|
|
from appPublic.uniqueID import getID
|
|
|
|
config = getConfig('.')
|
|
DBPools(config.databases)
|
|
dbname = get_module_dbname('entcms')
|
|
sor = DBPools().sqlorContext(dbname)
|
|
|
|
ns = {'is_visible': '1', 'sort': 'sort_order asc'}
|
|
rows = await sor.R('cms_sections', ns)
|
|
# Parse JSON fields
|
|
for r in rows:
|
|
for field in ['display_config', 'style_config', 'static_content']:
|
|
v = r.get(field, None)
|
|
if v and isinstance(v, str):
|
|
try:
|
|
r[field] = json.loads(v)
|
|
except:
|
|
pass
|
|
print(json.dumps({'status': 'ok', 'rows': rows, 'total': len(rows)}, ensure_ascii=False))
|