拆分宣传页视图并扩充 Mock 数据,合作订单支持获客员备注名并修复线索图片网格尺寸。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-02 17:43:04 +08:00
parent 1b1e93b9ca
commit 328c4321f4
41 changed files with 2529 additions and 1436 deletions

View File

@ -0,0 +1,59 @@
//
// ScenicPromotionMediaToolbarView.swift
// suixinkan
//
// Created by Codex on 2026/7/2.
//
import SwiftUI
/// /
struct ScenicPromotionMediaToolbarView: View {
let selectedMode: ScenicPromotionMediaMode
let onSelectMode: (ScenicPromotionMediaMode) -> Void
var body: some View {
HStack(spacing: 14) {
HStack(spacing: 0) {
ForEach(ScenicPromotionMediaMode.allCases) { mode in
Button {
onSelectMode(mode)
} label: {
HStack(spacing: 6) {
Image(systemName: mode.iconName)
Text(mode.title)
}
.font(.system(size: 14, weight: .bold))
.foregroundStyle(selectedMode == mode ? .white : Color(hex: 0x1B4D91))
.frame(width: 68, height: 34)
.background(
selectedMode == mode
? Color(hex: 0x0B79FF)
: Color.clear
)
.clipShape(Capsule())
}
.buttonStyle(.plain)
}
}
.padding(3)
.background(.white.opacity(0.78), in: Capsule())
.overlay(Capsule().stroke(.white.opacity(0.9), lineWidth: 1))
Spacer()
Label("触屏切换视频/照片,左右滑动查看更多", systemImage: "hand.tap.fill")
.font(.system(size: 12, weight: .semibold))
.foregroundStyle(Color(hex: 0x124E97))
.lineLimit(1)
.minimumScaleFactor(0.58)
}
}
}
#if DEBUG
#Preview("素材切换工具条") {
ScenicPromotionMediaToolbarView(selectedMode: .video, onSelectMode: { _ in })
.padding(.horizontal, 20)
}
#endif