diff --git a/.gitignore b/.gitignore index 1a70f06..804edf9 100644 --- a/.gitignore +++ b/.gitignore @@ -151,3 +151,6 @@ cdk.out # prisma部署d1的客户端产物 /generated/prisma/ + +# 本地SQLite数据库 +prisma/db.sqlite diff --git a/CHANGELOG.md b/CHANGELOG.md index fc55dbb..233d9d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Change Log +## v1.4.7 (2026-06-30) + +### Features + +- **site:** 新增页头/页脚自定义代码注入功能,支持在后台添加统计 JS、Meta 标签、客服插件等自定义代码 + +### Bug Fixes + +- **payment:** 修复 TypeScript 类型错误 + ## v1.4.6 (2026-06-21) ### Features diff --git a/modules/payment/service.ts b/modules/payment/service.ts index 5ec16fa..7392b5a 100644 --- a/modules/payment/service.ts +++ b/modules/payment/service.ts @@ -71,6 +71,14 @@ const defaultPaymentConfigs: Record = { notifyUrl: "/api/payments/stripe/notify", returnUrl: "/order/{orderNo}?token={token}", }, + FREE_PAY: { + provider: "FREE_PAY", + name: "免费下单", + isEnabled: false, + baseUrl: "", + notifyUrl: "/api/payments/free/notify", + returnUrl: "/order/{orderNo}?token={token}", + }, }; function getPaymentContext() { diff --git a/modules/site/repository.ts b/modules/site/repository.ts index 7fe059e..eb9244c 100644 --- a/modules/site/repository.ts +++ b/modules/site/repository.ts @@ -18,6 +18,8 @@ export function upsertSiteSettingRecord( supportContact?: string | null; footerText?: string | null; orderNotice?: string | null; + headCode?: string | null; + footerCode?: string | null; }, ) { return prisma.siteSetting.upsert({ @@ -33,6 +35,8 @@ export function upsertSiteSettingRecord( supportContact: input.supportContact ?? null, footerText: input.footerText ?? null, orderNotice: input.orderNotice ?? null, + headCode: input.headCode ?? null, + footerCode: input.footerCode ?? null, }, update: { siteName: input.siteName, @@ -44,6 +48,8 @@ export function upsertSiteSettingRecord( supportContact: input.supportContact ?? null, footerText: input.footerText ?? null, orderNotice: input.orderNotice ?? null, + headCode: input.headCode ?? null, + footerCode: input.footerCode ?? null, }, }); } diff --git a/modules/site/service.ts b/modules/site/service.ts index 34d4522..f5557de 100644 --- a/modules/site/service.ts +++ b/modules/site/service.ts @@ -15,6 +15,8 @@ const defaultSiteSetting = { supportContact: null, footerText: null, orderNotice: null, + headCode: null, + footerCode: null, }; function normalizeSetting(record: Awaited>) { @@ -32,6 +34,8 @@ function normalizeSetting(record: Awaited + +