Commit 87de2809 by pierce

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

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