feat: 新增个人身体画像评估与馆主经营助手
把 3 分钟身体状态评估做成独立获客链路,匿名测评后登录认领完整报告,并接入体验预约与今日待办。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -9,6 +9,7 @@ import type {
|
||||
TeachingScheduleSlot,
|
||||
} from '@mp-pilates/shared'
|
||||
import { get, post, put } from '../utils/request'
|
||||
import { useBodyPortraitStore } from './body-portrait'
|
||||
|
||||
/** Server paginated responses use `data` field, not `items` from the shared type */
|
||||
interface ServerPaginatedResult<T> {
|
||||
@@ -40,7 +41,11 @@ export const useBookingStore = defineStore('booking', () => {
|
||||
}
|
||||
|
||||
async function createBooking(dto: CreateBookingDto) {
|
||||
const result = await post<BookingWithDetails>('/booking', dto as unknown as Record<string, unknown>)
|
||||
const originAssessmentId = dto.originAssessmentId || useBodyPortraitStore().assessmentId || undefined
|
||||
const result = await post<BookingWithDetails>('/booking', {
|
||||
...dto,
|
||||
...(originAssessmentId ? { originAssessmentId } : {}),
|
||||
} as unknown as Record<string, unknown>)
|
||||
return result
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user