拆分宣传页视图并扩充 Mock 数据,合作订单支持获客员备注名并修复线索图片网格尺寸。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@ -0,0 +1,52 @@
|
||||
//
|
||||
// ScenicPromotionSettingsMaterialPointCard.swift
|
||||
// suixinkan
|
||||
//
|
||||
// Created by Codex on 2026/7/2.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
/// 设置页素材所属打卡点选择卡片。
|
||||
struct ScenicPromotionSettingsMaterialPointCard: View {
|
||||
@ObservedObject var viewModel: ScenicPromotionSettingsViewModel
|
||||
|
||||
var body: some View {
|
||||
ScenicPromotionSettingsCard(
|
||||
title: "素材所属打卡点",
|
||||
subtitle: "视频和图片上传前必须先选择,和上方排队绑定点分开管理",
|
||||
icon: "mappin.and.ellipse",
|
||||
tint: Color(hex: 0x22A06B)
|
||||
) {
|
||||
Menu {
|
||||
ForEach(viewModel.materialPoints) { point in
|
||||
Button {
|
||||
viewModel.selectMaterialPoint(point)
|
||||
} label: {
|
||||
Label(
|
||||
"\(point.name) · \(point.areaName)",
|
||||
systemImage: viewModel.selectedMaterialPointID == point.id ? "checkmark.circle.fill" : "circle"
|
||||
)
|
||||
}
|
||||
}
|
||||
} label: {
|
||||
ScenicPromotionSettingsSelectionField(
|
||||
title: viewModel.selectedMaterialPointName,
|
||||
subtitle: viewModel.selectedMaterialPoint == nil ? "未选择" : "已展示当前点位素材",
|
||||
icon: "chevron.down"
|
||||
)
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
#Preview("素材点卡片") {
|
||||
ScenicPromotionSettingsMaterialPointCard(
|
||||
viewModel: ScenicPromotionPreviewSupport.settingsViewModel()
|
||||
)
|
||||
.padding()
|
||||
.background(AppDesign.background)
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user