Commit 87de2809 by pierce

除了一些UI资源颜色以外都好了

parent b810dd4d
Showing with 45 additions and 41 deletions
...@@ -243,7 +243,7 @@ public var supportedFunction: [String]{ ...@@ -243,7 +243,7 @@ public var supportedFunction: [String]{
kMyPageFunctionMyLevel, kMyPageFunctionMyLevel,
kMyPageFunctionMyAuth, kMyPageFunctionMyAuth,
kMyPageFunctionService, kMyPageFunctionService,
// kMyPageFunctionFansGroup, kMyPageFunctionFansGroup,
kMyPageFunctionWearCenter, kMyPageFunctionWearCenter,
kMyPageFunctionShareInvite, kMyPageFunctionShareInvite,
// kMyPageFunctionFightTeam, // kMyPageFunctionFightTeam,
...@@ -257,7 +257,7 @@ public var supportedFunction: [String]{ ...@@ -257,7 +257,7 @@ public var supportedFunction: [String]{
kMyPageFunctionTurnplate, kMyPageFunctionTurnplate,
kMyPageFunctionMyAuth, kMyPageFunctionMyAuth,
kMyPageFunctionService, kMyPageFunctionService,
// kMyPageFunctionFansGroup, kMyPageFunctionFansGroup,
kMyPageFunctionWearCenter, kMyPageFunctionWearCenter,
kMyPageFunctionShareInvite, kMyPageFunctionShareInvite,
kMyPageFunctionStore, kMyPageFunctionStore,
...@@ -278,7 +278,10 @@ public final class GDMyPageFunctionModel: BaseModel, NetworkArrType { ...@@ -278,7 +278,10 @@ public final class GDMyPageFunctionModel: BaseModel, NetworkArrType {
public static func createArrFrom(_ json: JSON) -> [GDMyPageFunctionModel] { public static func createArrFrom(_ json: JSON) -> [GDMyPageFunctionModel] {
let funcArr = json.arrayValue.map { dataJson in let funcArr = json.arrayValue.map { dataJson in
return GDMyPageFunctionModel.createFrom(dataJson) return GDMyPageFunctionModel.createFrom(dataJson)
}.filter { supportedFunction.contains($0.modulekey ?? "") } }.filter {
let contains = supportedFunction.contains($0.modulekey ?? "")
return contains
}
return funcArr return funcArr
} }
......
...@@ -104,13 +104,13 @@ class GDLiveFansGroupViewModel: BaseViewModel { ...@@ -104,13 +104,13 @@ class GDLiveFansGroupViewModel: BaseViewModel {
/// - Parameter page: /// - Parameter page:
func refreshFansGroupData(with page: Int, refreshMemberData: Bool = true) { func refreshFansGroupData(with page: Int, refreshMemberData: Bool = true) {
var userModel = self.userModel
if isFromLive == true { if isFromLive == true {
if let roomUserData = GDRouter.LiveRoomRouter?.roomUserData { if let roomUserData = GDRouter.LiveRoomRouter?.roomUserData {
self.userModel = roomUserData self.userModel = roomUserData
} }
} }
let userModel = self.userModel
self.page = page self.page = page
// 使用functionView的User模块请求真爱团数据 // 使用functionView的User模块请求真爱团数据
userModel.refreshFansGroupData(with: page, refreshMemberData: refreshMemberData) {[weak self] (model) in userModel.refreshFansGroupData(with: page, refreshMemberData: refreshMemberData) {[weak self] (model) in
......
...@@ -555,7 +555,6 @@ ...@@ -555,7 +555,6 @@
children = ( children = (
BE8042772B5B7FB000E2FCB4 /* Function */, BE8042772B5B7FB000E2FCB4 /* Function */,
BE80427B2B5B7FB000E2FCB4 /* DiamondAndCoin */, BE80427B2B5B7FB000E2FCB4 /* DiamondAndCoin */,
BE80427D2B5B7FB000E2FCB4 /* MyWelfare */,
BE80427E2B5B7FB000E2FCB4 /* DailySign */, BE80427E2B5B7FB000E2FCB4 /* DailySign */,
BE8042802B5B7FB000E2FCB4 /* Subfunction */, BE8042802B5B7FB000E2FCB4 /* Subfunction */,
); );
...@@ -587,13 +586,6 @@ ...@@ -587,13 +586,6 @@
path = DiamondAndCoin; path = DiamondAndCoin;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
BE80427D2B5B7FB000E2FCB4 /* MyWelfare */ = {
isa = PBXGroup;
children = (
);
path = MyWelfare;
sourceTree = "<group>";
};
BE80427E2B5B7FB000E2FCB4 /* DailySign */ = { BE80427E2B5B7FB000E2FCB4 /* DailySign */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
......
...@@ -424,29 +424,34 @@ class GDMyPageController: BaseViewController { ...@@ -424,29 +424,34 @@ class GDMyPageController: BaseViewController {
self?.tableView.reloadData() self?.tableView.reloadData()
}).disposed(by: disposeBag) }).disposed(by: disposeBag)
if let myPageFuncArr = GDRouter.DataRouter?.myPageFuncArr, let user = GDRouter.UserRouter?.user { if let myPageFuncArr = GDRouter.DataRouter?.myPageFuncArr,
Observable.combineLatest(myPageFuncArr.map { $0.filter { let user = GDRouter.UserRouter?.user,
let dailySignSwitch = GDRouter.DataRouter?.dailySignSwitch{
Observable.combineLatest(myPageFuncArr.map { $0.filter {
$0.modulekey == kMyPageFunctionStore $0.modulekey == kMyPageFunctionStore
// || $0.modulekey == kMyPageFunctionTurnplate || $0.modulekey == kMyPageFunctionTurnplate
// || $0.modulekey == kMyPageFunctionFansGroup || $0.modulekey == kMyPageFunctionFansGroup
//TODO:战队: added By Pidan
// || $0.modulekey == kMyPageFunctionFightTeam // || $0.modulekey == kMyPageFunctionFightTeam
}}, /*GDRouter.DataRouter?.dailySignSwitch,*/ user.map({ $0.uid }).distinctUntilChanged()) }}, dailySignSwitch, user.map({ $0.uid }).distinctUntilChanged())
.subscribe(onNext: {[weak self] _, /*dailySignSwitch, */_ in .subscribe(onNext: {[weak self] funcArr, dailySignSwitch, uid in
var arr: [GDMyPageModule] = [] var arr: [GDMyPageModule] = []
// if funcArr.count == 0 { if funcArr.count == 0 {
// if dailySignSwitch {
// arr.append(.dailySign)
// }
arr.append(.diamondAndCoin) arr.append(.diamondAndCoin)
if dailySignSwitch {
arr.append(.dailySign)
}
arr.append(.subfunction)
} else {
arr.append(.diamondAndCoin)
if GDRouter.BaseBusinessRouter?.isCurrentVersionVerified.value == false {
arr.append(.function)
}
if dailySignSwitch {
arr.append(.dailySign)
}
arr.append(.subfunction) arr.append(.subfunction)
// } else { }
// arr.append(.function)
//// if dailySignSwitch {
//// arr.append(.dailySign)
//// }
// arr.append(.diamondAndCoin)
// arr.append(.subfunction)
// }
self?.modules.accept(arr) self?.modules.accept(arr)
}).disposed(by: disposeBag) }).disposed(by: disposeBag)
} }
...@@ -639,9 +644,10 @@ extension GDMyPageController: UITableViewDelegate, UITableViewDataSource { ...@@ -639,9 +644,10 @@ extension GDMyPageController: UITableViewDelegate, UITableViewDataSource {
cell.reuseDisposeBag = DisposeBag() cell.reuseDisposeBag = DisposeBag()
GDRouter.DataRouter?.myPageFuncArr GDRouter.DataRouter?.myPageFuncArr
.map { $0.filter { $0.modulekey == kMyPageFunctionStore .map { $0.filter { $0.modulekey == kMyPageFunctionStore
// || $0.modulekey == kMyPageFunctionTurnplate || || $0.modulekey == kMyPageFunctionTurnplate ||
// $0.modulekey == kMyPageFunctionFansGroup || $0.modulekey == kMyPageFunctionFansGroup
// $0.modulekey == kMyPageFunctionFightTeam //TODO:战队: added By Pidan
// || $0.modulekey == kMyPageFunctionFightTeam
}} }}
.bind(to: cell.modules) .bind(to: cell.modules)
.disposed(by: cell.reuseDisposeBag) .disposed(by: cell.reuseDisposeBag)
......
...@@ -358,7 +358,7 @@ extension GDRecommendListView: UICollectionViewDelegate, UICollectionViewDataSou ...@@ -358,7 +358,7 @@ extension GDRecommendListView: UICollectionViewDelegate, UICollectionViewDataSou
let sectionModel = viewModel.dataSubject.value[indexPath.section] let sectionModel = viewModel.dataSubject.value[indexPath.section]
if sectionModel.sectionType == .none { if sectionModel.sectionType == .none {
let line = 2.0 + (GDRouter.BaseBusinessRouter?.isCurrentVersionVerified.value == true ? 0 : 1.0) let line = 2.0 + (GDRouter.BaseBusinessRouter?.isCurrentVersionVerified.value == true ? 1.0 : 0)
let width = (self.width - layout.sectionInset.left - layout.sectionInset.right - layout.minimumInteritemSpacing * (line - 1)) / line let width = (self.width - layout.sectionInset.left - layout.sectionInset.right - layout.minimumInteritemSpacing * (line - 1)) / line
return CGSize(width: width, height: width + 40) return CGSize(width: width, height: width + 40)
} else if sectionModel.sectionType == .banner { } else if sectionModel.sectionType == .banner {
......
...@@ -384,6 +384,7 @@ class GDLiveFunctionView: BaseView { ...@@ -384,6 +384,7 @@ class GDLiveFunctionView: BaseView {
// 绑定事件 // 绑定事件
hotRankBtn.rx.tap.subscribe(onNext: { [weak self] (_) in hotRankBtn.rx.tap.subscribe(onNext: { [weak self] (_) in
if GDRouter.BaseBusinessRouter?.isCurrentVersionVerified.value == true { return }
guard let self = self else { return } guard let self = self else { return }
GDStatistics.track(.liveHotRankBoard) GDStatistics.track(.liveHotRankBoard)
...@@ -403,6 +404,8 @@ class GDLiveFunctionView: BaseView { ...@@ -403,6 +404,8 @@ class GDLiveFunctionView: BaseView {
let tap = UITapGestureRecognizer() let tap = UITapGestureRecognizer()
ticketBtn.addGestureRecognizer(tap) ticketBtn.addGestureRecognizer(tap)
tap.rx.event.subscribe(onNext: { [weak self] (_) in tap.rx.event.subscribe(onNext: { [weak self] (_) in
if GDRouter.BaseBusinessRouter?.isCurrentVersionVerified.value == true { return }
guard let self = self else { return } guard let self = self else { return }
GDStatistics.track(.liveClickBonds) GDStatistics.track(.liveClickBonds)
...@@ -1441,7 +1444,7 @@ class GDLiveFunctionView: BaseView { ...@@ -1441,7 +1444,7 @@ class GDLiveFunctionView: BaseView {
/// 开启观看时长引导流程 /// 开启观看时长引导流程
func startWatchTimeGuide() { func startWatchTimeGuide() {
guard GDRouter.UserRouter?.user.value.isNewUser == true else { guard GDRouter.UserRouter?.user.value.isNewUser == true else {
GDRouter.LiveRoomRouter?.isOnNewUserIntroduce.accept(false) GDRouter.LiveRoomRouter?.isOnNewUserIntroduce.accept(false)
activityWebView.shouldShowFloatingWebView = true activityWebView.shouldShowFloatingWebView = true
self.startGiftPanelGuide() self.startGiftPanelGuide()
......
...@@ -295,7 +295,7 @@ class GDNormalGiftEffectRunwayView: BaseView { ...@@ -295,7 +295,7 @@ class GDNormalGiftEffectRunwayView: BaseView {
} else { } else {
faceImageView.setWebImage(model.fromuser?.face) faceImageView.setWebImage(model.fromuser?.face)
} }
//TODO:珍爱团: added By Pidan
let grade = model.fansGroupInfo?.grade ?? 0 let grade = model.fansGroupInfo?.grade ?? 0
fansGroupGradeView.image = GDRouter.FansGroupRouter?.fansGroupGradeImage(grade: grade) fansGroupGradeView.image = GDRouter.FansGroupRouter?.fansGroupGradeImage(grade: grade)
......
...@@ -139,7 +139,7 @@ class GDWebpGiftEffectView: BaseView { ...@@ -139,7 +139,7 @@ class GDWebpGiftEffectView: BaseView {
// 背景添加黑色遮罩 // 背景添加黑色遮罩
self.webpView.backgroundColor = .init(white: 0, alpha: 0.5) self.webpView.backgroundColor = .init(white: 0, alpha: 0.5)
// 假效果,从本地读取 // 假效果,从本地读取
if let path = GDShowRoomBundle.bundle().path(forResource: "213911", ofType: "webp") { if let path = GDShowRoomBundle.bundle()?.path(forResource: "213911", ofType: "webp") {
if let image = YYImage(contentsOfFile: path) { if let image = YYImage(contentsOfFile: path) {
// 开始显示 // 开始显示
GDlog.verbose("[GiftEffect] animating 2") GDlog.verbose("[GiftEffect] animating 2")
......
...@@ -127,8 +127,8 @@ class GDNewUserRewardView: BaseView { ...@@ -127,8 +127,8 @@ class GDNewUserRewardView: BaseView {
numBtn.style = .border numBtn.style = .border
numBtn.backgroundColor = .hexColor("D0FFFE") numBtn.backgroundColor = .hexColor("D0FFFE")
numBtn.titleLabel?.font = .gd_pingfangBold(12) numBtn.titleLabel?.font = .gd_pingfangBold(12)
numBtn.setTitleColor(.hexColor("0CE8E5"), for: .normal) numBtn.setTitleColor(.gd_main, for: .normal)
numBtn.gradientLayer?.borderColor = UIColor.hexColor("FCE033").cgColor numBtn.gradientLayer?.borderColor = UIColor.gd_main.cgColor
rewardBgView.addSubview(numBtn) rewardBgView.addSubview(numBtn)
recieveBtn.setTitle("领取", for: .normal) recieveBtn.setTitle("领取", for: .normal)
......
...@@ -104,10 +104,10 @@ class GDLiveWatchTimeView: BaseView { ...@@ -104,10 +104,10 @@ class GDLiveWatchTimeView: BaseView {
Observable.combineLatest(viewModel.canRecieve, viewModel.timeCount).subscribe(onNext: {[weak self] canRecieve, timeCount in Observable.combineLatest(viewModel.canRecieve, viewModel.timeCount).subscribe(onNext: {[weak self] canRecieve, timeCount in
guard let self = self else { return } guard let self = self else { return }
if canRecieve { if canRecieve {
self.btn.colors = [UIColor.hexColor("FABF0A").cgColor, UIColor.hexColor("FFE87D").cgColor] self.btn.colors = [UIColor.gd_main.cgColor, UIColor.gd_second.cgColor]
self.btn.setTitle("领取", for: .normal) self.btn.setTitle("领取", for: .normal)
self.btn.style = .circle self.btn.style = .circle
self.btn.setTitleColor(.hexColor("A55E11"), for: .normal) self.btn.setTitleColor(.gd_main, for: .normal)
self.iconImageView.animationImages = GDShowRoomBundle.animatedImageArrayNamed("watch_time_recieve_icon_") self.iconImageView.animationImages = GDShowRoomBundle.animatedImageArrayNamed("watch_time_recieve_icon_")
self.iconImageView.animationRepeatCount = 0 self.iconImageView.animationRepeatCount = 0
self.iconImageView.animationDuration = 1.5 self.iconImageView.animationDuration = 1.5
......
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