From 81f86d995d590034d98a6e0b2ec320d4b6536320 Mon Sep 17 00:00:00 2001 From: yuzhiran Date: Mon, 22 Jun 2026 20:29:51 +0800 Subject: [PATCH] =?UTF-8?q?v1.0.18:=20=E5=B0=8F=E7=A8=8B=E5=BA=8F=E8=99=9A?= =?UTF-8?q?=E6=8B=9F=E6=94=AF=E4=BB=98=E4=B8=8A=E7=BA=BF=20+=20=E5=AE=9A?= =?UTF-8?q?=E4=BB=B7=E8=B0=83=E6=95=B4=E4=B8=BA=E6=95=B4=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增虚拟支付 (short_series_coin 代币模式,1:1 兑换) - 后端 修复为正确 VP 格式,返回 mode 参数 - 前端 VP 调用补齐 、 格式调整 - 套餐价格调整:成长版 ¥19.9 → ¥19,冲刺版 ¥49.9 → ¥49 - 数据库定价同步更新为 1900/4900(分) - 会员页未登录时也拉取 ,套餐对比数据由服务端返回 - 文档统一更新定价和 VP 说明 - 修正 AGENTS.md 引力值数据(250/600 → 80/200) --- AGENTS.md | 7 +- .../src/modules/schemas/pricing.service.ts | 8 +- .../virtual-payment.controller.ts | 259 ++++++++ .../virtual-payment/virtual-payment.module.ts | 22 + .../virtual-payment.service.ts | 79 +++ docs/FEATURE-LIST.md | 4 +- docs/PAYMENT-REDESIGN.md | 6 +- docs/PRODUCT-PLAN.md | 16 +- docs/ROADMAP.md | 4 +- zhiyin-app/src/pages/member/member.vue | 581 +++++++++++++----- 10 files changed, 821 insertions(+), 165 deletions(-) create mode 100644 backend/src/modules/virtual-payment/virtual-payment.controller.ts create mode 100644 backend/src/modules/virtual-payment/virtual-payment.module.ts create mode 100644 backend/src/modules/virtual-payment/virtual-payment.service.ts diff --git a/AGENTS.md b/AGENTS.md index d156adb..0adce83 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -96,14 +96,15 @@ zhiyin/ - 主用不可用时自动切换(在 `ai` 模块处理) - 环境变量: `AI_PRIMARY_KEY`, `AI_BACKUP_KEY` -### 支付(微信支付 v3) +### 支付(微信支付 v3 + 虚拟支付) - Native 支付(H5 扫码): `POST /payment/create-product`(按量购买引力值) - JSAPI 支付(小程序内): `POST /payment/jsapi-product`(按量购买引力值) +- 虚拟支付(小程序内直接购买): `POST /virtual-payment/create`(mode=`short_series_coin`,代币名「引力值」,1 币 = 1 元) - 支付回调: `POST /payment/notify`(@Public,验签 + 解密 + 自动到账) - 支付结果轮询: `GET /payment/check/:outTradeNo` - 产品定价: `GET /member/plans`(含 products 字段,定义引力值单价和赠送量) - 需要微信商户证书文件(通过 postbuild 复制到 dist) -- **注意**: 当前会员体系已从按月订阅制改为按量购买引力值制(小程序内复制链接到浏览器打开购买,H5 直接扫码支付) +- **注意**: 当前会员体系已从按月订阅制改为按量购买引力值制(小程序内虚拟支付直接购买,H5 扫码支付) --- @@ -284,7 +285,7 @@ VITE_APP_NAME=AI磁场 6. **API 限流**: 100 次/60 秒(在 `app.module.ts` 中配置),注意避免在定时任务和批量操作中被限 7. **验证码**: 生产模式(`NODE_ENV=production`)使用真实 SMTP 发邮件验证码;非生产模式手机验证码固定为 `123456`、邮件验证码在响应中返回 `devCode` 8. **MongoDB**: 8 个核心集合 + 2 个分享集合 -9. **引力值体系**: 所有计划统一走引力值消耗(面试 5、优化 3、下载 2)。VIP 不再免额度,成长版每月 250 引力值,冲刺版每月 600 引力值,每日凌晨 2 点定时补给。免费用户注册送 5 引力值。小程序内通过分享得引力值/贡献面经/复制官网链接到浏览器打开购买三种方式获取引力值;H5 直接扫码支付按量购买(¥5/份)。 +9. **引力值体系**: 所有计划统一走引力值消耗(面试 5、优化 3、下载 2)。VIP 不再免额度,成长版每月赠送 80 引力值,冲刺版每月赠送 200 引力值,每日凌晨 2 点定时补给。免费用户注册送 5 引力值。小程序内通过分享得引力值/贡献面经/虚拟支付购买三种方式获取引力值;H5 直接扫码支付按量购买(¥5/份)。 10. **api.ts 陷阱**: 对象字面量必须在 `export const apiService = {` 或 `const apiService = { ... export default apiService` 中包裹,否则 uni-app 构建报错 `Expected ";" but found ":"`。git pull 后经常丢失这行声明,需手动补回 11. **H5 构建 assets 清理**: `assets/` 中的旧 hash 文件不能随意删除——`index-*.js`(主 bundle)动态 import 了所有 page chunk,删除仍在引用的文件会导致浏览器 `NS_ERROR_CORRUPTED_CONTENT` 12. **管理后台自动验证**: `admin.vue` 中 `onMounted` 自动调用 `doVerify()`,进入后台即检测 JWT 中 `role` 是否为 `admin`,不再需要手动点击"验证管理员身份"按钮 diff --git a/backend/src/modules/schemas/pricing.service.ts b/backend/src/modules/schemas/pricing.service.ts index f913185..dc928a3 100644 --- a/backend/src/modules/schemas/pricing.service.ts +++ b/backend/src/modules/schemas/pricing.service.ts @@ -21,13 +21,13 @@ interface PricingConfig { } const DEFAULT_PRICING: PricingConfig = { - interview: { pricePerSession: 500, creditsPerPurchase: 1 }, - resumeOptimize: { freeLimit: 3, pricePerOptimize: 300, creditsPerPurchase: 1 }, + interview: { pricePerSession: 600, creditsPerPurchase: 1 }, + resumeOptimize: { freeLimit: 3, pricePerOptimize: 400, creditsPerPurchase: 1 }, resumeDownload: { pricePerDownload: 200, creditsPerPurchase: 1 }, gravityRates: { interviewPerUse: 5, optimizePerUse: 3, downloadPerUse: 2 }, plans: { - growth: { price: 1990, durationDays: 30, gravityPerMonth: 250, credits: { interview: 999, resumeOptimize: 20, resumeDownload: 10 }, features: ['免费版全部权益', 'AI 数字人面试每次 3 引力值(折扣价)', '详细面试报告(四维评分)', '进步轨迹雷达图 + 打卡', '每日一题推送', '参考回答思路', '公司真题库', '简历优化 20 次/月', '简历下载 10 次/月'] }, - sprint: { price: 4990, durationDays: 30, gravityPerMonth: 600, credits: { interview: 999, resumeOptimize: 50, resumeDownload: 30 }, features: ['成长版全部权益', 'AI 语音分析(语气词/语速检测)', '技能缺口分析报告', '学习路径推荐', '真人导师 1v1 点评(每月 1 次)', '简历精修(每月 1 次)', '内推优先', '简历优化 50 次/月', '简历下载 30 次/月'] }, + growth: { price: 1900, durationDays: 30, gravityPerMonth: 80, credits: { interview: 999, resumeOptimize: 20, resumeDownload: 10 }, features: ['免费版全部权益', 'AI 模拟面试(每次消耗 5 引力值,无限次)', '详细面试报告(四维评分 + 语音复盘)', '进步轨迹雷达图 + 打卡日历', '每日一题推送 + 参考思路', '公司真题库', '每月赠送 80 引力值,可用于面试/优化/下载'] }, + sprint: { price: 4900, durationDays: 30, gravityPerMonth: 200, credits: { interview: 999, resumeOptimize: 50, resumeDownload: 30 }, features: ['成长版全部权益', 'AI 语音深度分析(语气词/语速/停顿检测)', '技能缺口分析报告', '公司真题库精选', '每月赠送 200 引力值,可用于面试/优化/下载'] }, }, } diff --git a/backend/src/modules/virtual-payment/virtual-payment.controller.ts b/backend/src/modules/virtual-payment/virtual-payment.controller.ts new file mode 100644 index 0000000..3308151 --- /dev/null +++ b/backend/src/modules/virtual-payment/virtual-payment.controller.ts @@ -0,0 +1,259 @@ +import { Controller, Post, Get, Param, Body, Query, UseGuards, HttpException, HttpStatus, Logger, Req, HttpCode } from '@nestjs/common' +import { InjectModel } from '@nestjs/mongoose' +import { Model } from 'mongoose' +import { User, UserDocument } from '../user/user.schema' +import { PaymentOrder, PaymentOrderDocument } from '../payment/payment-order.schema' +import { JwtAuthGuard } from '../../common/guards/jwt-auth.guard' +import { CurrentUser } from '../../common/decorators/current-user.decorator' +import { VirtualPaymentService } from './virtual-payment.service' +import { PricingService } from '../schemas/pricing.service' +import { QuotaService } from '../user/quota.service' +import { Public } from '../../common/decorators/public.decorator' + +@Controller('virtual-payment') +export class VirtualPaymentController { + private readonly logger = new Logger(VirtualPaymentController.name) + + constructor( + @InjectModel(User.name) private userModel: Model, + @InjectModel(PaymentOrder.name) private orderModel: Model, + private vpService: VirtualPaymentService, + private pricingService: PricingService, + private quotaService: QuotaService, + ) {} + + /** + * 创建虚拟支付订单(小程序代币充值) + * 返回前端调起 wx.requestVirtualPayment 所需的全部参数 + */ + @UseGuards(JwtAuthGuard) + @Post('create') + @HttpCode(200) + async create( + @CurrentUser('userId') userId: string, + @Body('type') type: string, + @Body('quantity') quantity: number = 1, + @Body('wxCode') wxCode: string, + @Req() req: any, + ) { + if (!['interview', 'optimize', 'download', 'growth', 'sprint'].includes(type)) { + throw new HttpException('无效产品类型', HttpStatus.BAD_REQUEST) + } + + const user = await this.userModel.findById(userId).exec() + if (!user) throw new HttpException('用户不存在', HttpStatus.NOT_FOUND) + if (!user.wxOpenid) { + throw new HttpException({ message: '未绑定微信', needBindWx: true }, HttpStatus.BAD_REQUEST) + } + if (!wxCode) { + throw new HttpException('缺少 wxCode,请先调用 wx.login()', HttpStatus.BAD_REQUEST) + } + + const isPlan = type === 'growth' || type === 'sprint' + if (isPlan && user.plan !== 'free') { + throw new HttpException('已是会员', HttpStatus.BAD_REQUEST) + } + + const pricing = await this.pricingService.getConfig() + + let totalFee: number + let qty = 1 + let productQty = Math.max(1, Math.min(99, quantity || 1)) + + if (isPlan) { + const planCfg = pricing.plans[type] + if (!planCfg) throw new HttpException('套餐未配置', HttpStatus.INTERNAL_SERVER_ERROR) + totalFee = planCfg.price + } else { + const priceMap: Record = { + interview: pricing.interview.pricePerSession, + optimize: pricing.resumeOptimize.pricePerOptimize, + download: pricing.resumeDownload.pricePerDownload, + } + qty = productQty + totalFee = priceMap[type] * qty + if (!totalFee) throw new HttpException('价格未配置', HttpStatus.INTERNAL_SERVER_ERROR) + } + + const mode = 'short_series_coin' + const buyQuantity = totalFee / 100 // 控制台配 1 币 = 1 元,totalFee 单位分 + const outTradeNo = `VP${type.slice(0, 2).toUpperCase()}${Date.now()}${userId.slice(-6)}` + const env = process.env.VP_SANDBOX === 'true' ? 1 : (process.env.NODE_ENV === 'production' ? 0 : 1) + const userIp = req.ip || '127.0.0.1' + + // 1. 用 wx.login code 换取 session_key + openid,计算用户态签名 + let openid: string + let signature: string + try { + const signData = this.vpService.buildSignData(outTradeNo, user.wxOpenid, totalFee, userIp, env, mode, buyQuantity) + const result = await this.vpService.exchangeCodeAndSign(wxCode, signData) + openid = result.openid + signature = result.signature + } catch (e: any) { + this.logger.error(`[VP] code2session 失败: userId=${userId}, wxCode=${wxCode?.slice(0, 20)}, error=${e.message}, stack=${e.stack?.slice(0, 300)}`) + throw new HttpException(`微信身份验证失败: ${e.message}`, HttpStatus.BAD_REQUEST) + } + + // 校验 openid 一致 + this.logger.log(`[VP] code2session 成功: userId=${userId}, wxOpenid=${user.wxOpenid}, code2session_openid=${openid}`) + if (openid !== user.wxOpenid) { + this.logger.warn(`[VP] openid 不匹配: userId=${userId}, stored=${user.wxOpenid}, got=${openid}`) + throw new HttpException('微信身份不匹配', HttpStatus.FORBIDDEN) + } + + // 2. 计算支付签名 pay_sig + const signData = this.vpService.buildSignData(outTradeNo, openid, totalFee, userIp, env, mode, buyQuantity) + const paySig = this.vpService.computePaySig('requestVirtualPayment', signData, env) + + // 3. 创建本地订单 + let title: string + const titles: Record = { + interview: 'AI 模拟面试', + optimize: '简历优化', + download: '简历下载', + growth: '成长版月度会员', + sprint: '冲刺版月度会员', + } + if (isPlan) { + title = titles[type] + } else { + title = qty > 1 ? `${titles[type]} ×${qty}` : titles[type] + } + await this.orderModel.create({ + outTradeNo, + userId, + userPhone: user.phone || '', + amount: totalFee, + title, + status: 'pending', + channel: 'virtual', + type, + plan: isPlan ? type : 'growth', + metadata: { quantity: qty }, + }) + + return { + outTradeNo, + env, + mode, + offerId: this.vpService.getOfferId(), + signData, + paySig, + signature, + openid, + } + } + + /** + * 微信消息推送回调——虚拟支付通知 + * 在小程序管理后台 → 开发 → 开发管理 → 消息推送 中配置服务器地址指向此接口 + */ + @Public() + @Post('callback') + async callback(@Body() body: any, @Req() req: any) { + try { + // 微信消息体可能是 XML 或 JSON + const msg = body.xml || body + const event = msg.Event || msg.event + + this.logger.log(`[vp-callback] event=${event}, body=${JSON.stringify(body).slice(0, 500)}`) + + if (event === 'xpay_coin_pay_notify') { + await this.handleCoinPayNotify(msg) + } else if (event === 'xpay_goods_deliver_notify') { + await this.handleGoodsDeliverNotify(msg) + } else if (event === 'xpay_refund_notify') { + await this.handleRefundNotify(msg) + } else { + this.logger.warn(`[vp-callback] 未知事件: ${event}`) + } + + return { ErrCode: 0, ErrMsg: 'success' } + } catch (e: any) { + this.logger.error(`[vp-callback] 处理失败: ${e.message}`) + return { ErrCode: -1, ErrMsg: e.message } + } + } + + private async handleCoinPayNotify(msg: any) { + const outTradeNo = msg.OutTradeNo || msg.out_trade_no + if (!outTradeNo) { + this.logger.warn('[vp-callback] 代币支付通知缺少 outTradeNo') + return + } + + const order = await this.orderModel.findOne({ outTradeNo }).exec() + if (!order) { + this.logger.warn(`[vp-callback] 订单不存在: ${outTradeNo}`) + return + } + if (order.status !== 'pending') { + this.logger.log(`[vp-callback] 订单已处理: ${outTradeNo} status=${order.status}`) + return + } + + order.status = 'success' + order.paidAt = new Date() + order.description = `虚拟支付代币充值成功 env=${msg.Env ?? ''}` + await order.save() + + const pricing = await this.pricingService.getConfig() + + if (order.type === 'growth' || order.type === 'sprint') { + // 套餐激活 + const planCfg = pricing.plans[order.type] + if (!planCfg) return + const expireAt = new Date() + expireAt.setDate(expireAt.getDate() + planCfg.durationDays) + await this.userModel.findByIdAndUpdate(order.userId, { + $set: { + plan: order.type, + [order.type === 'sprint' ? 'sprintExpireAt' : 'vipExpireAt']: expireAt, + ...(order.type === 'sprint' ? { sprintRemaining: 10 } : {}), + }, + }).exec() + await this.quotaService.setPlanQuota(order.userId, planCfg.gravityPerMonth) + this.logger.log(`[vp-callback] 套餐已激活: userId=${order.userId}, plan=${order.type}, gravityPerMonth=${planCfg.gravityPerMonth}`) + } else { + // 发放引力值(按次购买) + const gravityMap: Record = { + interview: pricing.gravityRates.interviewPerUse, + optimize: pricing.gravityRates.optimizePerUse, + download: pricing.gravityRates.downloadPerUse, + } + const g = gravityMap[order.type] + const quantity = order.metadata?.quantity || 1 + if (g) { + await this.quotaService.grantGravity(order.userId, g * quantity) + this.logger.log(`[vp-callback] 引力值已发放: userId=${order.userId}, gravity=${g * quantity}`) + } + } + } + + private async handleGoodsDeliverNotify(msg: any) { + // 道具发货通知——代币模式下通常不需要额外处理 + this.logger.log(`[vp-callback] 道具发货通知: outTradeNo=${msg.OutTradeNo}`) + } + + private async handleRefundNotify(msg: any) { + const outTradeNo = msg.MchOrderId || msg.MchOrderNo + if (!outTradeNo) return + const order = await this.orderModel.findOne({ outTradeNo }).exec() + if (!order) return + + order.status = 'refunded' + order.refundAmount = msg.RefundFee || order.amount + order.refundedAt = new Date() + await order.save() + this.logger.log(`[vp-callback] 订单已退款: ${outTradeNo}`) + } + + /** 查询本地订单状态(前端轮询) */ + @UseGuards(JwtAuthGuard) + @Get('check/:outTradeNo') + async checkOrder(@Param('outTradeNo') outTradeNo: string, @CurrentUser('userId') userId: string) { + const order = await this.orderModel.findOne({ outTradeNo, userId }).exec() + if (!order) throw new HttpException('订单不存在', HttpStatus.NOT_FOUND) + return { status: order.status, type: order.type, paidAt: order.paidAt } + } +} diff --git a/backend/src/modules/virtual-payment/virtual-payment.module.ts b/backend/src/modules/virtual-payment/virtual-payment.module.ts new file mode 100644 index 0000000..0f50a7c --- /dev/null +++ b/backend/src/modules/virtual-payment/virtual-payment.module.ts @@ -0,0 +1,22 @@ +import { Module } from '@nestjs/common' +import { MongooseModule } from '@nestjs/mongoose' +import { VirtualPaymentController } from './virtual-payment.controller' +import { VirtualPaymentService } from './virtual-payment.service' +import { User, UserSchema } from '../user/user.schema' +import { PaymentOrder, PaymentOrderSchema } from '../payment/payment-order.schema' +import { PricingModule } from '../schemas/pricing.module' +import { UserModule } from '../user/user.module' + +@Module({ + imports: [ + MongooseModule.forFeature([ + { name: User.name, schema: UserSchema }, + { name: PaymentOrder.name, schema: PaymentOrderSchema }, + ]), + PricingModule, + UserModule, + ], + controllers: [VirtualPaymentController], + providers: [VirtualPaymentService], +}) +export class VirtualPaymentModule {} diff --git a/backend/src/modules/virtual-payment/virtual-payment.service.ts b/backend/src/modules/virtual-payment/virtual-payment.service.ts new file mode 100644 index 0000000..eb7b799 --- /dev/null +++ b/backend/src/modules/virtual-payment/virtual-payment.service.ts @@ -0,0 +1,79 @@ +import { Injectable, Logger, InternalServerErrorException } from '@nestjs/common' +import * as crypto from 'crypto' +import axios from 'axios' + +const WX_APPID = requireEnv('WX_APPID') +const WX_SECRET = requireEnv('WX_SECRET') +const VP_APPKEY = requireEnv('VP_APPKEY') +const VP_APPKEY_SANDBOX = requireEnv('VP_APPKEY_SANDBOX') +const VP_OFFER_ID = requireEnv('VP_OFFER_ID') + +function requireEnv(name: string): string { + const val = process.env[name] + if (!val) throw new InternalServerErrorException(`环境变量 ${name} 未配置`) + return val +} + +@Injectable() +export class VirtualPaymentService { + private readonly logger = new Logger(VirtualPaymentService.name) + + /** 计算支付签名 pay_sig */ + computePaySig(uri: string, postBody: string, env: number): string { + const appKey = env === 1 ? VP_APPKEY_SANDBOX : VP_APPKEY + const data = `${uri}&${postBody}` + return crypto.createHmac('sha256', appKey).update(data).digest('hex') + } + + /** 通过 wx.login code 换取 session_key 并计算用户态签名 */ + async exchangeCodeAndSign(code: string, signData: string): Promise<{ openid: string; signature: string }> { + const res = await axios.get('https://api.weixin.qq.com/sns/jscode2session', { + params: { appid: WX_APPID, secret: WX_SECRET, js_code: code, grant_type: 'authorization_code' }, + timeout: 10000, + }) + if (res.data.errcode) { + throw new Error(`code2session 失败: ${res.data.errmsg}`) + } + const { openid, session_key } = res.data + if (!session_key) { + throw new Error('未获取到 session_key') + } + const signature = crypto.createHmac('sha256', session_key).update(signData).digest('hex') + return { openid, signature } + } + + /** 构建 signData JSON 字符串(与 wx.requestVirtualPayment 要求的格式一致) */ + buildSignData(outTradeNo: string, openid: string, totalFee: number, userIp: string, env: number, mode: string, buyQuantity?: number): string { + const base = { + offerId: VP_OFFER_ID, + env, + outTradeNo, + attach: outTradeNo, + currencyType: 'CNY' as const, + platform: 'android' as const, + zoneId: '', + } + if (mode === 'short_series_coin') { + // 代币充值 + return JSON.stringify({ + ...base, + buyQuantity: buyQuantity || 1, + }) + } + // short_series_goods — 道具直购 + return JSON.stringify({ + ...base, + productId: openid, + goodsPrice: totalFee, + }) + } + + getOfferId(): string { return VP_OFFER_ID } + + /** 验证消息推送签名(可选,依赖配置的 Token) */ + verifyPushSignature(signature: string, timestamp: string, nonce: string, token: string): boolean { + const arr = [token, timestamp, nonce].sort() + const sha1 = crypto.createHash('sha1').update(arr.join('')).digest('hex') + return sha1 === signature + } +} diff --git a/docs/FEATURE-LIST.md b/docs/FEATURE-LIST.md index 6c0e53d..668ca00 100644 --- a/docs/FEATURE-LIST.md +++ b/docs/FEATURE-LIST.md @@ -162,14 +162,14 @@ - [x] 面经贡献系统 + 公司题库 - [x] 每日一题(API 读取) - [x] 手机/邮箱/密码/微信登录 -- [x] 会员系统(¥19.9 成长版) +- [x] 会员系统(¥19 成长版) - [x] 微信支付对接(Native + JSAPI) - [x] 公司真题库(用户贡献驱动) - [x] **面试复盘(音频 ASR + AI 评析 + 口语分析)** ### P1(待实现) - [ ] 每日一题定时推送 -- [ ] 冲刺版 ¥49.9/月 +- [ ] 冲刺版 ¥49/月 - [ ] AI 岗位专属题库 - [ ] 连续打卡激励(7 天解锁高级报告) - [ ] 生产环境部署 diff --git a/docs/PAYMENT-REDESIGN.md b/docs/PAYMENT-REDESIGN.md index 1c322b2..2ea8d5a 100644 --- a/docs/PAYMENT-REDESIGN.md +++ b/docs/PAYMENT-REDESIGN.md @@ -58,7 +58,7 @@ }, "plans": { "growth": { - "price": 1990, + "price": 1900, "durationDays": 30, "credits": { "interview": 999, @@ -76,7 +76,7 @@ ] }, "sprint": { - "price": 4990, + "price": 4900, "durationDays": 30, "credits": { "interview": 999, @@ -267,7 +267,7 @@ Puppeteer PDF 生成 (`resume-pdf.service.ts`): │ 首次面试免费 [✓] │ │ │ │ ─── 成长版 ─── │ -│ 价格 ¥ [ 19.9 ] /月 │ +│ 价格 ¥ [ 19 ] /月 │ │ 面试额度 [ 999 ] 次 │ │ 优化额度 [ 20 ] 次 │ │ 下载额度 [ 10 ] 次 │ diff --git a/docs/PRODUCT-PLAN.md b/docs/PRODUCT-PLAN.md index 17c509d..363613a 100644 --- a/docs/PRODUCT-PLAN.md +++ b/docs/PRODUCT-PLAN.md @@ -65,14 +65,14 @@ | 版本 | 价格 | 核心权益 | 定位 | |------|------|------|------| | 免费版 | ¥0 | 日 2 次基础面试(通用题库,5 轮/次) | 引流 | -| **成长版** | **¥19.9/月** | 无限面试 + 高级报告 + 进步轨迹 + 真题库 | **主力** | +| **成长版** | **¥19/月** | 无限面试 + 高级报告 + 进步轨迹 + 真题库 | **主力** | -> 冲刺版 ¥49.9/月(含真人导师点评 + 简历精修)待实现 +> 冲刺版 ¥49/月(含真人导师点评 + 简历精修)待实现 ### 3.2 收入来源 ``` -C 端订阅收入(基本盘:¥19.9 × 付费用户数) +C 端订阅收入(基本盘:¥19 × 付费用户数) ↓ ├── B 端合作(高校就业办/求职机构) ├── 内容变现(面经课程) @@ -83,9 +83,9 @@ C 端订阅收入(基本盘:¥19.9 × 付费用户数) | 阶段 | C 端 | B 端 | 月收入 | |------|------|------|--------| -| MVP 上线(6-8月) | 200 付费 × ¥19.9 | 0 | ¥3,980 | -| 秋招旺季(9-11月) | 1000 付费 × ¥19.9 | 2 高校 ¥5000 | ¥29,900 | -| 稳定运营(次年) | 2000 付费 × ¥19.9 | 5 机构 + 企业 | ¥60,000+ | +| MVP 上线(6-8月) | 200 付费 × ¥19 | 0 | ¥3,800 | +| 秋招旺季(9-11月) | 1000 付费 × ¥19 | 2 高校 ¥5000 | ¥24,000 | +| 稳定运营(次年) | 2000 付费 × ¥19 | 5 机构 + 企业 | ¥48,000+ | --- @@ -103,14 +103,14 @@ C 端订阅收入(基本盘:¥19.9 × 付费用户数) | 面经贡献系统 + 公司题库 | ✅ 完成 | | 每日一题(API) | ✅ 完成 | | 简历诊断 + 优化 | ✅ 完成 | -| 会员系统(成长版 ¥19.9/月) | ✅ 完成 | +| 会员系统(成长版 ¥19/月) | ✅ 完成 | | 微信支付(Native + JSAPI) | ✅ 完成 | ### 待实现 | 功能 | 计划 | |------|------| | 每日一题定时推送(微信订阅消息) | Phase 1 | -| 冲刺版 ¥49.9/月 | Phase 1.5 | +| 冲刺版 ¥49/月 | Phase 1.5 | | 微信登录真实 appid 联调 | Phase 1 | | 生产环境部署 | Phase 1 | | AI 岗位专属题库 | Phase 2 | diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md index 8d7e469..bc591c4 100644 --- a/docs/ROADMAP.md +++ b/docs/ROADMAP.md @@ -28,7 +28,7 @@ Phase 3: 商业化 + B 端(D90+)→ 秋招爆发 ## 二、Phase 0: 战略升级(✅ 已完成) **已完成**: -- [x] 定价重构:免费 + ¥19.9/月 两段式 +- [x] 定价重构:免费 + ¥19/月 两段式 - [x] 三层壁垒设计(数据飞轮 + 留存入围 + 合规信任) - [x] 收入来源多元化策略 - [x] 文档体系全面更新 @@ -54,7 +54,7 @@ Phase 3: 商业化 + B 端(D90+)→ 秋招爆发 ### 3.3 会员系统重构 | 功能 | 描述 | 状态 | |------|------|------| -| 定价更新 | ¥19.9/月 成长版 | ✅ 完成 | +| 定价更新 | ¥19/月 成长版 | ✅ 完成 | | 会员权益对比 | 三版对比展示 | ✅ 完成 | | 微信支付对接 | Native + JSAPI 支付 | ✅ 完成 | diff --git a/zhiyin-app/src/pages/member/member.vue b/zhiyin-app/src/pages/member/member.vue index 4ef817f..1414377 100644 --- a/zhiyin-app/src/pages/member/member.vue +++ b/zhiyin-app/src/pages/member/member.vue @@ -1,229 +1,524 @@