拆分宣传页视图并扩充 Mock 数据,合作订单支持获客员备注名并修复线索图片网格尺寸。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@ -0,0 +1,59 @@
|
||||
//
|
||||
// ScenicPromotionSettingsQueueBindingCard.swift
|
||||
// suixinkan
|
||||
//
|
||||
// Created by Codex on 2026/7/2.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
/// 设置页排队打卡点绑定卡片,支持多选。
|
||||
struct ScenicPromotionSettingsQueueBindingCard: View {
|
||||
@ObservedObject var viewModel: ScenicPromotionSettingsViewModel
|
||||
|
||||
var body: some View {
|
||||
ScenicPromotionSettingsCard(
|
||||
title: "排队打卡点绑定",
|
||||
subtitle: "可多选,用于宣传页展示排队动态",
|
||||
icon: "checklist.checked",
|
||||
tint: AppDesign.primary
|
||||
) {
|
||||
Menu {
|
||||
ForEach(viewModel.queuePoints) { point in
|
||||
Button {
|
||||
viewModel.toggleQueuePoint(point)
|
||||
} label: {
|
||||
Label(
|
||||
"\(point.name) · \(point.areaName)",
|
||||
systemImage: viewModel.selectedQueuePointIDs.contains(point.id) ? "checkmark.circle.fill" : "circle"
|
||||
)
|
||||
}
|
||||
}
|
||||
} label: {
|
||||
ScenicPromotionSettingsSelectionField(
|
||||
title: viewModel.selectedQueuePointNames,
|
||||
subtitle: "\(viewModel.selectedQueuePointIDs.count) 个已选择",
|
||||
icon: "chevron.down"
|
||||
)
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
|
||||
if viewModel.selectedQueuePointIDs.isEmpty {
|
||||
ScenicPromotionSettingsInlineNotice(
|
||||
text: "提交前至少选择一个排队打卡点",
|
||||
tint: AppDesign.warning
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
#Preview("排队绑定卡片") {
|
||||
ScenicPromotionSettingsQueueBindingCard(
|
||||
viewModel: ScenicPromotionPreviewSupport.settingsViewModel()
|
||||
)
|
||||
.padding()
|
||||
.background(AppDesign.background)
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user