Commit Graph

20 Commits

Author SHA1 Message Date
yuzhiran 4180eae944 feat: 意见反馈功能
新增完整反馈闭环:
- 后端: Feedback 模块 (schema+service+controller+module)
  - POST /api/feedback (用户提交)
  - GET /api/feedback (管理员列表)
  - PATCH /api/feedback/:id/resolve (管理员标记已处理)
- 前端: pages/feedback/feedback.vue
  - 三种反馈类型: 问题反馈/改进建议/点赞鼓励
  - 文本输入 + 联系方式选填
  - 提交后显示成功提示
- 用户页新增'意见反馈'菜单入口
- 管理后台可通过 API 查看和管理反馈
2026-07-06 11:13:08 +08:00
yuzhiran fe688096a4 fix: interview 页面 22x ReferenceError + 引力值明细追加余额栏
interview.vue: 上次会话修改时丢失了 timerSeconds/timerInterval 两个 let 声明
(它们在 git 历史里 d8a7872 时本和 onMounted 同段定义),导致页面渲染时
20+ 次 'ReferenceError: timerSeconds is not defined' 刷屏、对话框/计时器
被白屏错误覆盖。补回两行声明即可还原,无其它改动。

user.vue: 引力值明细每行除金额外追加变动后「余额 N」尾列(schema 中 balance
字段已记录,仅前端未展示)。.detail-item-right 容器纵向堆叠金额+小字余额。
2026-07-05 08:59:02 +08:00
yuzhiran 2230a95b45 feat: gravity transaction logging + user-facing history popup
- New GravityTransaction schema tracks all gravity changes (registration,
  interview/optimize/download deduction, purchase, monthly topup, migration)
- GravityTopUpService: bulk log for monthly VIP topup
- PaymentController.activateMembership: log plan_set transactions
- QuotaService: add logTransaction, wire into all gravity-modifying methods
- UserService: log registration grants (phone/wx/email/password)
- GET /user/gravity-transactions?page=&limit= API
- Frontend: user.vue '明细' button + paginated popup
- Docs: update PROJECT-STATUS v4.10, FEATURE-LIST, DEPLOYMENT
2026-07-04 11:12:55 +08:00
yuzhiran f955ecc71d fix: token 过期时前端自动清除登录态并跳转登录
根因: 页面使用 uni.request() 直接请求,401 时只有静默 catch,
不清除本地 token,导致界面显示已登录但后端拒接。

修复:
- 新增 utils/auth.ts: clearAuth() + checkAuth() 统一处理 401
- member.vue: refreshState / startGravityPay / startPlanPay /
  pollPayResult / activatePlan 全部添加 401 检测
- user.vue: fetchUserInfo / loadMemberStatus / loadStats /
  preCreateShare 添加 401 检测
- interview.vue: startInterview / sendAnswer / speakAiText /
  startRecord 添加 401 检测
2026-07-02 12:52:43 +08:00
yuzhiran 2fddd39301 feat: registration gravity from DB config instead of hardcoded
- Add registrationGravity to pricing config (default 50, adjustable via admin)
- Inject PricingService into UserService, read config for all 4 registration paths
- Expose registrationGravity in /member/plans response for frontend
- Login page fetches dynamic value from API, replaces hardcoded '50'
- Update user.vue gravity card copy
2026-06-25 08:12:01 +08:00
yuzhiran 52e5350ba0 补充 VP 模块注册 + 前端 API 封装
- app.module.ts: 注册 VirtualPaymentModule
- config.ts + api.ts: 添加虚拟支付 API 端点
- useGravityPurchase.ts: VP 购买逻辑
- interview.vue / user.vue: 适配 VP 调用
- admin.controller.ts: 管理端虚拟支付相关调整
- payment.controller.spec.ts: 测试适配
2026-06-24 10:35:25 +08:00
yuzhiran 1a45822a58 fix(mp): handle mini-program launch params and pre-create share code for user page
App.vue: add handleLaunchParams() to read token/shareCode from onLaunch/onShow query in MP-WEIXIN context. user.vue: pre-create share record on page load, use dynamic path with shareCode in onShareAppMessage.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-06-22 14:23:27 +08:00
yuzhiran d8fb8e3bba feat: enable WeChat share/forward on all pages via onShareAppMessage + onShareTimeline 2026-06-21 18:51:35 +08:00
yuzhiran b8667395ac feat: unify contact button styles, dynamic version from git tag, enrich AI positions & homepage UX 2026-06-21 09:16:31 +08:00
yuzhiran ef4d22a633 feat(admin): enrich admin panel fields; add user index constraint and customer service
- admin controller: add updatedAt to interview/resume selects; add orderCount,
  todayOrders, totalRevenue to overview
- admin.vue: enrich all tabs with more fields
  - overview: order cards (count, revenue)
  - users: wxOpenid, email, createdAt, interviewCount, vipExpireAt, role badge
  - interviews: user email, updatedAt, summary preview
  - orders: title, type, channel, paidAt, wxTransactionId, refund info
  - resumes: user email, updatedAt
  - share: sharer phone, shareCode, isActive, visitorId(IP), creditedAt
  - admins: email, createdAt
