杨锴
2024-11-09 5415b6659e542b21058428bbc0d38e7f5783815b
XQMuse/Root/Me/VC/LogoutAccountVC.swift
@@ -12,38 +12,28 @@
class LogoutAccountVC: BaseVC {
    @IBOutlet weak var btn_logout: UIButton!
    @IBOutlet weak var webView: WKWebView!
    @IBOutlet weak var label_content: UILabel!
    override func viewDidLoad() {
        super.viewDidLoad()
        title = "注销账号"
        let htmlText = """
<h4>请认真阅读并理解,注销账号将产生以下后果:</h4>
<br/>
<p>1、账号信息、第三方授权、认证身份将被清空和取消;</p>
<p>2、所有使用、收藏、关注列表和购买记录将被清空;</p>
<p>3、账户中所有的余额将被清空;</p>
<p>4、账户对应的会员身份与权益将被取消;</p>
<p>5、您在平台发布的内容将做匿名处理。</p>
<br/>
<p>一经确认,以上内容将无法恢复,请谨慎考虑后决定。</p>
<br/>
<p>根据相关法律法规,注销心泉·疗愈账号并不代表注销前的账号行为和相关责任得到豁免或减轻。</p>
<br/>
<p>提交注销申请后的15日内,后台将进行审核工作,如无问题即可注销成功。在此期间如您登录,则视为取消注销申请</p>
"""
        label_content.attributedText =  AttributedStringbuilder.build().add(string: "请认真阅读并理解,注销账号将产生以下后果:\n", withFont: .systemFont(ofSize: 16, weight: .medium), withColor: .black.withAlphaComponent(0.6),lineSpace: 10)
            .add(string: "1、账号信息、第三方授权、认证身份将被清空和取消;\n2、所有使用、收藏、关注列表和购买记录将被清空;\n3、账户中所有的余额将被清空;\n4、账户对应的会员身份与权益将被取消;\n5、您在平台发布的内容将做匿名处理。\n\n", withFont: .systemFont(ofSize: 14, weight: .medium), withColor: .black.withAlphaComponent(0.6), lineSpace: 7)
            .add(string: "一经确认,以上内容将无法恢复,请谨慎考虑后决定。\n\n", withFont: .systemFont(ofSize: 14, weight: .medium), withColor: .black.withAlphaComponent(0.6),lineSpace: 7)
            .add(string: "根据相关法律法规,注销泉疗愈账号并不代表注销前的账号行为和相关责任得到豁免或减轻。", withFont: .systemFont(ofSize: 14, weight: .medium), withColor: .black.withAlphaComponent(0.6),lineSpace: 7).mutableAttributedString
        webView.loadHTMLString(htmlText.jq_wrapHtml(edge: UIEdgeInsets(top: 0, left: 5, bottom: 0, right: 5)), baseURL: nil)
    }
    @IBAction func completeAction(_ sender: UIButton) {
        Services.deleteUser().subscribe(onNext: {data in
            CommonAlertView.show(title: "提示", content: "注销成功", cancelStr: nil, completeStr: "确定", isSingle: true) { _ in
                sceneDelegate?.needLogin()
                self.navigationController?.popToRootViewController(animated: false)
                DispatchQueue.main.asyncAfter(delay: 0.5) {
                    self.navigationController?.tabBarController?.selectedIndex = 0
            CommonAlertView.show(title: "提示", content: "注销成功", cancelStr: nil, completeStr: "确定", isSingle: true) { state in
                if state{
                    sceneDelegate?.needLogin()
                    self.navigationController?.popToRootViewController(animated: false)
                    DispatchQueue.main.asyncAfter(delay: 0.5) {
                        self.navigationController?.tabBarController?.selectedIndex = 0
                    }
                }
            }
        }).disposed(by: disposeBag)