文档:补充关键业务代码注释
This commit is contained in:
@@ -320,6 +320,7 @@ const isPastAppointment = (value?: string) => !!value && new Date(value.replace(
|
||||
|
||||
const hasItemIssue = (item: CartItem) => !item.artistId || !item.appointmentTime || isPastAppointment(item.appointmentTime)
|
||||
|
||||
// 购物车结算口径要求单店铺、单美甲师、完整预约信息,避免后端拆单和排班出现歧义。
|
||||
const checkoutIssues = computed<CheckoutIssue[]>(() => {
|
||||
const items = selectedItems.value
|
||||
const issues: CheckoutIssue[] = []
|
||||
@@ -423,6 +424,7 @@ const loadAvailableCoupons = async () => {
|
||||
}
|
||||
|
||||
try {
|
||||
// 这里只做“最佳 VIP 自动券”兜底预选,普通用户券必须显式点选后才会消耗。
|
||||
const tags = new Set<string>()
|
||||
selectedItems.value.forEach(item => {
|
||||
item.tagNames?.split(',').map(tag => tag.trim()).forEach(tag => {
|
||||
@@ -518,6 +520,7 @@ const openBookingModal = async (item: CartItem) => {
|
||||
}
|
||||
|
||||
const loadArtists = async (item: CartItem) => {
|
||||
// 购物车里保存的是后端已经按作品可约范围裁剪过的美甲师列表,这里只做前端展示和 ID 保真。
|
||||
availableArtists.value = Array.isArray(item.availableArtists)
|
||||
? item.availableArtists
|
||||
.filter(artist => artist && artist.id !== undefined && artist.id !== null)
|
||||
|
||||
Reference in New Issue
Block a user