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