Commit d2cd36a6 ilCode

大数据研究UI调整

1 个父辈 fdd94906
{
"images" : [
{
"filename" : "default_team_logo.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
......@@ -70,7 +70,7 @@ class HadoopDetailGameInfoView: UIView {
}()
private lazy var guestRankLab: UILabel = {
let lab = UILabel()
lab.font = kFontSize(13)
lab.font = kFontSize(12)
lab.textAlignment = .center
lab.textColor = kMidTitleColor
return lab
......@@ -87,7 +87,6 @@ class HadoopDetailGameInfoView: UIView {
let stackView = UIStackView(arrangedSubviews: [hostStackView, gameStackView, guestStackView])
stackView.axis = .horizontal
stackView.alignment = .center
stackView.distribution = .fillEqually
return stackView
}()
......@@ -112,6 +111,15 @@ class HadoopDetailGameInfoView: UIView {
}
gameStackView.snp.makeConstraints { make in
make.centerX.equalToSuperview()
make.width.equalTo(80)
}
hostRankLab.snp.makeConstraints { make in
make.left.equalToSuperview().offset(3)
make.right.equalToSuperview().offset(-3)
}
guestRankLab.snp.makeConstraints { make in
make.left.equalToSuperview().offset(3)
make.right.equalToSuperview().offset(-3)
}
}
......@@ -143,7 +151,7 @@ class HadoopDetailGameInfoView: UIView {
let guestRank = guestTeam.rank ?? ""
self.hostBtn.setTitle(hostTeam.shortName ?? hostTeam.name ?? "", for: .normal)
self.hostBtn.kf.setImage(with: URL(string: hostTeam.logo ?? ""), for: .normal, placeholder: R.image.default_user()?.resize(to: resize), options: [.processor(processor)], completionHandler: { _ in
self.hostBtn.kf.setImage(with: URL(string: hostTeam.logo ?? ""), for: .normal, placeholder: R.image.default_team_logo()?.resize(to: resize), options: [.processor(processor)], completionHandler: { _ in
self.hostBtn.adjustImage(position: .top, spacing: 5)
})
self.hostRankLab.text = hostRank.isEmpty ? "" : "\(comName)\(hostRank)"
......@@ -152,7 +160,7 @@ class HadoopDetailGameInfoView: UIView {
self.matchTimeLab.text = ScoreTools.getFormatMatchTime(time: infoModel.matchTime, format: "MM/dd HH:mm")
self.guestBtn.setTitle(guestTeam.shortName ?? guestTeam.name ?? "", for: .normal)
self.guestBtn.kf.setImage(with: URL(string: guestTeam.logo ?? ""), for: .normal, placeholder: R.image.default_user()?.resize(to: resize), options: [.processor(processor)], completionHandler: { _ in
self.guestBtn.kf.setImage(with: URL(string: guestTeam.logo ?? ""), for: .normal, placeholder: R.image.default_team_logo()?.resize(to: resize), options: [.processor(processor)], completionHandler: { _ in
self.guestBtn.adjustImage(position: .top, spacing: 5)
})
self.guestRankLab.text = guestRank.isEmpty ? "" : "\(comName)\(guestRank)"
......
......@@ -158,6 +158,14 @@ extension HadoopDetailRadarView {
axisRanges.append((0, 100))
}
if activities.count <= 3 {
radarChartView.extraBottomOffset = 0
} else if activities.count % 2 == 0 {
radarChartView.extraBottomOffset = 45
} else {
radarChartView.extraBottomOffset = 0
}
self.showRadarChartView()
}
}
......@@ -274,19 +282,15 @@ class AxisView: UIView {
let guestLoseBalls = (guestRadarModel.loseAvgBalls ?? "").isEmpty ? "" : "\(guestRadarModel.loseAvgBalls!)球"
let guestLoseBallsInfo = "客队均失球"
var status = ""
let hostTotalResult = hostStigmaResult.totalResult ?? 0
let hostCurResult = hostStigmaResult.curResult ?? ""
let guestTotalResult = guestStigmaResult.totalResult ?? 0
let guestCurResult = guestStigmaResult.curResult ?? ""
if hostTotalResult > guestTotalResult {
status = (hostTotalResult > 0 && !hostCurResult.isEmpty) ? "\(hostTotalResult)\(hostCurResult)" : ""
} else {
status = (guestTotalResult > 0 && !guestCurResult.isEmpty) ? "\(guestTotalResult)\(guestCurResult)" : ""
}
firstView.updateInfo(title: guestWinBalls, detail: guestWinBallsInfo, status: guestTotalResult > hostTotalResult ? status : "")
secondView.updateInfo(title: hostWinBalls, detail: hostWinBallsInfo, status: hostTotalResult > guestTotalResult ? status : "")
let hostStatus = (hostTotalResult >= 2 && !hostCurResult.isEmpty) ? "\(hostTotalResult)\(hostCurResult)" : ""
let guestStatus = (guestTotalResult >= 2 && !guestCurResult.isEmpty) ? "\(guestTotalResult)\(guestCurResult)" : ""
firstView.updateInfo(title: guestWinBalls, detail: guestWinBallsInfo, status: guestStatus)
secondView.updateInfo(title: hostWinBalls, detail: hostWinBallsInfo, status: hostStatus)
thirdView.updateInfo(title: hostLoseBalls, detail: hostLoseBallsInfo, status: "")
fourthView.updateInfo(title: guestLoseBalls, detail: guestLoseBallsInfo, status: "")
}
......
......@@ -121,7 +121,8 @@ class HustleScoreCell: BaseTableViewCell {
}
teamGameStackView.snp.makeConstraints { make in
make.top.equalToSuperview().offset(10)
make.left.right.equalToSuperview()
make.left.equalToSuperview().offset(5)
make.right.equalToSuperview().offset(-5)
}
matchTimeLab.snp.makeConstraints { make in
make.top.equalTo(teamGameStackView.snp.bottom).offset(5)
......
......@@ -103,7 +103,7 @@ struct _R {
var accentColor: RswiftResources.ColorResource { .init(name: "AccentColor", path: [], bundle: bundle) }
}
/// This `_R.image` struct is generated, and contains static references to 30 images.
/// This `_R.image` struct is generated, and contains static references to 31 images.
struct image {
let bundle: Foundation.Bundle
......@@ -116,6 +116,9 @@ struct _R {
/// Image `btn_back_white`.
var btn_back_white: RswiftResources.ImageResource { .init(name: "btn_back_white", path: [], bundle: bundle, locale: nil, onDemandResourceTags: nil) }
/// Image `default_team_logo`.
var default_team_logo: RswiftResources.ImageResource { .init(name: "default_team_logo", path: [], bundle: bundle, locale: nil, onDemandResourceTags: nil) }
/// Image `default_user`.
var default_user: RswiftResources.ImageResource { .init(name: "default_user", path: [], bundle: bundle, locale: nil, onDemandResourceTags: nil) }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!