Commit cb761ea9 authored by David黄金龙's avatar David黄金龙

修改几处bug

parent e6aee06c
......@@ -157,12 +157,6 @@ class YHMySettingViewController: YHBaseViewController, ConstraintRelatableTarget
}
@objc func didLogoutBtnClicked() {
//灰度规则配置
YHUatHelper.shared.loadUatData()
YHCommonAlertView.show("", "您确定要退出登录吗?", "取消", "确定",fullGuestureEnable: false) {
} callBack: {
......
......@@ -279,7 +279,7 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget {
items.append(item)
}
if YHUatHelper.shared.getUatModuleStatusBy(module: YHUatModules(rawValue: 2)) == 1 {
if YHUatHelper.shared.getUatModuleStatusBy(module: YHUatModules(rawValue: 3)) == 1 {
let item = PersonalModuleItem(icon: "mine_item_code", title: "我的测评码".local, type:.myTestCode)
items.append(item)
}
......@@ -295,7 +295,7 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget {
items.append(item)
}
if YHUatHelper.shared.getUatModuleStatusBy(module: YHUatModules(rawValue: 5)) == 1 {
if YHUatHelper.shared.getUatModuleStatusBy(module: YHUatModules(rawValue: 6)) == 1 {
let item = PersonalModuleItem(icon: "mine_item_about_us", title: "关于我们".local, type:. aboutUs)
items.append(item)
}
......@@ -328,6 +328,12 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource {
return
}
// if true {
// let vc = YHPrincipleReviewListVC()
// self.navigationController?.pushViewController(vc)
// return
// }
let item: PersonalModuleItem = items[indexPath.row]
switch item.type {
case .myCard://我的名片
......
......@@ -7,20 +7,6 @@
//
import Foundation
extension Int {
// //1-可见 2-不可见 3-新界面
// var uatValue : Bool {
// if self == 1 {
// return true
// } else if self == 2 {
// return false
// }
// return false
// }
}
enum YHUatModules: Int {
/*
默认展示
......@@ -88,11 +74,30 @@ class YHUatHelper: NSObject {
let vm = YHUatHelperViewModel()
return vm
}()
override init() {
super.init()
NotificationCenter.default.addObserver(self, selector: #selector(loginSuccess), name: YhConstant.YhNotification.didLoginSuccessNotifiction, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(logoutSuccess), name: YhConstant.YhNotification.didLogoutSuccessNotifiction, object: nil)
}
}
// MARK: - 私有方法
private extension YHUatHelper {
@objc func loginSuccess() {
viewModel.isDataOk = false
loadUatData()
}
@objc func logoutSuccess() {
viewModel.dataList = nil
}
}
// MARK: - 公有方法
......@@ -128,6 +133,8 @@ extension YHUatHelper {
return
}
if !viewModel.isDataOk {
viewModel.getUatList { success, error in
if success {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment