//
|
// LogoutAccountVC.swift
|
// XQMuse
|
//
|
// Created by 无故事王国 on 2024/8/21.
|
//
|
|
import UIKit
|
import JQTools
|
import WebKit
|
|
class LogoutAccountVC: BaseVC {
|
|
@IBOutlet weak var btn_logout: UIButton!
|
@IBOutlet weak var label_content: UILabel!
|
|
override func viewDidLoad() {
|
super.viewDidLoad()
|
title = "注销账号"
|
|
if !isSimulator{
|
Services.getTurn(progress: false).subscribe(onNext: {[weak self]data in
|
guard let weakSelf = self else { return }
|
if let m = data.data,m == true{
|
weakSelf.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
|
}
|
}).disposed(by: disposeBag)
|
}
|
|
|
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、您在平台发布的内容将做匿名处理。\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
|
|
|
}
|
@IBAction func completeAction(_ sender: UIButton) {
|
Services.deleteUser().subscribe(onNext: {data in
|
CommonAlertView.show(title: "提示", content: "注销成功", cancelStr: nil, completeStr: "确定", isSingle: true) { state in
|
if state{
|
UserDefaultSettingViewModel.clearSetting()
|
sceneDelegate?.needLogin()
|
self.navigationController?.popToRootViewController(animated: false)
|
DispatchQueue.main.asyncAfter(delay: 0.5) {
|
self.navigationController?.tabBarController?.selectedIndex = 0
|
}
|
}
|
}
|
}).disposed(by: disposeBag)
|
}
|
|
@IBAction func quitAction(_ sender: UIButton) {
|
self.navigationController?.popViewController()
|
}
|
|
|
override func viewDidLayoutSubviews() {
|
super.viewDidLayoutSubviews()
|
btn_logout.jq_gradientNibColor(colorArr: [UIColor(hexStr: "#8EA47A").cgColor,UIColor(hexStr: "#AFCA98").cgColor], cornerRadius: 20)
|
}
|
}
|