entcms模块: - 4个数据表(cms_content/cms_categories/cms_leads/cms_site_config) - 22个.dspy API(含公开API和data_filter) - 4个公开页面(首页/新闻/案例)+管理后台 - 完整营销站点CSS/JS(暗色主题/渐变/动画/响应式) - 云宝SVG线稿占位符 - RBAC权限配置 dingdingflow模块: - 2个数据表(dd_approvals/dd_approval_configs) - 10个.dspy API(含钉钉回调endpoint) - 钉钉API客户端(环境变量配置,开发模式mock) - 管理UI 文档: 架构设计/53条测试用例/开发日志
16 lines
504 B
Plaintext
16 lines
504 B
Plaintext
import json
|
|
from appPublic.uniqueID import getID
|
|
|
|
config = getConfig('.')
|
|
DBPools(config.databases)
|
|
dbname = get_module_dbname('entcms')
|
|
sor = DBPools().sqlorContext(dbname)
|
|
|
|
content_type = params_kw.get('content_type', None)
|
|
ns = {'sort': 'sort_order asc'}
|
|
if content_type:
|
|
ns['content_type'] = content_type
|
|
rows = await sor.R('cms_categories', ns)
|
|
options = [{'value': r['id'], 'text': r['name']} for r in rows]
|
|
print(json.dumps({'status': 'ok', 'data': {'options': options}}, ensure_ascii=False))
|