Commit de8c37c1 authored by DavidHuang's avatar DavidHuang

Merge branch 'youhua-dev' into uat

# Conflicts:
#	galaxy/galaxy.xcodeproj/project.pbxproj
parents a595b873 c1666d83
...@@ -37,6 +37,7 @@ xcuserdata/ ...@@ -37,6 +37,7 @@ xcuserdata/
*.ipa *.ipa
*.dSYM.zip *.dSYM.zip
*.dSYM *.dSYM
*.zip
## Playgrounds ## Playgrounds
timeline.xctimeline timeline.xctimeline
......
...@@ -43,6 +43,14 @@ class YHHomeIdentityViewController: YHBaseViewController { ...@@ -43,6 +43,14 @@ class YHHomeIdentityViewController: YHBaseViewController {
return view return view
}() }()
lazy var noDataView: YHEmptyDataView = {
let view = YHEmptyDataView.createView("暂无内容", kEmptyCommonBgName)
view.backgroundColor = .white
view.topMargin = 150
view.isHidden = true
return view
}()
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
createUI() createUI()
...@@ -55,6 +63,8 @@ class YHHomeIdentityViewController: YHBaseViewController { ...@@ -55,6 +63,8 @@ class YHHomeIdentityViewController: YHBaseViewController {
self.view.addSubview(self.scrollView) self.view.addSubview(self.scrollView)
self.view.addSubview(self.subTabBar) self.view.addSubview(self.subTabBar)
self.view.addSubview(self.noDataView)
self.subTabBar.snp.makeConstraints { make in self.subTabBar.snp.makeConstraints { make in
make.top.equalToSuperview() make.top.equalToSuperview()
make.left.equalTo(20) make.left.equalTo(20)
...@@ -65,6 +75,10 @@ class YHHomeIdentityViewController: YHBaseViewController { ...@@ -65,6 +75,10 @@ class YHHomeIdentityViewController: YHBaseViewController {
make.top.equalTo(self.subTabBar.snp.bottom) make.top.equalTo(self.subTabBar.snp.bottom)
make.left.right.bottom.equalToSuperview() make.left.right.bottom.equalToSuperview()
} }
self.noDataView.snp.makeConstraints { make in
make.left.right.top.bottom.equalToSuperview()
}
} }
override func viewWillDisappear(_ animated: Bool) { override func viewWillDisappear(_ animated: Bool) {
...@@ -94,6 +108,11 @@ extension YHHomeIdentityViewController { ...@@ -94,6 +108,11 @@ extension YHHomeIdentityViewController {
[weak self] success, error in [weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
if !success {
self.view.bringSubviewToFront(self.noDataView)
self.noDataView.isHidden = false
}
subTabArr.removeAll() subTabArr.removeAll()
for item in self.viewModel.categoryArr { for item in self.viewModel.categoryArr {
if let item = item { if let item = item {
......
...@@ -33,28 +33,51 @@ class YHHomeInformationViewController: YHBaseViewController { ...@@ -33,28 +33,51 @@ class YHHomeInformationViewController: YHBaseViewController {
collectinoView.alwaysBounceVertical = true collectinoView.alwaysBounceVertical = true
collectinoView.showsVerticalScrollIndicator = false collectinoView.showsVerticalScrollIndicator = false
collectinoView.es.addYHPullToRefresh { collectinoView.es.addYHPullToRefresh {
self.getClassifies() self.requetData()
self.getTheNewestInfoList(isFirstPage: true)
} }
collectinoView.es.addInfiniteScrolling { collectinoView.es.addInfiniteScrolling {
self.getTheNewestInfoList(isFirstPage: false) self.getTheNewestInfoList(isFirstPage: false, completion: nil)
} }
return collectinoView return collectinoView
}() }()
lazy var noDataView: YHEmptyDataView = {
let view = YHEmptyDataView.createView("暂无内容", kEmptyCommonBgName)
view.backgroundColor = .white
view.topMargin = 150
view.isHidden = true
return view
}()
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
gk_navigationBar.isHidden = true gk_navigationBar.isHidden = true
self.view.backgroundColor = .white self.view.backgroundColor = .white
self.view.addSubview(self.collectView) self.view.addSubview(self.collectView)
self.view.addSubview(self.noDataView)
self.collectView.snp.makeConstraints { make in self.collectView.snp.makeConstraints { make in
make.top.equalTo(10) make.top.equalTo(10)
make.bottom.equalToSuperview() make.bottom.equalToSuperview()
make.left.equalTo(20) make.left.equalTo(20)
make.right.equalTo(-20) make.right.equalTo(-20)
} }
self.getClassifies() self.noDataView.snp.makeConstraints { make in
self.getTheNewestInfoList(isFirstPage:true) make.left.right.top.bottom.equalToSuperview()
}
requetData()
}
func requetData() {
self.getClassifies {
self.getTheNewestInfoList(isFirstPage: true) {
let count = self.viewModel.arrHomeNewsData?.count ?? 0
if count <= 0, self.sectionItems.count <= 0 {
self.noDataView.isHidden = false
} else {
self.noDataView.isHidden = true
}
}
}
} }
} }
...@@ -145,15 +168,16 @@ extension YHHomeInformationViewController: JXSegmentedListContainerViewListDeleg ...@@ -145,15 +168,16 @@ extension YHHomeInformationViewController: JXSegmentedListContainerViewListDeleg
extension YHHomeInformationViewController { extension YHHomeInformationViewController {
// 获取栏目 // 获取栏目
func getClassifies() { func getClassifies(_ completion: (()->())?) {
self.viewModel.getHomeInfoClassifies { success, error in self.viewModel.getHomeInfoClassifies { success, error in
self.sectionItems.removeAll() self.sectionItems.removeAll()
self.sectionItems.append(contentsOf: self.viewModel.classifyArr) self.sectionItems.append(contentsOf: self.viewModel.classifyArr)
self.collectView.reloadData() self.collectView.reloadData()
completion?()
} }
} }
// 获取最新资讯 // 获取最新资讯
func getTheNewestInfoList(isFirstPage: Bool) { func getTheNewestInfoList(isFirstPage: Bool, completion: (()->())?) {
self.viewModel.getList(isFirsPage: isFirstPage) { success, error in self.viewModel.getList(isFirsPage: isFirstPage) { success, error in
self.collectView.reloadData() self.collectView.reloadData()
self.collectView.es.stopPullToRefresh() self.collectView.es.stopPullToRefresh()
...@@ -162,6 +186,7 @@ extension YHHomeInformationViewController { ...@@ -162,6 +186,7 @@ extension YHHomeInformationViewController {
self.collectView.es.noticeNoMoreData() self.collectView.es.noticeNoMoreData()
self.collectView.footer?.alpha = 1 self.collectView.footer?.alpha = 1
} }
completion?()
} }
} }
} }
...@@ -45,10 +45,6 @@ class YHStartPageViewController: UIViewController { ...@@ -45,10 +45,6 @@ class YHStartPageViewController: UIViewController {
override func viewDidAppear(_ animated: Bool) { override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated) super.viewDidAppear(animated)
let dateString = Date().dateString(ofStyle: .short)
UserDefaults.standard.set(dateString, forKey: "todayShowStartPageViewFlag")
UserDefaults.standard.synchronize()
} }
} }
...@@ -121,6 +117,12 @@ private extension YHStartPageViewController { ...@@ -121,6 +117,12 @@ private extension YHStartPageViewController {
UserDefaults.standard.synchronize() UserDefaults.standard.synchronize()
self.closeBtn.isHidden = false self.closeBtn.isHidden = false
self.startTimer() self.startTimer()
let dateString = Date().dateString(ofStyle: .short)
UserDefaults.standard.set(dateString, forKey: "todayShowStartPageViewFlag")
UserDefaults.standard.synchronize()
} }
agreeAlertView.cancelBlock = { agreeAlertView.cancelBlock = {
......
...@@ -15,7 +15,8 @@ class YHInvitationWithGiftsViewController: YHBaseViewController { ...@@ -15,7 +15,8 @@ class YHInvitationWithGiftsViewController: YHBaseViewController {
var viewModel: YHInvitationWithGiftsViewModel = YHInvitationWithGiftsViewModel() var viewModel: YHInvitationWithGiftsViewModel = YHInvitationWithGiftsViewModel()
lazy var headView : YHInvitationWithGiftsHeadView = { lazy var headView : YHInvitationWithGiftsHeadView = {
let headView = YHInvitationWithGiftsHeadView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 666)) let height = KScreenWidth/0.56
let headView = YHInvitationWithGiftsHeadView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: height))
return headView return headView
}() }()
...@@ -199,7 +200,7 @@ extension YHInvitationWithGiftsViewController: UIScrollViewDelegate { ...@@ -199,7 +200,7 @@ extension YHInvitationWithGiftsViewController: UIScrollViewDelegate {
gk_navBarAlpha = 1 gk_navBarAlpha = 1
if percent >= 0.5 { if percent >= 0.5 {
gk_navTitle = "关于银河湾" gk_navTitle = ""
} else { } else {
gk_navTitle = "" gk_navTitle = ""
} }
......
...@@ -67,6 +67,7 @@ class YHInvitationWithGiftsHeadView: UIView { ...@@ -67,6 +67,7 @@ class YHInvitationWithGiftsHeadView: UIView {
func setUpView() { func setUpView() {
self.backgroundColor = UIColor(hex: 0xededed) self.backgroundColor = UIColor(hex: 0xededed)
let height = KScreenWidth / 0.735
centerImageView = { centerImageView = {
let view = UIImageView() let view = UIImageView()
view.image = UIImage(named: "invitation_with_gifts_head") view.image = UIImage(named: "invitation_with_gifts_head")
...@@ -75,9 +76,10 @@ class YHInvitationWithGiftsHeadView: UIView { ...@@ -75,9 +76,10 @@ class YHInvitationWithGiftsHeadView: UIView {
addSubview(centerImageView) addSubview(centerImageView)
centerImageView.snp.makeConstraints { make in centerImageView.snp.makeConstraints { make in
make.left.right.top.equalToSuperview() make.left.right.top.equalToSuperview()
make.height.equalTo(510) make.height.equalTo(height)
} }
let bottomHeight = (KScreenWidth - 24) / 1.34
bottomImageView = { bottomImageView = {
let view = UIImageView() let view = UIImageView()
view.image = UIImage(named: "invitation_with_gifts_head_bottom") view.image = UIImage(named: "invitation_with_gifts_head_bottom")
...@@ -85,7 +87,7 @@ class YHInvitationWithGiftsHeadView: UIView { ...@@ -85,7 +87,7 @@ class YHInvitationWithGiftsHeadView: UIView {
}() }()
addSubview(bottomImageView) addSubview(bottomImageView)
bottomImageView.snp.makeConstraints { make in bottomImageView.snp.makeConstraints { make in
make.height.equalTo(262) make.height.equalTo(bottomHeight)
make.left.equalTo(12) make.left.equalTo(12)
make.right.equalTo(-12) make.right.equalTo(-12)
make.bottom.equalTo(-8) make.bottom.equalTo(-8)
...@@ -107,7 +109,7 @@ class YHInvitationWithGiftsHeadView: UIView { ...@@ -107,7 +109,7 @@ class YHInvitationWithGiftsHeadView: UIView {
make.height.equalTo(30) make.height.equalTo(30)
make.width.equalTo(209) make.width.equalTo(209)
make.centerX.equalToSuperview() make.centerX.equalToSuperview()
make.top.equalTo(328) make.top.equalTo(0.87 * KScreenWidth)
} }
marqueeLabel = { marqueeLabel = {
......
...@@ -54,6 +54,8 @@ class YHInvitationWithGiftsSecondTableViewCell: UITableViewCell { ...@@ -54,6 +54,8 @@ class YHInvitationWithGiftsSecondTableViewCell: UITableViewCell {
label.textAlignment = .center label.textAlignment = .center
label.layer.borderWidth = 1 label.layer.borderWidth = 1
label.layer.borderColor = UIColor(hex: 0xebf4fe).cgColor label.layer.borderColor = UIColor(hex: 0xebf4fe).cgColor
label.layer.cornerRadius = kCornerRadius3
label.layer.maskedCorners = [.layerMinXMaxYCorner,.layerMaxXMaxYCorner]
self.tableView.tableFooterView = label self.tableView.tableFooterView = label
} else { } else {
self.tableView.tableFooterView = UIView() self.tableView.tableFooterView = UIView()
...@@ -261,6 +263,8 @@ class YHInvitationWithGiftsSecondTableViewCell: UITableViewCell { ...@@ -261,6 +263,8 @@ class YHInvitationWithGiftsSecondTableViewCell: UITableViewCell {
peopleOneView = { peopleOneView = {
let view = YHInvitationPeopleItemView() let view = YHInvitationPeopleItemView()
view.titleLabel.text = "被邀请人" view.titleLabel.text = "被邀请人"
view.layer.cornerRadius = kCornerRadius3
view.layer.maskedCorners = [.layerMinXMinYCorner]
return view return view
}() }()
centerView.addSubview(peopleOneView) centerView.addSubview(peopleOneView)
...@@ -274,6 +278,14 @@ class YHInvitationWithGiftsSecondTableViewCell: UITableViewCell { ...@@ -274,6 +278,14 @@ class YHInvitationWithGiftsSecondTableViewCell: UITableViewCell {
peopleFiveView = { peopleFiveView = {
let view = YHInvitationPeopleItemView() let view = YHInvitationPeopleItemView()
view.titleLabel.text = "签约" view.titleLabel.text = "签约"
view.titleLabel.textAlignment = .center
view.layer.cornerRadius = kCornerRadius3
view.layer.maskedCorners = [.layerMaxXMinYCorner]
view.titleLabel.snp.remakeConstraints { make in
make.top.equalTo(10)
make.height.equalTo(17)
make.left.right.equalToSuperview()
}
return view return view
}() }()
centerView.addSubview(peopleFiveView) centerView.addSubview(peopleFiveView)
...@@ -287,6 +299,12 @@ class YHInvitationWithGiftsSecondTableViewCell: UITableViewCell { ...@@ -287,6 +299,12 @@ class YHInvitationWithGiftsSecondTableViewCell: UITableViewCell {
peopleFourView = { peopleFourView = {
let view = YHInvitationPeopleItemView() let view = YHInvitationPeopleItemView()
view.titleLabel.text = "测评" view.titleLabel.text = "测评"
view.titleLabel.textAlignment = .center
view.titleLabel.snp.remakeConstraints { make in
make.top.equalTo(10)
make.height.equalTo(17)
make.left.right.equalToSuperview()
}
return view return view
}() }()
centerView.addSubview(peopleFourView) centerView.addSubview(peopleFourView)
...@@ -300,6 +318,12 @@ class YHInvitationWithGiftsSecondTableViewCell: UITableViewCell { ...@@ -300,6 +318,12 @@ class YHInvitationWithGiftsSecondTableViewCell: UITableViewCell {
peopleThreeView = { peopleThreeView = {
let view = YHInvitationPeopleItemView() let view = YHInvitationPeopleItemView()
view.titleLabel.text = "注册" view.titleLabel.text = "注册"
view.titleLabel.textAlignment = .center
view.titleLabel.snp.remakeConstraints { make in
make.top.equalTo(10)
make.height.equalTo(17)
make.left.right.equalToSuperview()
}
return view return view
}() }()
centerView.addSubview(peopleThreeView) centerView.addSubview(peopleThreeView)
...@@ -358,6 +382,7 @@ class YHInvitationWithGiftsSecondTableViewCell: UITableViewCell { ...@@ -358,6 +382,7 @@ class YHInvitationWithGiftsSecondTableViewCell: UITableViewCell {
self.tableView.reloadData() self.tableView.reloadData()
} }
} }
} }
} }
......
...@@ -457,7 +457,7 @@ extension YHMyFileListViewController { ...@@ -457,7 +457,7 @@ extension YHMyFileListViewController {
self.tableView.setNeedsLayout() self.tableView.setNeedsLayout()
self.tableView.layoutIfNeeded() self.tableView.layoutIfNeeded()
TYSnapshotScroll.screenSnapshot(self.tableView) { TYSnapshotScroll.screenSnapshot(self.tableView, addMaskAfter: nil) {
[weak self] image in [weak self] image in
YHHUD.hide() YHHUD.hide()
guard let self = self else { return } guard let self = self else { return }
......
...@@ -252,7 +252,7 @@ class YHDocumentToActionTableViewCell: UITableViewCell { ...@@ -252,7 +252,7 @@ class YHDocumentToActionTableViewCell: UITableViewCell {
fileImageView.image = UIImage(named: iconImgName) fileImageView.image = UIImage(named: iconImgName)
fileNameLabel.text = dataSource.writing_document.doc_sign.doc_type_name fileNameLabel.text = dataSource.writing_document.doc_sign.doc_type_name
if dataSource.writing_document.doc_sign.doc_type == 7 || dataSource.writing_document.doc_sign.doc_type == 8 { if dataSource.writing_document.doc_sign.doc_type == 7 || dataSource.writing_document.doc_sign.doc_type == 8 {
shareButton.isHidden = false // shareButton.isHidden = false
} }
} }
......
...@@ -264,7 +264,7 @@ class YHSignatureToActionTableViewCell: UITableViewCell { ...@@ -264,7 +264,7 @@ class YHSignatureToActionTableViewCell: UITableViewCell {
fileImageView.image = UIImage(named: iconImgName) fileImageView.image = UIImage(named: iconImgName)
fileNameLabel.text = dataSource.doc_type_name fileNameLabel.text = dataSource.doc_type_name
if dataSource.doc_type == 7 || dataSource.doc_type == 8 { if dataSource.doc_type == 7 || dataSource.doc_type == 8 {
shareButton.isHidden = false // shareButton.isHidden = false
} }
} }
......
...@@ -184,7 +184,7 @@ private extension YHH5WebViewVC { ...@@ -184,7 +184,7 @@ private extension YHH5WebViewVC {
if shareUrl.contains("superAppBridge.html#/evaluation", caseSensitive: false) { if shareUrl.contains("superAppBridge.html#/evaluation", caseSensitive: false) {
shareUrl = YHBaseUrlManager.shared.curH5URL() + "superAppBridge.html#/evaluation?channel=APP-share&customer_id=\(YHLoginManager.shared.userModel?.id ?? "")" shareUrl = YHBaseUrlManager.shared.curH5URL() + "superAppBridge.html#/evaluation?channel=APP-share&customer_id=\(YHLoginManager.shared.userModel?.id ?? "")"
} }
YHShareManager.shared.sendLinkContent(self.shareH5Title, self.shareH5Describe, UIImage(named: "AppIcon") ?? UIImage(), link: self.url) YHShareManager.shared.sendLinkContent(self.shareH5Title, self.shareH5Describe, UIImage(named: "AppIcon") ?? UIImage(), link: shareUrl)
} }
} }
......
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