//
|
// MeVC.swift
|
// DolphinEnglishLearnStudent
|
//
|
// Created by 无故事王国 on 2024/5/22.
|
//
|
|
import UIKit
|
import QMUIKit
|
|
class MeVC: BaseVC {
|
@IBOutlet weak var btn_address: QMUIButton!
|
@IBOutlet weak var btn_coinRecord: QMUIButton!
|
@IBOutlet weak var btn_exchangeRecord: QMUIButton!
|
@IBOutlet weak var btn_share: QMUIButton!
|
@IBOutlet weak var btn_etudyRecord: QMUIButton!
|
@IBOutlet weak var imge_cover: UIImageView!
|
@IBOutlet weak var label_name: UILabel!
|
@IBOutlet weak var label_info: UILabel!
|
|
override func viewDidLoad() {
|
super.viewDidLoad()
|
|
Services.userInfo().subscribe(onNext: {result in
|
if let model = result.data{
|
self.imge_cover.sd_setImage(with: URL(string: model.headImg))
|
self.label_name.text = model.name
|
// var items = Array<String>()
|
// items.append("剩余积分:\(model.integral)")
|
// items.append("学习进度:\(model.integral)")
|
}
|
}).disposed(by: disposeBag)
|
}
|
|
|
override func setUI() {
|
super.setUI()
|
btn_address.spacingBetweenImageAndTitle = 11
|
btn_coinRecord.spacingBetweenImageAndTitle = 11
|
btn_exchangeRecord.spacingBetweenImageAndTitle = 11
|
btn_share.spacingBetweenImageAndTitle = 11
|
btn_etudyRecord.spacingBetweenImageAndTitle = 11
|
|
btn_address.imagePosition = .top
|
btn_coinRecord.imagePosition = .top
|
btn_exchangeRecord.imagePosition = .top
|
btn_share.imagePosition = .top
|
btn_etudyRecord.imagePosition = .top
|
|
}
|
|
/// 地址管理
|
@IBAction func addressManageAction(_ sender: QMUIButton) {
|
let vc = AddressManageVC(type: .handle)
|
vc.title = "地址管理"
|
push(vc: vc)
|
}
|
|
@IBAction func coinHistoryAction(_ sender: QMUIButton) {
|
let vc = CoinRecordHistoryVC()
|
vc.title = "积分明细"
|
push(vc: vc)
|
}
|
|
@IBAction func exchangeHistoryAction(_ sender: QMUIButton) {
|
let vc = ExchangeRecordHistoryVC()
|
vc.title = "兑换记录"
|
push(vc: vc)
|
}
|
|
@IBAction func studyRecord(_ sender: QMUIButton) {
|
let vc = StudyVC()
|
vc.title = "学习记录"
|
push(vc: vc)
|
}
|
|
@IBAction func shareAction(_ sender: QMUIButton) {
|
|
}
|
|
@IBAction func quitAction(_ sender: UIButton) {
|
CommonAlertView.show(content: "确认退出当前账户吗?") {
|
Services.logoutStudy().subscribe(onNext: {result in
|
sceneDelegate?.needLogin()
|
}).disposed(by: self.disposeBag)
|
}
|
}
|
}
|