PulseFailedReasonView.swift 2.58 KB
//
//  PulseFailedReasonView.swift
//  hippo-watch Watch App
//
//  Created by shihao on 2025/10/22.
//

import Foundation
import SwiftUI

struct PulseFailedReasonView: View {
    @Binding var isPresent: Bool
    var body: some View {
        ZStack {
            LinearGradient(colors: [.init(hex: "#D1BDFF"),
                                    .init(hex: "#F7F3FF"),
            ],
                           startPoint: .top,
                           endPoint: .bottom)
            .ignoresSafeArea()
            
            ScrollView {
                VStack(alignment: .leading, spacing: 0) {
                    HStack {
                        Spacer()
                        Text("诊脉失败原因")
                            .wenyiheiFont(size: 14)
                            .foregroundColor(.init(hex: "#2C2020"))
                        Spacer()
                    }
                    
                    Text("1、健康权限未开启")
                        .wenyiheiFont(size: 12)
                        .foregroundColor(.init(hex: "#896CDC"))
                        .padding(.top, 12)
                    
                    Text(
    """
    手机端开启路径
    打开健康应用→共享→找到
    DoubleFeel→全部打开手表端检查
    打开系统设置→健康→app服务→
    找到DoubleFeel→全部打开
    """
                    )
                    .font(.custom("Songti SC Bold", size: 11))
                    .foregroundColor(.init(hex: "#2C2020"))
                    .padding(.top, 6)
                    
                    Text("2、设备佩戴过松,未紧贴手腕")
                        .wenyiheiFont(size: 12)
                        .foregroundColor(.init(hex: "#896CDC"))
                        .padding(.top, 16)
                    
                    Text("完成以上检查后\n请点击开始诊脉重新测量")
                        .font(.custom("Songti SC Bold", size: 9))
                        .foregroundColor(.init(hex: "#896CDC"))
                        .multilineTextAlignment(.center)
                        .padding(.vertical, 9)
                        .frame(maxWidth: .infinity)
                        .background(Color(hex: "#DECFFF"))
                        .cornerRadius(16)
                        .padding(.bottom, 28)
                        .padding(.top, 16)
                        .onTapGesture {
                            isPresent = false
                        }
                    
                        
                }
                .padding(.horizontal, 12)
            }
        }
    }
}