Commit 223ffa34 authored by Alex朱枝文's avatar Alex朱枝文

ui以及bug调整

parent b9618df8
......@@ -8936,7 +8936,7 @@
CODE_SIGN_ENTITLEMENTS = yinheReplayExt/yinheReplayExt.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 0;
CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_TEAM = RXHYW88XR7;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = yinheReplayExt/Info.plist;
......@@ -8966,7 +8966,7 @@
CODE_SIGN_ENTITLEMENTS = yinheReplayExt/yinheReplayExt.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 0;
CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_TEAM = RXHYW88XR7;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = yinheReplayExt/Info.plist;
......@@ -8996,7 +8996,7 @@
CODE_SIGN_ENTITLEMENTS = yinheReplayExt/yinheReplayExt.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 0;
CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_TEAM = RXHYW88XR7;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = yinheReplayExt/Info.plist;
......@@ -9026,7 +9026,7 @@
CODE_SIGN_ENTITLEMENTS = yinheReplayExt/yinheReplayExt.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 0;
CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_TEAM = RXHYW88XR7;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = yinheReplayExt/Info.plist;
......@@ -9143,7 +9143,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.0.0;
MARKETING_VERSION = 2.3.4;
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
......@@ -9292,7 +9292,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.0.0;
MARKETING_VERSION = 2.3.4;
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
......@@ -9503,7 +9503,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.0.0;
MARKETING_VERSION = 2.3.4;
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
......@@ -9554,7 +9554,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.0.0;
MARKETING_VERSION = 2.3.4;
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
......
......@@ -384,7 +384,11 @@ class YHCirclePublishViewController: YHBaseViewController {
@objc private func publishButtonTapped() {
view.endEditing(true)
guard hasContent() else {
guard !textView.text.isEmpty else {
YHHUD.flash(message: "标题不能为空")
return
}
guard !mediaItems.isEmpty else {
YHHUD.flash(message: "请至少添加一张图片")
return
}
......@@ -491,14 +495,7 @@ class YHCirclePublishViewController: YHBaseViewController {
// MARK: - Helper Methods
private func hasContent() -> Bool {
return !mediaItems.isEmpty // 目前卡图片
// return !textView.text.isEmpty || !detailTextView.text.isEmpty || !mediaItems.isEmpty
}
private func updatePublishButton() {
let hasContent = hasContent()
rightButton.isEnabled = hasContent
rightButton.backgroundColor = hasContent ? UIColor.brandGrayColor8 : UIColor.brandGrayColor4
return !textView.text.isEmpty || !detailTextView.text.isEmpty || !mediaItems.isEmpty
}
private func updateCollectionViewHeight() {
......@@ -533,7 +530,6 @@ extension YHCirclePublishViewController: UITextViewDelegate {
detailPlaceholderLabel.isHidden = !textView.text.isEmpty
updateTextViewHeight(textView)
}
// updatePublishButton()
}
func textView(_ textView: UITextView, shouldChangeTextIn range: NSRange, replacementText text: String) -> Bool {
......@@ -611,7 +607,6 @@ extension YHCirclePublishViewController: UICollectionViewDataSource, UICollectio
// 刷新集合视图
self.mediaCollectionView.reloadData()
self.updateCollectionViewHeight()
// self.updatePublishButton()
printLog("已从发布页面删除媒体项,剩余: \(self.mediaItems.count)")
}
......@@ -630,7 +625,6 @@ extension YHCirclePublishViewController: UICollectionViewDataSource, UICollectio
mediaItems.remove(at: index)
mediaCollectionView.reloadData()
updateCollectionViewHeight()
// updatePublishButton()
}
private func showMediaUploadSheet() {
......@@ -650,7 +644,6 @@ extension YHCirclePublishViewController: UICollectionViewDataSource, UICollectio
mediaCollectionView.reloadData()
updateCollectionViewHeight()
// updatePublishButton()
printLog("获得 \(itemsToAdd.count) 个媒体文件")
// 为每个新添加的 item 开始上传
......
......@@ -130,6 +130,7 @@ private extension YHCircleViewController {
self.circleCollectView.es.stopPullToRefresh()
if !self.viewModel.hasMore, self.arr.count > 0 {
self.circleCollectView.es.noticeNoMoreData()
self.circleCollectView.footer?.alpha = 1
}
}
}
......@@ -323,21 +324,6 @@ extension YHCircleViewController: CollectionViewWaterfallLayoutDelegate {
}
}
// MARK: - UIScrollViewDelegate
extension YHCircleViewController {
func scrollViewDidScroll(_ scrollView: UIScrollView) {
let itemNumber = viewModel.preloadItemIndex
let section = 0
let itemIndex = itemNumber - 1
let indexPathToCheck = IndexPath(item: itemIndex, section: section)
if circleCollectView.indexPathsForVisibleItems.contains(indexPathToCheck) {
requestList(false)
}
}
}
// MARK: - JXSegmentedListContainerViewListDelegate
extension YHCircleViewController: JXSegmentedListContainerViewListDelegate {
......
......@@ -259,7 +259,7 @@ class YHCircleCollectionViewCell: UICollectionViewCell {
}
// 内容文本
contentLabel.text = model.content.isEmpty ? model.title : model.content
contentLabel.text = model.title
contentLabel.snp.removeConstraints()
contentLabel.snp.remakeConstraints { make in
make.top.equalToSuperview().offset(12)
......
......@@ -343,14 +343,6 @@ private extension YHResourceViewController {
DispatchQueue.main.async {
YHHUD.hide()
// if success, let arrData = self.viewModel.arrResourceData, arrData.count > 0 {
// let arrString = arrData.toJSONString()
// UserDefaults.standard.set(arrString, forKey: "resourceFirstPageData")
// UserDefaults.standard.synchronize()
// } else if !success, let errorMessage = message {
// YHHUD.flash(message: errorMessage)
// }
if !success, let errorMessage = message {
YHHUD.flash(message: errorMessage)
}
......@@ -374,7 +366,7 @@ private extension YHResourceViewController {
self.resourceTableView.reloadData()
self.resourceTableView.es.stopLoadingMore()
if self.viewModel.hasMoreForResource == false {
if self.viewModel.hasMoreForResource == false, (self.viewModel.arrResourceData?.count ?? 0) > 0 {
self.resourceTableView.es.noticeNoMoreData()
self.resourceTableView.footer?.alpha = 1
}
......@@ -615,20 +607,6 @@ extension YHResourceViewController: UITableViewDelegate, UITableViewDataSource {
}
}
// MARK: - UIScrollViewDelegate
extension YHResourceViewController {
func scrollViewDidScroll(_ scrollView: UIScrollView) {
let itemNumber = viewModel.preloadItemIndex
let visibleRows = resourceTableView.indexPathsForVisibleRows ?? []
let lastVisibleRow = visibleRows.last?.row ?? 0
if lastVisibleRow >= itemNumber - 1 {
loadMoreData()
}
}
}
// MARK: - JXSegmentedListContainerViewListDelegate
extension YHResourceViewController: JXSegmentedListContainerViewListDelegate {
......
......@@ -107,7 +107,7 @@ class YHResourceListModel: SmartCodable {
/// 显示名称(优先显示中文名)
var displayName: String {
return company_name.isEmpty ? company_english_name : company_name
return company_name.isEmpty ? "-" : company_name
}
/// 是否有英文名
......@@ -117,7 +117,7 @@ class YHResourceListModel: SmartCodable {
/// 行业类型显示文本
var industryDisplayText: String {
return industry_type_str.isEmpty ? "其他" : industry_type_str
return industry_type_str.isEmpty ? "-" : industry_type_str
}
/// 是否提供服务
......
......@@ -14,7 +14,7 @@ class YHResourceViewModel: NSObject {
var arrResourceData: [YHResourceListModel]?
var hasMoreForResource: Bool = true
var currentPage: Int = 1
var pageSize: Int = 20
var pageSize: Int = 10
var preloadItemIndex: Int = 10
var totalCount: Int = 0
......
......@@ -88,7 +88,7 @@ class YHDynamicItem: SmartCodable {
return
}
isCalHeight = true
let text = content.isEmpty ? title : content
let text = title
let width = (KScreenWidth - 47) / 2
let font = UIFont.PFSC_R(ofSize: 15) // 字体大小改为15
let maxWidth = width - 16 // 最大宽度限制(左右各8的内边距)
......
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