- user.schema: add unique indexes on phone/wxOpenid/email; pre-save hook
  requiring at least one contact method
- user/about: add WeChat contact button (open-type=contact) for customer service
2026-06-20 22:38:33 +08:00
yuzhiran 8ee27fdd32 feat: refactor member to pay-per-use gravity purchase; mv webview to clipboard+browser
- member.vue: rewrite from subscription plans (free/growth/sprint) to
  H5-only pay-per-use gravity purchase with quantity selector + QR code
- user.vue: gravity card replacing quota card, add share/contribute/H5-buy
  entry points, plus gravity acquisition modal (share/contribute/buy)
- share.vue: layout fix (flex column), smarter copyLink with cached URL,
  WeChat timeline hint instead of open-type
- share.controller.ts: add GET /:shareCode redirect route (IP record + 302)
- interview.vue: guest mode fix, H5 buy modal, clipboard copy instead of
  webview for mini-program
- App.vue: handleH5UrlParams for ?token=&buy=gravity auto-login
- composables/useGravityPurchase.ts: reusable gravity purchase composable
- remove webview.vue (no longer used), replace with clipboard+browser flow
- AGENTS.md: sync all above changes, fix duplicate numbering
2026-06-20 20:49:15 +08:00
yuzhiran 2fbab1072f feat: unified gravity system - VIP members consume gravity instead of unlimited; add monthly gravity top-up cron 2026-06-19 22:43:52 +08:00
yuzhiran e049be280e fix: auto-copy avatars on build, show masked user ID on profile page 2026-06-18 17:58:54 +08:00
wlt a5c4bcb821 feat: AI 择业顾问 MVP — 专业分析 + 岗位匹配 + 多轮对话
- backend: career-advice module with analyze/chat/positions endpoints
- frontend: career.vue page with profile form, AI advice, recommendation cards
- config/api/pages/user.vue: full integration into existing flow
- docs: PROJECT-STATUS v4.5, FEATURE-LIST v4.3, ROADMAP v4.3
- AGENTS.md: updated module count and career link paths
2026-06-17 10:32:23 +08:00
wlt 4cd889c081 feat: interview review module with whisper.cpp ASR + AI analysis + frontend page
New backend module 'interview-review' provides:
- Audio upload (50MB limit, MP3/M4A/WAV/AAC/OGG/MP4/WebM)
- Text transcript submission
- whisper.cpp local ASR integration (tiny + base models)
- AI analysis (4-dimension scoring: logic/expression/professionalism/stability)
- Speech analysis (filler words detection, pace, duration)
- Async processing pipeline with status polling
- Graceful fallback to mock ASR when whisper unavailable

New frontend page 'pages/review/review.vue' with 3 modes:
- List mode: review history with status indicators
- Upload mode: audio file upload or text paste
- Report mode: score radar, dimension bars, analysis details

Docs updated: PROJECT-STATUS.md v4.4, FEATURE-LIST.md v4.2, ROADMAP.md v4.2
2026-06-16 18:32:25 +08:00
yuzhiran 96c367e0f8 feat: latest code update 2026-06-16 13:18:36 +08:00
yuzhiran 5a49d15696 fix: login state refresh, hero layout, default avatar consistency 2026-06-15 11:04:00 +08:00
yuzhiran 8191cf4b41 feat: realistic face avatar + voice input + ASR endpoint 2026-06-12 15:32:04 +08:00
yuzhiran 9276ab9028 v4.2 冲刺版+每日推送+支付修复+全量代码评审
## 新增功能
- 冲刺版 ¥49.9/月:完整支付→激活→权益扣减链路
- 每日一题定时推送(@nestjs/schedule,早8点微信订阅消息)
- miniprogram-ci 编译上传脚本(scripts/upload-mp.js)

## Bug修复
- 套餐值统一:vip→growth/sprint(interview轮次限制、analyze次数检查)
- member/pay 移除开发绕过:改为订单校验后激活
- progress→report 参数名不匹配:id→interviewId
- result.vue resume.create() 参数传错(对象→独立参数)
- resume.vue analyze请求缺少Authorization header
- bank.vue contribution请求缺少Authorization header
- member.vue startPay() 缺少try/catch导致网络错误崩溃
- login.vue 调试面板 v-if="true" 生产泄漏

## 配置
- 微信支付生产证书就位(商户号1113760598)
- .env 清理冗余文件(删除.example/.production)
- WX_NOTIFY_URL 更新为 zhiyinwx.yzrcloud.cn

## 文档
- PROJECT-STATUS.md v4.1→v4.2,状态全面更新
- DEPLOYMENT.md 新增小程序编译上传章节、清理检查清单
2026-06-09 20:03:05 +08:00
yuzhiran 511f60d0db 初始化:职引项目 v1.0 2026-06-08 16:28:00 +08:00