Files
sale/frontend/package.json
T
admin 1907005306
Build and Push Docker Image / build-and-push (push) Successful in 56s
Build and Push Docker Image / deploy (push) Successful in 8s
feat(mail): 邮件通知系统 + 后台富文本模板编辑
通知场景(全部异步发送,失败只记日志、不影响主流程):
- 下单成功   order_created   订单号 / 金额 / 商品明细表 / 详情链接
- 支付成功   order_paid      实付金额 / 支付方式 / 时间(VUPAY 与 HashPay 回调都挂)
- 已发货     order_shipped   快递公司 / 运单号
- 物流更新   order_tracking  tracking_worker 拉到新轨迹时发,带最新状态摘要
- 抽奖中奖   lottery_won     奖品 / 活动名 / 领奖提示(instant 与 batch 开奖都挂)

回调幂等:支付回调 VUPAY 会重投,状态已是 pending_confirm 时不重复发收款邮件。

模板编辑(后台「邮件通知」页)
- email_templates 表:code 固定不动,name/subject/body/is_active 可改
- 首次启动 SeedEmailTemplates 按 code 补默认模板,不覆盖用户改过的内容
- wangEditor 富文本编辑器 + 可用变量清单(点变量插入 {{xxx}})+ iframe 预览 + 发测试邮件
- 编辑器保持白底(与邮件一致,所见即所得),图片上传走站内 /upload 并转绝对地址

邮件 HTML 兼容性
- 邮件客户端会剥掉 <style> 和 class,发前 InlineEmailCSS 给 h1-h3/p/ul/li/table/th/td/
  a/img/blockquote/hr 补内联样式(已有 style 的不动)
- 外层 WrapEmailPreview 包 #f4f4f5 背景 + 600px 白卡片,深浅色客户端都不会糊成一片
- PUBLIC_BASE_URL / SITE_URL 决定邮件里的链接,默认 https://waiguoyan.com

顺带修:侧边栏标题映射缺 /admin/announcements(公告管理页标题一直显示「控制台」)
2026-11-25 21:13:31 +08:00

32 lines
741 B
JSON

{
"name": "frontend",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview"
},
"devDependencies": {
"typescript": "~6.0.2",
"unplugin-auto-import": "^21.1.0",
"unplugin-vue-components": "^32.1.0",
"vite": "^6.4.2"
},
"dependencies": {
"@element-plus/icons-vue": "^2.3.2",
"@types/qrcode": "^1.5.6",
"@vitejs/plugin-vue": "^6.0.5",
"@wangeditor/editor": "^5.1.23",
"@wangeditor/editor-for-vue": "^5.1.12",
"axios": "^1.15.0",
"element-plus": "^2.13.6",
"pinia": "^3.0.4",
"qrcode": "^1.5.4",
"sass": "^1.99.0",
"vue-i18n": "^9.14.5",
"vue-router": "^4.6.4"
}
}