Commit 3a2d1c11 by pierce

修改sh状态相关

parent 97c9302f
......@@ -196,7 +196,8 @@ class Application: NSObject {
if GDRouter.UserRouter?.user.value.uid == ReviewInfo.gd_uid {
self.isCurrentVersionVerified.accept(true)
} else {
self.isCurrentVersionVerified.accept(false)
// 如果不是shzh,则按照上次的为准,需要一个兜底方案
// self.isCurrentVersionVerified.accept(false)
}
}).disposed(by: disposeBag)
}
......
......@@ -241,9 +241,32 @@ class GDMomentPlazaView: BaseView {
}
func reportMoment(with model: GDMomentPlazaMomentModel) {
_ = GDAlertView.showActionSheet(viewController: UIViewController.topViewController(), title: nil, message: nil, sheetTitles: ["举报"], cancleTitle: "取消", sheetAction: { index in
// shenhe 状态下才会调用此方法
var optionArr: [String] = ["举报"]
if GDRouter.BaseBusinessRouter?.isCurrentVersionVerified.value == true {
optionArr = ["举报", "不再看TA"]
}
_ = GDAlertView.showActionSheet(viewController: self.viewController, title: nil, message: nil, sheetTitles: optionArr, cancleTitle: "取消", sheetAction: {[weak self] index in
if index == 0 {
GDRouter.UserZone?.showReportVC(from: .moment, uid: model.uid, nickname: model.nickname)
} else {
guard let self = self else { return }
_ = GDAlertView.showAlertView(viewController: UIViewController.topViewController(), title: "确定不再看\(model.nickname ?? "")?", message: nil, confirmTitle: "确定", cancleTitle: "取消", confirmAction: {
if let uid = model.uid {
// 写入uid
if var blackList = UserDefaults.standard.object(forKey: GDUserManagerPublicUDKey.mainpageBlackList) as? [String] {
blackList.append(uid)
UserDefaults.standard.setValue(blackList, forKey: GDUserManagerPublicUDKey.mainpageBlackList)
} else {
UserDefaults.standard.setValue([uid], forKey: GDUserManagerPublicUDKey.mainpageBlackList)
}
}
self.viewModel.refreshData(for: 1)
}, cancleAction: nil)
}
}, cancleAction: {
......
......@@ -195,9 +195,32 @@ class GDMessageMomentDetailController: BaseViewController {
}
func reportMoment(with model: GDZoneContentMomentModel) {
_ = GDAlertView.showActionSheet(viewController: self, title: nil, message: nil, sheetTitles: ["举报"], cancleTitle: "取消", sheetAction: {[weak self] index in
// shenhe 状态下才会调用此方法
var optionArr: [String] = ["举报"]
if GDRouter.BaseBusinessRouter?.isCurrentVersionVerified.value == true {
optionArr = ["举报", "不再看TA"]
}
_ = GDAlertView.showActionSheet(viewController: self, title: nil, message: nil, sheetTitles: optionArr, cancleTitle: "取消", sheetAction: {[weak self] index in
if index == 0 {
GDRouter.UserZone?.showReportVC(from: .moment, uid: model.uid, nickname: self?.viewModel.user.value?.nickname)
} else {
guard let self = self else { return }
_ = GDAlertView.showAlertView(viewController: UIViewController.topViewController(), title: "确定不再看\(self.viewModel.user.value?.nickname ?? "")?", message: nil, confirmTitle: "确定", cancleTitle: "取消", confirmAction: {
if let uid = model.uid {
// 写入uid
if var blackList = UserDefaults.standard.object(forKey: GDUserManagerPublicUDKey.mainpageBlackList) as? [String] {
blackList.append(uid)
UserDefaults.standard.setValue(blackList, forKey: GDUserManagerPublicUDKey.mainpageBlackList)
} else {
UserDefaults.standard.setValue([uid], forKey: GDUserManagerPublicUDKey.mainpageBlackList)
}
}
self.viewModel.refreshMomentData()
}, cancleAction: nil)
}
}, cancleAction: {
......
......@@ -342,9 +342,33 @@ class GDTopicDetailViewController: BaseViewController {
}
func reportMoment(with model: GDMomentPlazaMomentModel) {
_ = GDAlertView.showActionSheet(viewController: self, title: nil, message: nil, sheetTitles: ["举报"], cancleTitle: "取消", sheetAction: {[weak self] index in
// shenhe 状态下才会调用此方法
var optionArr: [String] = ["举报"]
if GDRouter.BaseBusinessRouter?.isCurrentVersionVerified.value == true {
optionArr = ["举报", "不再看TA"]
}
_ = GDAlertView.showActionSheet(viewController: self, title: nil, message: nil, sheetTitles: optionArr, cancleTitle: "取消", sheetAction: {[weak self] index in
if index == 0 {
GDRouter.UserZone?.showReportVC(from: .moment, uid: model.uid, nickname: model.nickname)
} else {
guard let self = self else { return }
_ = GDAlertView.showAlertView(viewController: UIViewController.topViewController(), title: "确定不再看\(model.nickname ?? "")?", message: nil, confirmTitle: "确定", cancleTitle: "取消", confirmAction: {
if let uid = model.uid {
// 写入uid
if var blackList = UserDefaults.standard.object(forKey: GDUserManagerPublicUDKey.mainpageBlackList) as? [String] {
blackList.append(uid)
UserDefaults.standard.setValue(blackList, forKey: GDUserManagerPublicUDKey.mainpageBlackList)
} else {
UserDefaults.standard.setValue([uid], forKey: GDUserManagerPublicUDKey.mainpageBlackList)
}
}
self.navigationController?.popViewController(animated: true)
}, cancleAction: nil)
}
}, cancleAction: {
......
......@@ -212,9 +212,33 @@ class GDZoneContentMomentView: GDZoneContentPublicMomentView {
}
func reportMoment(with model: GDZoneContentMomentModel) {
_ = GDAlertView.showActionSheet(viewController: self.viewController, title: nil, message: nil, sheetTitles: ["举报"], cancleTitle: "取消", sheetAction: {[weak self] index in
// shenhe 状态下才会调用此方法
var optionArr: [String] = ["举报"]
if GDRouter.BaseBusinessRouter?.isCurrentVersionVerified.value == true {
optionArr = ["举报", "不再看TA"]
}
_ = GDAlertView.showActionSheet(viewController: self.viewController, title: nil, message: nil, sheetTitles: optionArr, cancleTitle: "取消", sheetAction: {[weak self] index in
if index == 0 {
GDRouter.UserZone?.showReportVC(from: .moment, uid: model.uid, nickname: self?.nickname.value)
} else {
guard let self = self else { return }
_ = GDAlertView.showAlertView(viewController: UIViewController.topViewController(), title: "确定不再看\(self.nickname.value ?? "")?", message: nil, confirmTitle: "确定", cancleTitle: "取消", confirmAction: {
if let uid = model.uid {
// 写入uid
if var blackList = UserDefaults.standard.object(forKey: GDUserManagerPublicUDKey.mainpageBlackList) as? [String] {
blackList.append(uid)
UserDefaults.standard.setValue(blackList, forKey: GDUserManagerPublicUDKey.mainpageBlackList)
} else {
UserDefaults.standard.setValue([uid], forKey: GDUserManagerPublicUDKey.mainpageBlackList)
}
}
self.viewModel.refreshMomentList(with: 1)
}, cancleAction: nil)
}
}, cancleAction: {
......
......@@ -172,8 +172,10 @@ class GDLiveAudiencePanelView: BaseView {
if GDRouter.DataRouter?.fightTeamEnable.value == true {
functionLine2Arr.append(.fightTeam)
}
functionLine2Arr.append(.welfareCenter)
if GDRouter.BaseBusinessRouter?.isCurrentVersionVerified.value == false {
functionLine2Arr.append(.welfareCenter)
}
functionLine2Arr.append(.wearCenter)
functionLine2Arr.append(.share)
......
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 sign in to comment