//
//  BsConstant.swift
//  BaiSiSMApp
//
//  Created by davidhuang on 2022/10/19.
//  Copyright © 2022 www.davidhuang.com. All rights reserved.
//

import UIKit

// MARK: - 工程中的 常量定义
class YhConstant {
    // MARK: -  URL 相关
    struct URL {

        // MARK: - 帮助与反馈
        static let userQAUrl = YHBaseUrlManager.shared.h5URL() + "landing/index.html#/pages/my/index"

        // MARK: - 优眠用户注销条款
        static let userUnregisterURL = "https://www.baidu.com"

        // MARK: - 隐私政策
        static let privacyURL = YHBaseUrlManager.shared.h5URL() + "landing/index.html#/subpages/personal/pages/protocol/index?classify=privacy"

        // MARK: - 用户协议
        static let userProtocalURL = YHBaseUrlManager.shared.h5URL() + "landing/index.html#/subpages/personal/pages/protocol/index?classify=agreement"
        
        // MARK: - 付费咨询服务协议
        static let payProtocalURL = "https://www.baidu.com"

        // MARK: - 官网地址
        static let officialWebsite = "https://www.sumian.com"


        // MARK: - 量表入口
        static let liangBiaoEntryWebsite = YHBaseUrlManager.shared.h5URL() + "landing/index.html#/pages/medicineCenter/index"


        // MARK: - 通用链接，可以在 Safari 等 web 环境打开 APP，目前主要是提供给微信APP调用
        static let universal_link = "https://sdapi.sumian.com/sleepdoctor/"

        static let wx_universal_link = universal_link + "wx-sign-in/"

        // MARK: - 医学中心
        static let medical_center_url = YHBaseUrlManager.shared.h5URL() + "landing/index.html#/pages/medicineCenter/index"

        
        // MARK: - 文章详情
        static let article_detail_url = YHBaseUrlManager.shared.h5URL() + "landing/index.html#/subpages/platform/pages/articledetail/index?immerse=1"
    }






    // MARK: - 阿里云 手机号一键登录 秘钥信息
    static let kAliOnePressPhoneLoginKey = "pjYDHIVE1Q4qu7QJNI8MaxfvqJQvn5j+Az8xHRlnctj+kUAGf2Hin6ONsTFu1yjCwWPvhmw5NlhFo5DuP1SabykuX1Dz/xl4aDDLQQ5oijBNqRtwmwFAHl/exvfLk6zndWdv3Hi+DUL6gRwAj2UWj1rNXAMP2YSlisC0NSrFFFpiKyHAd2dM2OpIiGh9lkGeihU5iOjv/IycVMW6l2Sx9QqcrKiAX44aPMp0/uS5+y0xYwy/CjV6bvpacHNstxtVFd2Vgi7p454="

    // MARK: - 登录信息
    static let KLoginedInfoKey = "KLoginedInfoKey"

    // MARK: - 上次登录成功后的 手机号码
    static let KLastLoginedSuccessPhoneKey = "KLastLoginedSuccessPhoneKey"

    // MARK: - 登录用户 详情信息
    static let kDetailInfo = "kDetailInfo"

}

extension YhConstant {
    // MARK: - 友盟相关
    struct Wechat {
        static let appKey = "wx57b2a7469d15ff8f"
        static let AppSecret = "e0a351290c66c05f85c54a31b213c1aa"
    }

    struct UM {
        static let appKey = "5a77b807a40fa30f0300008b"
    }

    // MARK: - 支付宝
    struct Alipay {
        static let scheme = "com.usleep.health.alipay"
    }

    // MARK: -  通知相关 名称
    class BsNotification {
        public static let didCancelTaskNotification = Notification.Name(rawValue: "org.alamofire.notification.name.request.didCancelTask")

        //用户详细信息更改成功
        public static let didUpdateUserDetailInfoSuccessNotifiction = Notification.Name(rawValue: "com.usleep.health.updateUserDetailInfo.success")

        //登录成功
        public static let didLoginSuccessNotifiction = Notification.Name(rawValue: "com.usleep.health.login.success")

        //退出成功
        public static let didLoginoutSuccessNotifiction = Notification.Name(rawValue: "com.usleep.health.loginout.success")


        //token 过期
        public static let tokenInvalidateNotifiction = Notification.Name(rawValue: "com.usleep.health.token.invalidate")


        //用户注册 在完成登录、修改密码后需要  填写标签
        public static let needSelectTagsNotification = Notification.Name(rawValue: "com.usleep.health.selecte.tags")

        //跳转安睡主页
        public static let goAnSleepNotification = Notification.Name(rawValue: "com.usleep.health.go.An.sleep")


        //跳转填写量表列表界面
        public static let goFillScaleNotification = Notification.Name(rawValue: "com.usleep.health.go.Fill.Scale")


        //支付结果回调
        public static let payResultNotification = Notification.Name(rawValue: "com.usleep.health.pay.result")


        //隐藏tabBar
        public static let tabBarHideNotification = Notification.Name(rawValue: "com.usleep.health.tabBar.hide")

        //显示tabBar
        public static let tabBarShowNotification = Notification.Name(rawValue: "com.usleep.health.tabBar.show")
        
        //安睡主页切换Tab
        public static let sleepPageChangeTabNotification = Notification.Name(rawValue: "com.usleep.health.sleepPage.changeTab")
        
    }
}
