feat: 添加云端函数HTTP请求、SMTP邮件、数据库操作能力

- 添加HTTP客户端工具支持GET/POST请求
- 添加SMTP邮件发送功能
- 添加数据库操作(db.getRecords, db.deleteRecord, db.deleteRecords)
- 添加订单管理云端函数(读取、接收、筛选、成功、失败)
- 添加测试推送和邮件通知云端函数
- 修复云端函数编辑页面预览代码换行显示
- 云端变量数据模型重构(合并数据类型)
This commit is contained in:
2026-04-30 20:54:02 +08:00
parent a4df9e91a0
commit 10044b474f
46 changed files with 15249 additions and 250 deletions
@@ -3,7 +3,6 @@ import type { Composer } from 'vue-i18n'
import { Download, File, List, MoreHorizontal, Pencil, Power, PowerOff, Trash2 } from 'lucide-vue-next'
import { h } from 'vue'
import { useRouter } from 'vue-router'
import type { CloudVariable } from '@/pages/developer/cloud-variables/data/schema'
@@ -88,21 +87,11 @@ export function getColumns(actions: {
decimal: t('developer.cloudVariables.types.decimal'),
string: t('developer.cloudVariables.types.string'),
binary: t('developer.cloudVariables.types.binary'),
stream: '记录',
}
return h(Badge, { variant: 'outline' }, () => typeMap[type || 'string'] || type || 'string')
},
},
{
accessorKey: 'data_type',
header: () => '数据模式',
cell: ({ row }) => {
const dataType = row.getValue('data_type') as string
if (dataType === 'stream') {
return h(Badge, { variant: 'secondary', class: 'bg-blue-50 text-blue-700 dark:bg-blue-950 dark:text-blue-300' }, () => '流水')
}
return h(Badge, { variant: 'outline' }, () => '单值')
},
},
{
accessorKey: 'description',
header: () => t('developer.cloudVariables.columns.description'),
@@ -182,7 +171,7 @@ export function getColumns(actions: {
() => {
const items = []
if (variable.data_type === 'stream') {
if (variable.var_type === 'stream') {
items.push(
h(DropdownMenuItem, { onClick: () => actions.onViewRecords(variable) }, () => [
h(List, { class: 'mr-2 h-4 w-4' }),