Commit Graph

75 Commits

Author SHA1 Message Date
5c5aa7e55a feat(theme-4): sync inbox/announcements/presence/deposit from main 2026-06-18 10:08:03 +08:00
d3ca8498fb feat(player/admin/api): 玩家端暗色极简主题重构与盘口单串关修复
## 管理端 / API(Bug 修复)
- matches.service:getAdminMatchDetail 返回 markets 时补充 allowSingle、allowParlay 字段
- MatchMarketsPanel:mapMarkets 从接口读取单关/串关开关,不再硬编码为 true
- match-form.ts:AdminMarket 类型补充 allowSingle、allowParlay

## 玩家端 — 全局主题(styles.css / index.html / site.webmanifest)
- 海军暗色 + 白色强调 token,卡片高光渐变(--gradient-card)
- 下拉/弹窗实底不透明(--dropdown-bg: #0A2540)
- 统一 sub-toolbar、status-ribbon、filter-tab 等全局样式
- theme-color 同步为 #001A33

## 玩家端 — 布局与壳层
- MainLayout:详情子页去顶栏/公告,sub-toolbar 全宽铺底
- WalletBalanceCard(新):个人页钱包卡片(反水 + 未结算)
- walletStats.ts(新):钱包统计逻辑抽取

## 玩家端 — 赛事 / 投注
- MatchDetailView:顶栏 8px 顶距、卡片全宽(--detail-gutter-x: 0)
- 盘口状态标签(暂停/已关闭)、去掉 MarketTypeTile 右侧箭头
- VsBadge(新):纯文字 VS,删除 vs.png
- isMarketLocked:仅关单关但允许串关时仍可点击,支持串关流程
- BetSlipDrawer:仅串关盘口禁用单关提交并提示 slip_parlay_only_hint
- betSlip:SlipItem 增加 allowSingle 字段
- MatchBetCard / LeagueAccordionItem:45° 待开赛角标,去掉展开左侧白边
- OutrightEventSection:去掉展开时左侧白色选中条
- FootballView:加大左右边距、筛选栏去 sticky、选中态增强
- BannerCarousel:恢复原始全宽轮播

## 玩家端 — 钱包 / 个人 / 认证 / 其他页面
- WalletView:移除顶部钱包卡片,保留账单列表
- ProfileView:保留 WalletBalanceCard
- 充值/账单/注单/登录注册等页面配色与间距统一
- 公告标签、余额面板、语言切换、区号选择等弹层改为实底

## 国际化
- zh-CN / en-US / ms-MY:新增 slip_parlay_only_hint(仅串关盘口提示)

## 资产
- 更新 banner.svg、empty-matches.svg 配色
- 删除 vs.png

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-17 11:00:25 +08:00
f34fe54489 fix(player): ????????????????
?????????????????+??+?????????????????????????????????/???????????????

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-16 16:25:27 +08:00
06d85953ba feat(player): 新增长页面一键回到顶部按钮
- 在 MainLayout 主滚动区挂载浮动回顶按钮,投注列表与赛事详情等长页通用

- 滚动超过阈值后显示,支持平滑回顶与底部导航避让

- 补充中/英/马来语文案 common.back_to_top

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-16 10:07:09 +08:00
2a8b8415e7 feat: 赛事管理操作日志与审计页体验优化
- API 为赛事/联赛/盘口/赔率/冠军盘写操作写入 CATALOG 审计日志,并新增 catalog-audit-logs 接口

- 管理端将赛事日志独立至赛事管理子页,通用操作日志排除 CATALOG 模块

- 统一赛事子页 list-chrome 布局与面包屑;修复操作日志页表格滚动与分页不可见问题

- 补充中英文/马来语文案及 UAT 验收项 SEC013/SEC014

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-16 10:00:24 +08:00
567ec9ec8a feat: 管理端 RBAC 权限体系与员工管理
新增多角色权限控制(赛事/财务/客服管理员),支持员工 CRUD、路由菜单按权限显隐、审计日志范围过滤;登录返回角色与权限列表。玩家端赛事列表增加静默刷新避免图片闪烁。Seed 补充演示员工账号与充值相关权限。附带 RBAC/审计范围单元测试及 UAT 文档更新。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-15 17:52:39 +08:00
be5b4a4921 优化 Docker 镜像打包脚本并修复管理端赛事操作列布局
- 打包脚本默认 tag 改为 latest,支持 --service 单服务构建/导出
- 新增 api/player/admin 三个独立 bat,更新文档与 manifest
- 联赛赛事面板操作列加宽、横向滚动与按钮换行,避免操作按钮被裁切

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-15 16:35:49 +08:00
bb868e0ea5 fix(docker): Windows entrypoint CRLF and admin invite link VITE_PLAYER_URL
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-15 16:16:01 +08:00
afb5c5437e feat: 充值订单审计与重新申请,优化赛事展示和余额刷新
- 新增 deposit_order_audit_logs 表,记录提交/审批/拒绝/撤销/重提全链路
- 管理端充值单页增加审计历史;玩家端充值历史支持时间线与重新申请
- 已拒绝订单可原单号重提;撤销入账使用 PLAYER_DEPOSIT_REVERSAL 并加强幂等
- 结算后清除热门标记,允许归档已结算赛事,完善今日赛事时区窗口
- 足球页今日/早盘独立折叠;资料与余额在进入钱包/个人页及下注后自动刷新
- 补充投注玩法、结算返水规则文档;新增 smoke/settlement CLI 脚本

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-15 14:52:05 +08:00
wchino
73a94e6be3 部署优化 2026-06-13 22:16:14 +08:00
wchino
21dd9957f0 refactor: update match time utilities and improve local match window logic
- Introduced new functions `isInLocalTodayMatchWindow` and `isAfterLocalTodayMatchWindow` to enhance match time checks.
- Replaced the deprecated `dayKeyInTimeZone` function with `isInLocalTodayMatchWindow` in the PlayerController.
- Updated related tests and utility exports to reflect the new naming conventions.
- Improved handling of local match windows in various components for better accuracy.
2026-06-13 18:20:26 +08:00
wchino
7b33d9f9fa 重构 2026-06-13 17:38:25 +08:00
e7e938f261 feat: WC2026 赛事 seed、生产上线初始化脚本与目录归档
重构 seed 为 WC2026 72 场小组赛与 48 强优胜盘;新增 production 模式仅保留 admin 与赛事示例;提供 prod-init-db 全量重置脚本;管理端 i18n 分包与赛事归档能力。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-12 18:17:00 +08:00
8f14e85ebd fix(player): 走马灯滚动周期调整为 18 秒
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-12 14:12:43 +08:00
cb9a1e8708 feat: 短信调试日志、Tawk 客服、手机号校验放宽与 Docker 文档
API
- 短信发码/验码/创蓝全链路结构化日志(手机号脱敏)
- 新增 SMS_DEBUG_LOG_CODE,联调时可输出验证码与 sessionId(对应创蓝批次号)
- 注册成功、短信找回密码成功写入审计相关日志
- 放宽手机号归一化:移除区号白名单与 10~15 位长度限制

Player
- 公告走马灯滚动周期调整为 35 秒
- 在线客服接入 Tawk.to(tawk.html),登录用户透传昵称/头像/ID
- 三语补充 support.connecting 文案

部署与文档
- docker-compose 与 .env.docker.example 增加 SMS_DEBUG_LOG_CODE
- 新增 docs/短信调试与日志说明.md、docs/docker 镜像构建导出脚本与说明
- Docker 部署指南补充镜像构建文档链接
- .gitignore 忽略 thebet365-images.tar 与 docker-build.log

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-12 14:08:00 +08:00
ff89c31b51 feat(player): 玩家端短信找回密码
支持手机号验证码重置密码,重置成功后跳转登录页;SMS 增加 reset_password 场景与 purpose 隔离。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-12 13:12:00 +08:00
e140861a2b fix(player): 移除钱包与充值页银行卡芯片装饰
去掉 ProfileView、RechargeView 中的 bank-card-chip 元素及样式。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-12 11:31:14 +08:00
bc5b8e0950 perf(assets): Player/Admin 静态图改用 WebP,vs 保留 PNG
Player 端 banner/bg/card/h5bg 等改为 webp 并移除旧 png;Admin 登录背景改 webp;vs 对阵图仍用 png。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-12 11:16:51 +08:00
312c3c5816 feat(player): 注册账号、登录双模式与移动端性能优化
注册必填 7-32 位账号,手机号区号/本地号分存;登录默认账号模式并支持切换手机号登录;Player i18n 拆包与赛事接口优化。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-12 10:56:51 +08:00
83f0f380c5 chore: 将本地密钥 env 文件加入 gitignore
忽略 apps/api/.env 与 .env.docker,并从仓库移除已跟踪的 API 本地配置。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-12 10:30:11 +08:00
db28390be9 feat(player): 接入创蓝短信手机注册与登录页优化
新增 SMS 验证码注册、8 国手机号选择与 Redis 频控;优化登录/注册 UI 及图形验证码样式。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-12 10:25:59 +08:00
168aecfd5c feat(admin): 公共管理列表添加分页
后端 listForAdmin 支持 page/pageSize 分页查询,控制器接收分页参数并校验边界,前端 Contents 页面添加 el-pagination 组件并同步分页状态。

🤖 Generated with [Qoder][https://qoder.com]
2026-06-12 09:31:38 +08:00
5a15159ff3 fix(admin): 修复公共内容展示时段与编辑表单时区不一致
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-12 09:24:25 +08:00
283252c841 fix(admin): 生产环境隐藏并禁用自动化测试
侧栏与路由按服务端 NODE_ENV 控制;可通过 ALLOW_SMOKE_TESTS=true 临时开启。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 17:52:07 +08:00
e469611138 fix(settlement): 要求封盘后才能结算并优化预览流程
封盘前禁止录入比分与生成预览;待结算未确认前可解除封盘。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 17:49:34 +08:00
03e72ca9b2 feat: 开户备注、账单展示优化与后台代理管理增强
- 新增初始上分备注(日常上分/开户赠金/自定义)及前后台校验与展示

- 优化钱包流水类型与备注显示,区分管理员/代理/玩家上下分

- 修复登录后语言被后端覆盖的问题,登录时同步当前语言到服务端

- 后台代理/玩家表格操作栏重构,充值订单增加备注列

- 前台个人中心、充值、账单与验证码组件体验优化

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 17:23:58 +08:00
10485ecfaf feat: 手动充值、邀请码注册与后台管理增强
新增玩家手动充值全流程(收款方式配置、充值下单/审核、钱包上分),
支持邀请码注册、邀请历史与专属返水率;完善后台代理/玩家管理与响应式操作栏,
并补充前台注册、充值页及多语言错误码。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 12:20:11 +08:00
618fb49511 fix(player): 修复登录页「继续浏览」跳转到需登录页的死循环
跳过登录时仅允许进入首页、投注页或赛事详情等公开页面,避免 redirect 指向钱包/个人中心时被路由守卫拦截而停留在登录页。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 09:47:24 +08:00
844727c82e feat: 前台匿名浏览、登录引导、客服入口与返水增强
前台:
- 未登录可浏览首页/赛事/赔率,下注等操作弹出登录引导(去登录/继续浏览)
- 顶部新增客服入口与 iframe 弹窗
- 登录页支持暂不登录返回浏览

API:
- 首页/赛事/冠军盘接口改为公开访问,支持 X-Locale 头
- JWT 守卫支持可选认证

返水:
- 注单新增 is_cashbacked 字段,发放时自动标记
- 预览展示玩家余额,明确平台直发不从代理扣款
- 后台注单列表与玩家历史展示回水状态

其他:
- 串关禁止同场重复选号(SAME_MATCH)
- 补充结算资金流分析文档

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 09:36:44 +08:00
785fa4416d perf(player): 优化 Tab 切换性能并改进投注历史展示
- 主 Tab 启用 keep-alive,恢复各页滚动位置,避免切页重复加载与重复请求
- 首页数据缓存、余额/头像共用 profile 缓存,冠军盘与串关面板按需加载
- 球赛与串关列表新增「仅显示待开赛」筛选
- 重构历史注单卡片,展示注单类型、赔率与日期

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-10 17:33:06 +08:00
a8ee28fcce feat: replace watermarks with corner tags, improve parlay layout and admin polish
- MatchDetailView: replace StatusWatermark with top-right solid status tags, remove match-hero background image
- ParlayPanel: replace StatusWatermark with corner tags, improve toggle button style and layout spacing, fix overflow clipping
- Admin: wallet ledger dialog, agent manager, and player page refinements

🤖 Generated with [Qoder][https://qoder.com]
2026-06-10 16:24:01 +08:00
ef6b15f119 feat: multi-tier agent hierarchy, wallet ledger, and player UX polish
Add configurable agent max level and default sub-agent credit ratio, per-agent block direct player login on suspend, admin/agent wallet transaction views, and match detail my-bets section with refreshed player card styling.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-10 16:15:34 +08:00
641c92a5f5 feat: internationalize API error responses by locale
Add shared error codes with zh/en/ms messages, coded app exceptions,
and locale-aware global filter. Frontends send X-Locale so error text
matches the active UI language.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-10 13:36:38 +08:00
03f54ca689 feat: split admin dashboard, improve match ops, and player closed-match UX
Admin: add match/player overview sub-nav; refine settlement flow and league
match management UI; improve action button enabled/disabled styles; enhance
logo upload and outright odds sync.

API: expose matchPhase/bettingOpen for closed matches; league publish guards;
settlement preview with auto score save; outright team auto-sync.

Player: watermark for closed/settled states; keep match and bet details visible;
remove default login credentials.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-10 13:00:14 +08:00
6124313369 feat: add finance logs page, banner upload, and admin withdraw fix
## 财务流水
- 新增 FinanceLogs.vue(/finance-logs):额度流水 + 上下分流水双 Tab,支持时间/代理/玩家/操作人筛选与分页
- 管理员与代理共用页面,API 按角色自动切换(/admin/* 或 /agent/*)
- 侧栏「财务流水」替代原「额度流水」;代理侧栏同步新增入口
- /agent-credit-transactions 重定向至 /finance-logs?tab=credit,旧链接仍可用
- 后端:新增 GET /admin/wallet/transfer-transactions;增强额度/上下分列表筛选
- 代理端:新增 GET /agent/credit-transactions;GET /agent/wallet-transactions 支持分页与筛选
- 修复:管理员下分改为 adminWithdrawFromPlayer(),下分后重算上级代理 usedCredit

## 内容管理 Banner
- Contents.vue:各语言 Banner 支持本地上传、媒体库选择、手动填 URL(≤5MB)
- vite 开发代理 /uploads;生产 nginx 反代 /uploads/ 至 API

## 玩家端 Banner
- BannerCarousel:外链无协议时自动补 https://
- defaultBanner:API 加载中不闪默认图,仅空列表时展示默认 Banner

## 其他
- AgentManager:查看额度流水链接改为 /finance-logs
- i18n:finance.*、nav.finance_logs、content.upload.*(中/英/马来)

未纳入本次提交:.pnpm-store/、release/ 部署包、uploads/banners/ 下测试上传图片

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-10 10:10:11 +08:00
df20444be9 feat: refactor agent manager, media library, and player UX
- Split admin users page into player/tier-1/tier-2 tabs with affiliation labels and context-specific create dialogs

- Add media library with uploaded_files migration, list/delete unused files API, and admin nav route

- Enforce player username format (alphanumeric 3-32) on frontend and backend via shared package

- Improve admin dialog/panel styling; refine player parlay and match bet card kickoff display

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-09 17:56:28 +08:00
d5e7c8edb3 feat: add smoke tests, agent credit ledger, and player cashback page
Introduce admin smoke-test suite with API probes, agent credit transaction history, and player cashback records; fix SmokeTestModule DI and polish admin/player UI assets.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-09 16:05:48 +08:00
9c6c5e51f3 fix: switch admin to subdomain mode and fix frozen-lockfile build
- Remove /admin path prefix (using admin.protdskj.top subdomain instead)
- Change pnpm install to --no-frozen-lockfile for lockfile compatibility
- Simplify admin Nginx config to standard SPA serving

🤖 Generated with [Qoder][https://qoder.com]
2026-06-09 11:24:40 +08:00
4caedde3fc chore: optimize image assets and reduce bundle size
Compress PNG assets across admin and player apps, removing unused
qianbao.png. Total image size reduced from ~22MB to ~5MB.

🤖 Generated with [Qoder][https://qoder.com]
2026-06-09 10:51:04 +08:00
b0062ddf39 fix(admin): resolve Nginx redirect loop with alias and named location
Use alias to strip /admin/ prefix for file lookups and @admin_spa
named location for SPA fallback, preventing internal redirect cycle.

🤖 Generated with [Qoder][https://qoder.com]
2026-06-09 09:42:58 +08:00
b1ef7dc6f9 feat(admin): set /admin base path for reverse proxy deployment
Configure Vite base, Vue Router history, axios baseURL and container
Nginx to serve the admin panel under /admin/ path prefix.

🤖 Generated with [Qoder][https://qoder.com]
2026-06-09 09:18:16 +08:00
5279a7f831 fix(deploy): defer nginx upstream DNS until api is reachable
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-08 17:49:57 +08:00
b4d3315db8 fix(deploy): run database seed from compiled dist in Docker
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-08 17:45:33 +08:00
55a7043cbd docs: add server Git sync and Docker deploy guide
Document Gitea SSH/HTTPS auth, daily git pull workflow, and common server deployment troubleshooting in the project startup guide.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-08 17:40:47 +08:00
d5913b6301 fix(deploy): use ASCII player assets and harden Docker Linux builds
Rename Chinese public paths and image filenames so Vite builds succeed on Linux, strip legacy public dirs in Dockerfiles, and document clean redeploy steps.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-08 17:28:15 +08:00
490118f3b5 fix: approve pnpm 11 build scripts and untrack .env files
Add pnpm.onlyBuiltDependencies to allow Prisma, esbuild, NestJS etc.
to run postinstall scripts. Remove .env and .env.local from .gitignore.

🤖 Generated with [Qoder][https://qoder.com]
2026-06-08 17:01:57 +08:00
bbede5d164 fix(docker): upgrade Node.js to v22 and pnpm to v11 to resolve build failure
pnpm 11.5.2 requires Node.js v22.13+ and uses node:sqlite module unavailable in Node.js v20.
Also switch to --no-frozen-lockfile temporarily for lockfile format migration compatibility.

🤖 Generated with [Qoder][https://qoder.com]
2026-06-08 16:50:51 +08:00
e52cac7444 feat(deploy): add Docker full-stack deployment and server pack scripts
Enable one-click production deploy via docker-compose.prod.yml, with deployment docs and zip packaging for Baota upload.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-08 16:24:06 +08:00
0d761db70b fix(admin,api,player): 返水注单去重、操作日志 i18n 与钱包紧凑金额
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-08 16:07:11 +08:00
22535d4c27 fix(admin,api): 上分超额提示而非静默截断,并返回中文业务错误
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-08 15:47:45 +08:00