feat: 登录页密码+验证码双模式 / 首页岗位优化 / 法律页面 / 后端接口完善

- 前端:登录页重构,支持密码登录、验证码登录、注册三种模式
- 前端:首页热门岗位添加「参考示例」标签,去虚构数据
- 前端:面试页顶部优化,岗位名+状态标签展示
- 前端:新增用户协议、隐私政策页面及免责声明
- 后端:新增 POST /api/user/register 注册接口
- 后端:新增 POST /api/user/set-password 设置密码接口
- 后端:修复 user.schema.ts unique 索引导致 null 冲突问题
- 后端:新增 payment-order.schema、positions.schema、site-config.schema
- 后端:package.json 新增 postbuild 脚本自动复制证书
- 管理后台:新增订单管理 Tab
This commit is contained in:
yuzhiran
2026-06-09 15:39:17 +08:00
parent 511f60d0db
commit 37cfdfe93c
27 changed files with 1045 additions and 195 deletions
@@ -0,0 +1,52 @@
import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose'
import { Document } from 'mongoose'
export type PaymentOrderDocument = PaymentOrder & Document
@Schema({ timestamps: true })
export class PaymentOrder {
@Prop({ required: true, index: true })
outTradeNo: string
@Prop({ required: true, index: true })
userId: string
@Prop({ default: '' })
userPhone?: string
@Prop({ required: true })
amount: number // 分
@Prop({ required: true })
title: string
@Prop({ default: '' })
description?: string
// pending | success | failed | refunded | partial_refund
@Prop({ default: 'pending' })
status: string
@Prop({ default: 'native' })
channel: string // native | jsapi
@Prop()
paidAt?: Date
@Prop()
wxTransactionId?: string
// 退款
@Prop({ default: 0 })
refundAmount?: number
@Prop()
refundedAt?: Date
@Prop()
refundReason?: string
}
export const PaymentOrderSchema = SchemaFactory.createForClass(PaymentOrder)
PaymentOrderSchema.index({ createdAt: -1 })
PaymentOrderSchema.index({ status: 1, createdAt: -1 })