feat: 添加云端函数HTTP请求、SMTP邮件、数据库操作能力
- 添加HTTP客户端工具支持GET/POST请求 - 添加SMTP邮件发送功能 - 添加数据库操作(db.getRecords, db.deleteRecord, db.deleteRecords) - 添加订单管理云端函数(读取、接收、筛选、成功、失败) - 添加测试推送和邮件通知云端函数 - 修复云端函数编辑页面预览代码换行显示 - 云端变量数据模型重构(合并数据类型)
This commit is contained in:
@@ -19,7 +19,7 @@ const form = ref({
|
||||
quantity: 1,
|
||||
})
|
||||
|
||||
const selectedApp = computed(() => {
|
||||
const _selectedApp = computed(() => {
|
||||
return apps.value.find(a => a.id === Number(form.value.app_id))
|
||||
})
|
||||
|
||||
@@ -34,11 +34,11 @@ const totalPrice = computed(() => {
|
||||
|
||||
onMounted(async () => {
|
||||
try {
|
||||
const data = await api.get('/agent/apps')
|
||||
const data = await api.get<any[]>('/agent/apps')
|
||||
apps.value = data || []
|
||||
|
||||
if (apps.value.length > 0) {
|
||||
const typesData = await api.get('/agent/card-types')
|
||||
const typesData = await api.get<any[]>('/agent/card-types')
|
||||
cardTypes.value = typesData || []
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ onMounted(async () => {
|
||||
}
|
||||
})
|
||||
|
||||
function formatDate(dateStr: string) {
|
||||
function formatDate(dateStr: string | null) {
|
||||
if (!dateStr)
|
||||
return '-'
|
||||
return new Date(dateStr).toLocaleDateString('zh-CN')
|
||||
|
||||
Reference in New Issue
Block a user