拆分宣传页视图并扩充 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,71 @@
//
// ScenicPromotionHeaderView.swift
// suixinkan
//
// Created by Codex on 2026/7/2.
//
import SwiftUI
///
struct ScenicPromotionHeaderView: View {
let board: ScenicPromotionBoard
let onQRCodeTap: () -> Void
let onQRCodeLongPress: () -> Void
var body: some View {
ZStack(alignment: .topTrailing) {
VStack(spacing: 7) {
Text("\(board.scenicName) · 排队导览")
.font(.system(size: 26, weight: .heavy))
.foregroundStyle(Color(hex: 0x0E3F91))
.multilineTextAlignment(.center)
.minimumScaleFactor(0.72)
.lineLimit(1)
.shadow(color: .white.opacity(0.55), radius: 0, x: 0, y: 2)
HStack(spacing: 12) {
Rectangle()
.fill(Color(hex: 0x2F80ED, alpha: 0.35))
.frame(width: 36, height: 1)
Text(board.subtitle)
.font(.system(size: 13, weight: .semibold))
.foregroundStyle(Color(hex: 0x1D5DA8))
Rectangle()
.fill(Color(hex: 0x2F80ED, alpha: 0.35))
.frame(width: 36, height: 1)
}
}
.frame(maxWidth: .infinity)
.padding(.top, 8)
.padding(.horizontal, 62)
Button(action: onQRCodeTap) {
ScenicPromotionQRCodeView()
.frame(width: 56, height: 56)
.padding(5)
.background(.white, in: RoundedRectangle(cornerRadius: 9))
.shadow(color: Color(hex: 0x0D47A1, alpha: 0.16), radius: 10, y: 4)
}
.buttonStyle(.plain)
.simultaneousGesture(
LongPressGesture(minimumDuration: 0.7)
.onEnded { _ in onQRCodeLongPress() }
)
.accessibilityLabel("二维码设置入口")
}
.frame(height: 96)
}
}
#if DEBUG
#Preview("顶部标题区") {
ScenicPromotionHeaderView(
board: ScenicPromotionPreviewSupport.sampleBoard,
onQRCodeTap: {},
onQRCodeLongPress: {}
)
.padding(.horizontal, 20)
.background(ScenicPromotionSkyBackground())
}
#endif