Files
suixinkan_ios_new/suixinkan/Features/ScenicPromotion/Views/ScenicPromotionBackgroundViews.swift

67 lines
1.9 KiB
Swift
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// ScenicPromotionBackgroundViews.swift
// suixinkan
//
// Created by Codex on 2026/7/2.
//
import SwiftUI
/// 绿
struct ScenicPromotionSkyBackground: View {
var body: some View {
GeometryReader { proxy in
ZStack(alignment: .bottom) {
Image("ScenicPromotionBackground")
.resizable()
.scaledToFill()
// scaledToFill
.frame(width: proxy.size.width, height: proxy.size.height)
.clipped()
LinearGradient(
colors: [
Color(hex: 0x1593FF, alpha: 0.16),
Color(hex: 0xBFE9FF, alpha: 0.10),
Color(hex: 0xEAF8FF, alpha: 0.42)
],
startPoint: .top,
endPoint: .bottom
)
LinearGradient(
colors: [Color.clear, Color(hex: 0x62BA4C, alpha: 0.18)],
startPoint: .top,
endPoint: .bottom
)
.frame(height: 260)
}
.frame(width: proxy.size.width, height: proxy.size.height)
.clipped()
}
}
}
///
struct ScenicPromotionQRCodeView: View {
var body: some View {
Image("ScenicPromotionQRCode")
.resizable()
.scaledToFit()
}
}
#if DEBUG
#Preview("宣传页背景") {
ScenicPromotionSkyBackground()
.ignoresSafeArea()
}
#Preview("宣传页二维码") {
ScenicPromotionQRCodeView()
.frame(width: 56, height: 56)
.padding()
.background(.white)
}
#endif