Commit 8ed6edc7 authored by pete谢兆麟's avatar pete谢兆麟

Merge commit 'd12a1f3d' into xiezhaolin

# Conflicts:
#	galaxy/galaxy.xcodeproj/project.pbxproj
parents 8bbb69de d12a1f3d
...@@ -67,6 +67,9 @@ target 'galaxy' do ...@@ -67,6 +67,9 @@ target 'galaxy' do
pod 'LookinServer','1.2.6',:subspecs => ['Swift'], :configurations => ['Debug'] pod 'LookinServer','1.2.6',:subspecs => ['Swift'], :configurations => ['Debug']
#阿里云OOS #阿里云OOS
pod 'AliyunOSSiOS','2.10.18' pod 'AliyunOSSiOS','2.10.18'
#极光推送
pod 'JPush', '5.2.0'
pod 'JCore', '4.6.0-noidfa'
############# 网易云信 IM相关 start ############# ############# 网易云信 IM相关 start #############
#A 基础Kit库 #A 基础Kit库
......
...@@ -233,6 +233,7 @@ ...@@ -233,6 +233,7 @@
04A7BD152BA4361700BD35A2 /* YHMyDocumentDetailModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04A7BD142BA4361700BD35A2 /* YHMyDocumentDetailModel.swift */; }; 04A7BD152BA4361700BD35A2 /* YHMyDocumentDetailModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04A7BD142BA4361700BD35A2 /* YHMyDocumentDetailModel.swift */; };
04A7BD172BA43A0F00BD35A2 /* YHMyDocumentsDetailViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04A7BD162BA43A0F00BD35A2 /* YHMyDocumentsDetailViewModel.swift */; }; 04A7BD172BA43A0F00BD35A2 /* YHMyDocumentsDetailViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04A7BD162BA43A0F00BD35A2 /* YHMyDocumentsDetailViewModel.swift */; };
04A7BD192BA441D400BD35A2 /* YHMyDocumentsUrlModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04A7BD182BA441D400BD35A2 /* YHMyDocumentsUrlModel.swift */; }; 04A7BD192BA441D400BD35A2 /* YHMyDocumentsUrlModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04A7BD182BA441D400BD35A2 /* YHMyDocumentsUrlModel.swift */; };
04AA19FD2BB40D5C00C1CBBD /* Applegate(JPush).swift in Sources */ = {isa = PBXBuildFile; fileRef = 04AA19FC2BB40D5C00C1CBBD /* Applegate(JPush).swift */; };
04AF58C42B4FC51C0066011A /* YHLocalizable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04AF58C32B4FC51C0066011A /* YHLocalizable.swift */; }; 04AF58C42B4FC51C0066011A /* YHLocalizable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04AF58C32B4FC51C0066011A /* YHLocalizable.swift */; };
04C693622B723AB8004C1758 /* YHMySettingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04C693612B723AB8004C1758 /* YHMySettingViewController.swift */; }; 04C693622B723AB8004C1758 /* YHMySettingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04C693612B723AB8004C1758 /* YHMySettingViewController.swift */; };
04C693642B723B56004C1758 /* YHMySettingCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04C693632B723B56004C1758 /* YHMySettingCell.swift */; }; 04C693642B723B56004C1758 /* YHMySettingCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04C693632B723B56004C1758 /* YHMySettingCell.swift */; };
...@@ -254,6 +255,7 @@ ...@@ -254,6 +255,7 @@
A520124F2BABCE05008655EA /* YHFileListContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A520124E2BABCE05008655EA /* YHFileListContentView.swift */; }; A520124F2BABCE05008655EA /* YHFileListContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A520124E2BABCE05008655EA /* YHFileListContentView.swift */; };
A53026902B4E6F2700F35102 /* YHHomeCustomCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A530268F2B4E6F2700F35102 /* YHHomeCustomCell.swift */; }; A53026902B4E6F2700F35102 /* YHHomeCustomCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A530268F2B4E6F2700F35102 /* YHHomeCustomCell.swift */; };
A53B61122BB128AF0010B573 /* YHFileListItemsView2.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53B61112BB128AF0010B573 /* YHFileListItemsView2.swift */; }; A53B61122BB128AF0010B573 /* YHFileListItemsView2.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53B61112BB128AF0010B573 /* YHFileListItemsView2.swift */; };
A53B61192BB3C9960010B573 /* YHMyDocListHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53B61182BB3C9960010B573 /* YHMyDocListHeaderView.swift */; };
A554A5122B99715000EA5973 /* YHConstantArrayData.swift in Sources */ = {isa = PBXBuildFile; fileRef = A554A5112B99715000EA5973 /* YHConstantArrayData.swift */; }; A554A5122B99715000EA5973 /* YHConstantArrayData.swift in Sources */ = {isa = PBXBuildFile; fileRef = A554A5112B99715000EA5973 /* YHConstantArrayData.swift */; };
A5551FFE2B4C26CE00510980 /* YHBaseViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5551FFD2B4C26CE00510980 /* YHBaseViewModel.swift */; }; A5551FFE2B4C26CE00510980 /* YHBaseViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5551FFD2B4C26CE00510980 /* YHBaseViewModel.swift */; };
A5573ED22B317BFF00D98EC0 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5573ED12B317BFF00D98EC0 /* AppDelegate.swift */; }; A5573ED22B317BFF00D98EC0 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5573ED12B317BFF00D98EC0 /* AppDelegate.swift */; };
...@@ -624,6 +626,8 @@ ...@@ -624,6 +626,8 @@
04A7BD142BA4361700BD35A2 /* YHMyDocumentDetailModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyDocumentDetailModel.swift; sourceTree = "<group>"; }; 04A7BD142BA4361700BD35A2 /* YHMyDocumentDetailModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyDocumentDetailModel.swift; sourceTree = "<group>"; };
04A7BD162BA43A0F00BD35A2 /* YHMyDocumentsDetailViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyDocumentsDetailViewModel.swift; sourceTree = "<group>"; }; 04A7BD162BA43A0F00BD35A2 /* YHMyDocumentsDetailViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyDocumentsDetailViewModel.swift; sourceTree = "<group>"; };
04A7BD182BA441D400BD35A2 /* YHMyDocumentsUrlModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyDocumentsUrlModel.swift; sourceTree = "<group>"; }; 04A7BD182BA441D400BD35A2 /* YHMyDocumentsUrlModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyDocumentsUrlModel.swift; sourceTree = "<group>"; };
04AA19FC2BB40D5C00C1CBBD /* Applegate(JPush).swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Applegate(JPush).swift"; sourceTree = "<group>"; };
04AA19FE2BB5198100C1CBBD /* galaxyDebug.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = galaxyDebug.entitlements; sourceTree = "<group>"; };
04AF58C32B4FC51C0066011A /* YHLocalizable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLocalizable.swift; sourceTree = "<group>"; }; 04AF58C32B4FC51C0066011A /* YHLocalizable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLocalizable.swift; sourceTree = "<group>"; };
04C693612B723AB8004C1758 /* YHMySettingViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMySettingViewController.swift; sourceTree = "<group>"; }; 04C693612B723AB8004C1758 /* YHMySettingViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMySettingViewController.swift; sourceTree = "<group>"; };
04C693632B723B56004C1758 /* YHMySettingCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMySettingCell.swift; sourceTree = "<group>"; }; 04C693632B723B56004C1758 /* YHMySettingCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMySettingCell.swift; sourceTree = "<group>"; };
...@@ -647,6 +651,7 @@ ...@@ -647,6 +651,7 @@
A520124E2BABCE05008655EA /* YHFileListContentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHFileListContentView.swift; sourceTree = "<group>"; }; A520124E2BABCE05008655EA /* YHFileListContentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHFileListContentView.swift; sourceTree = "<group>"; };
A530268F2B4E6F2700F35102 /* YHHomeCustomCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeCustomCell.swift; sourceTree = "<group>"; }; A530268F2B4E6F2700F35102 /* YHHomeCustomCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeCustomCell.swift; sourceTree = "<group>"; };
A53B61112BB128AF0010B573 /* YHFileListItemsView2.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHFileListItemsView2.swift; sourceTree = "<group>"; }; A53B61112BB128AF0010B573 /* YHFileListItemsView2.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHFileListItemsView2.swift; sourceTree = "<group>"; };
A53B61182BB3C9960010B573 /* YHMyDocListHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyDocListHeaderView.swift; sourceTree = "<group>"; };
A554A5112B99715000EA5973 /* YHConstantArrayData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHConstantArrayData.swift; sourceTree = "<group>"; }; A554A5112B99715000EA5973 /* YHConstantArrayData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHConstantArrayData.swift; sourceTree = "<group>"; };
A5551FFD2B4C26CE00510980 /* YHBaseViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHBaseViewModel.swift; sourceTree = "<group>"; }; A5551FFD2B4C26CE00510980 /* YHBaseViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHBaseViewModel.swift; sourceTree = "<group>"; };
A5573ECE2B317BFF00D98EC0 /* galaxy.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = galaxy.app; sourceTree = BUILT_PRODUCTS_DIR; }; A5573ECE2B317BFF00D98EC0 /* galaxy.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = galaxy.app; sourceTree = BUILT_PRODUCTS_DIR; };
...@@ -1041,6 +1046,7 @@ ...@@ -1041,6 +1046,7 @@
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
04EA23062BB50719009DA928 /* View */, 04EA23062BB50719009DA928 /* View */,
A53B61172BB3C9410010B573 /* V */,
04A7BD0D2BA41C7600BD35A2 /* ViewModel */, 04A7BD0D2BA41C7600BD35A2 /* ViewModel */,
04A7BD0C2BA41C6E00BD35A2 /* Model */, 04A7BD0C2BA41C6E00BD35A2 /* Model */,
045EEDF92B9F171A0022A143 /* C */, 045EEDF92B9F171A0022A143 /* C */,
...@@ -1627,6 +1633,14 @@ ...@@ -1627,6 +1633,14 @@
path = C; path = C;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
A53B61172BB3C9410010B573 /* V */ = {
isa = PBXGroup;
children = (
A53B61182BB3C9960010B573 /* YHMyDocListHeaderView.swift */,
);
path = V;
sourceTree = "<group>";
};
A5573EC52B317BFF00D98EC0 = { A5573EC52B317BFF00D98EC0 = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
...@@ -1653,7 +1667,9 @@ ...@@ -1653,7 +1667,9 @@
A5573ED02B317BFF00D98EC0 /* galaxy */ = { A5573ED02B317BFF00D98EC0 /* galaxy */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
04AA19FE2BB5198100C1CBBD /* galaxyDebug.entitlements */,
A5573ED12B317BFF00D98EC0 /* AppDelegate.swift */, A5573ED12B317BFF00D98EC0 /* AppDelegate.swift */,
04AA19FC2BB40D5C00C1CBBD /* Applegate(JPush).swift */,
A51044172B493675006B60BB /* README.md */, A51044172B493675006B60BB /* README.md */,
A5ACE9142B4564F7002C94D2 /* Res */, A5ACE9142B4564F7002C94D2 /* Res */,
A5ACE8D72B4564F7002C94D2 /* Classes */, A5ACE8D72B4564F7002C94D2 /* Classes */,
...@@ -2331,6 +2347,7 @@ ...@@ -2331,6 +2347,7 @@
A5C5B2E82B4EC95600A7C5D1 /* YHDavidTestCollectionViewCell.swift in Sources */, A5C5B2E82B4EC95600A7C5D1 /* YHDavidTestCollectionViewCell.swift in Sources */,
045EEEB02B9F171A0022A143 /* YHWorkItemView.swift in Sources */, 045EEEB02B9F171A0022A143 /* YHWorkItemView.swift in Sources */,
0468D4222B493A5E00CFB916 /* YHPhoneMessageView.swift in Sources */, 0468D4222B493A5E00CFB916 /* YHPhoneMessageView.swift in Sources */,
04AA19FD2BB40D5C00C1CBBD /* Applegate(JPush).swift in Sources */,
0468D4362B57752F00CFB916 /* YHUserModel.swift in Sources */, 0468D4362B57752F00CFB916 /* YHUserModel.swift in Sources */,
045EEE992B9F171A0022A143 /* YHPreviewInfoHoldView.swift in Sources */, 045EEE992B9F171A0022A143 /* YHPreviewInfoHoldView.swift in Sources */,
045EEE7E2B9F171A0022A143 /* YHPersonInfoCellModel1.swift in Sources */, 045EEE7E2B9F171A0022A143 /* YHPersonInfoCellModel1.swift in Sources */,
...@@ -2400,6 +2417,7 @@ ...@@ -2400,6 +2417,7 @@
0468D4242B494BEA00CFB916 /* YHCodeResultViewController.swift in Sources */, 0468D4242B494BEA00CFB916 /* YHCodeResultViewController.swift in Sources */,
04A671602BA0280800C1FB91 /* YHFileRenameInputView.swift in Sources */, 04A671602BA0280800C1FB91 /* YHFileRenameInputView.swift in Sources */,
A5ACE93F2B4564F7002C94D2 /* UIViewController+Extension.swift in Sources */, A5ACE93F2B4564F7002C94D2 /* UIViewController+Extension.swift in Sources */,
A53B61192BB3C9960010B573 /* YHMyDocListHeaderView.swift in Sources */,
045EEF082B9F171A0022A143 /* YHBasicInfoCellModel.swift in Sources */, 045EEF082B9F171A0022A143 /* YHBasicInfoCellModel.swift in Sources */,
A592FE952BA6D23C0062FACA /* YHCertificateEntryCell.swift in Sources */, A592FE952BA6D23C0062FACA /* YHCertificateEntryCell.swift in Sources */,
A5ACE9472B4564F7002C94D2 /* YHHUD.swift in Sources */, A5ACE9472B4564F7002C94D2 /* YHHUD.swift in Sources */,
...@@ -2891,6 +2909,7 @@ ...@@ -2891,6 +2909,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES; ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
CODE_SIGN_ENTITLEMENTS = galaxy/galaxyDebug.entitlements;
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual; CODE_SIGN_STYLE = Manual;
......
...@@ -27,6 +27,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate { ...@@ -27,6 +27,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// JPush服务注册
registerJPushService(launchOptions)
//全局导航栏、返回事件/手势 //全局导航栏、返回事件/手势
setupNavBar() setupNavBar()
......
//
// Applegate(JPush).swift
// galaxy
//
// Created by edy on 2024/3/27.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
extension AppDelegate: JPUSHRegisterDelegate {
// 注册JPush服务
func registerJPushService(_ launchOptions: [UIApplication.LaunchOptionsKey: Any]?) {
let entity: JPUSHRegisterEntity = JPUSHRegisterEntity()
entity.types = Int(JPAuthorizationOptions.alert.rawValue |
JPAuthorizationOptions.badge.rawValue |
JPAuthorizationOptions.sound.rawValue |
JPAuthorizationOptions.providesAppNotificationSettings.rawValue)
JPUSHService.register(forRemoteNotificationConfig: entity, delegate: self)
// Required
// init Push
// notice: 2.1.5 版本的 SDK 新增的注册方法,改成可上报 IDFA,如果没有使用 IDFA 直接传 nil
//初始化极光推送服务,调用了本 API 后,开启 JPush 推送服务,将会开始收集上报 SDK 业务功能所必要的用户个人信息
// [JPUSHService setupWithOption:launchOptions appKey:appKey
// channel:channel
// apsForProduction:isProduction
// advertisingIdentifier:advertisingId];
let isProduction = false
JPUSHService.setup(withOption:launchOptions,
appKey:"c6a9e10575b85ee90f3e8afe",
channel:"",
apsForProduction: isProduction)
}
//系统获取Token
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
let deviceTokenStr = deviceToken.map{String(format:"%02.2hhx", arguments: [$0]) }.joined()
print("deviceToken:\(deviceTokenStr)")
JPUSHService.registerDeviceToken(deviceToken)
}
//获取token 失败
func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error) { //可选
print("did Fail To Register For Remote Notifications With Error: \(error)")
}
//点推送进来执行这个方法
func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
JPUSHService.handleRemoteNotification(userInfo)
completionHandler(UIBackgroundFetchResult.newData)
}
//后台进前台
func applicationDidEnterBackground(_ application: UIApplication) {
//销毁通知红点
UIApplication.shared.applicationIconBadgeNumber = 0
JPUSHService.setBadge(0)
UNUserNotificationCenter.current().removeAllPendingNotificationRequests()
}
@available(iOS 10.0, *)
func jpushNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: ((Int) -> Void)) {
let userInfo = notification.request.content.userInfo
if notification.request.trigger is UNPushNotificationTrigger {
JPUSHService.handleRemoteNotification(userInfo)
}
// 需要执行这个方法,选择是否提醒用户,有Badge、Sound、Alert三种类型可以选择设置
completionHandler(Int(UNNotificationPresentationOptions.alert.rawValue))
}
@available(iOS 10.0, *)
func jpushNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: (() -> Void)) {
let userInfo = response.notification.request.content.userInfo
if response.notification.request.trigger is UNPushNotificationTrigger {
JPUSHService.handleRemoteNotification(userInfo)
}
// 系统要求执行这个方法
completionHandler()
}
func jpushNotificationCenter(_ center: UNUserNotificationCenter, openSettingsFor notification: UNNotification) {
}
func jpushNotificationAuthorization(_ status: JPAuthorizationStatus, withInfo info: [AnyHashable : Any]?) {
}
}
...@@ -22,6 +22,10 @@ class YHBaseViewController: UIViewController { ...@@ -22,6 +22,10 @@ class YHBaseViewController: UIViewController {
gk_navLineHidden = true gk_navLineHidden = true
gk_navBarAlpha = 0 gk_navBarAlpha = 0
gk_backImage = UIImage(named: "nav_icon_back_back")
// gk_backImage = UIImage(named: "nav_back_icon")
#if DEBUG #if DEBUG
IQKeyboardManager.shared.enable = true IQKeyboardManager.shared.enable = true
#endif #endif
......
...@@ -35,7 +35,7 @@ class YHFileListViewController: YHBaseViewController { ...@@ -35,7 +35,7 @@ class YHFileListViewController: YHBaseViewController {
private lazy var myContentView : YHFileListContentView = { private lazy var myContentView : YHFileListContentView = {
let view = YHFileListContentView() let view = YHFileListContentView()
view.backgroundColor = .white view.backgroundColor = .white
view.layer.cornerRadius = kCornerRadius6 view.layer.cornerRadius = kCornerRadius12
view.clipsToBounds = true view.clipsToBounds = true
return view return view
}() }()
......
...@@ -42,6 +42,10 @@ extension YHFileListContentView { ...@@ -42,6 +42,10 @@ extension YHFileListContentView {
let sessionBkgImageV : UIImageView = UIImageView(image: UIImage(named: "file_list_head_bkg")) let sessionBkgImageV : UIImageView = UIImageView(image: UIImage(named: "file_list_head_bkg"))
sessionBkgImageV.contentMode = .scaleAspectFill sessionBkgImageV.contentMode = .scaleAspectFill
sessionBkgImageV.clipsToBounds = true
sessionBkgImageV.roundCorners([.topLeft,.topRight], radius: kCornerRadius12)
// sessionBkgImageV.roundCorners(.topRight, radius: kCornerRadius12)
addSubview(sessionBkgImageV) addSubview(sessionBkgImageV)
if arrData.isEmpty { if arrData.isEmpty {
sessionBkgImageV.snp.makeConstraints { make in sessionBkgImageV.snp.makeConstraints { make in
...@@ -62,6 +66,8 @@ extension YHFileListContentView { ...@@ -62,6 +66,8 @@ extension YHFileListContentView {
} }
} }
sessionBkgImageV.layoutIfNeeded()
var lastView : UIView? var lastView : UIView?
for (index,item) in arrData.enumerated() { for (index,item) in arrData.enumerated() {
if let iii = item { if let iii = item {
......
...@@ -169,11 +169,11 @@ private extension YHFileListHeaerView { ...@@ -169,11 +169,11 @@ private extension YHFileListHeaerView {
guard let dataModel = dataModel else { return } guard let dataModel = dataModel else { return }
let a: ASAttributedString = .init("您有 ", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.white)) let a: ASAttributedString = .init("您有 ", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.white))
let aa: ASAttributedString = .init(NSAttributedString(string: String(dataModel.to_be_submit_num)), .font(UIFont.PFSC_B(ofSize: 15)),.foreground(UIColor.warnColor)) let aa: ASAttributedString = .init(NSAttributedString(string: String(dataModel.to_be_submit_num)), .font(UIFont.PFSC_B(ofSize: 15)),.foreground(UIColor(hex: 0xFFE6B5, alpha: 1.0)))
let aaa: ASAttributedString = .init(" 项待提交", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.white)) let aaa: ASAttributedString = .init(" 项待提交", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.white))
waitSubmitLable.attributed.text = a + aa + aaa waitSubmitLable.attributed.text = a + aa + aaa
let bb: ASAttributedString = .init(NSAttributedString(string: String(dataModel.reject_num)), .font(UIFont.PFSC_B(ofSize: 15)),.foreground(UIColor.warnColor)) let bb: ASAttributedString = .init(NSAttributedString(string: String(dataModel.reject_num)), .font(UIFont.PFSC_B(ofSize: 15)),.foreground(UIColor(hex: 0xFFE6B5, alpha: 1.0)))
let bbb: ASAttributedString = .init(" 项需重传", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.white)) let bbb: ASAttributedString = .init(" 项需重传", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.white))
reuploadLable.attributed.text = a + bb + bbb reuploadLable.attributed.text = a + bb + bbb
......
...@@ -43,6 +43,7 @@ class YHCertificateListContainerVC: YHBaseViewController { ...@@ -43,6 +43,7 @@ class YHCertificateListContainerVC: YHBaseViewController {
var categoryInfo: YHCategoryData = YHCategoryData() var categoryInfo: YHCategoryData = YHCategoryData()
lazy var navBar: YHCustomNavigationBar = { lazy var navBar: YHCustomNavigationBar = {
let bar = YHCustomNavigationBar.navBar() let bar = YHCustomNavigationBar.navBar()
bar.backgroundColor = .white
bar.showLeftSecondButtonType(.search) bar.showLeftSecondButtonType(.search)
bar.backBlock = { bar.backBlock = {
[weak self] in [weak self] in
...@@ -78,6 +79,7 @@ class YHCertificateListContainerVC: YHBaseViewController { ...@@ -78,6 +79,7 @@ class YHCertificateListContainerVC: YHBaseViewController {
segview.indicators = [indicator] segview.indicators = [indicator]
segview.backgroundColor = .clear segview.backgroundColor = .clear
segview.listContainer = listContainerView segview.listContainer = listContainerView
segview.backgroundColor = .white
return segview return segview
}() }()
...@@ -137,6 +139,7 @@ class YHCertificateListContainerVC: YHBaseViewController { ...@@ -137,6 +139,7 @@ class YHCertificateListContainerVC: YHBaseViewController {
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
self.gk_navigationBar.isHidden = true self.gk_navigationBar.isHidden = true
self.view.backgroundColor = .white
self.navBar.title = "资料".local self.navBar.title = "资料".local
if categoryInfo.categoryId == YHCertificateCategoryId.mainApplicant.rawValue { if categoryInfo.categoryId == YHCertificateCategoryId.mainApplicant.rawValue {
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
import UIKit import UIKit
import IQKeyboardManagerSwift import IQKeyboardManagerSwift
import AttributedString
class YHCertificateUploadContentListVC: YHBaseViewController { class YHCertificateUploadContentListVC: YHBaseViewController {
...@@ -62,8 +63,6 @@ class YHCertificateUploadContentListVC: YHBaseViewController { ...@@ -62,8 +63,6 @@ class YHCertificateUploadContentListVC: YHBaseViewController {
tableView.contentInsetAdjustmentBehavior = .never tableView.contentInsetAdjustmentBehavior = .never
} }
tableView.showsVerticalScrollIndicator = false tableView.showsVerticalScrollIndicator = false
tableView.estimatedSectionHeaderHeight = 1.0
tableView.estimatedSectionFooterHeight = 1.0
tableView.backgroundColor = .white tableView.backgroundColor = .white
tableView.separatorStyle = .none tableView.separatorStyle = .none
tableView.delegate = self tableView.delegate = self
...@@ -233,7 +232,7 @@ extension YHCertificateUploadContentListVC: UITableViewDelegate, UITableViewData ...@@ -233,7 +232,7 @@ extension YHCertificateUploadContentListVC: UITableViewDelegate, UITableViewData
if indexPath.section == 0 { if indexPath.section == 0 {
let cell = tableView.dequeueReusableCell(withIdentifier: YHCertificateTemplateCell.cellReuseIdentifier, for: indexPath) as! YHCertificateTemplateCell let cell = tableView.dequeueReusableCell(withIdentifier: YHCertificateTemplateCell.cellReuseIdentifier, for: indexPath) as! YHCertificateTemplateCell
cell.update(bottomMargin: 20) cell.update(bottomMargin: 15)
if 0 <= indexPath.row && indexPath.row < templateArr.count { if 0 <= indexPath.row && indexPath.row < templateArr.count {
cell.templatePath = templateArr[indexPath.row] cell.templatePath = templateArr[indexPath.row]
} }
...@@ -314,7 +313,7 @@ extension YHCertificateUploadContentListVC: UITableViewDelegate, UITableViewData ...@@ -314,7 +313,7 @@ extension YHCertificateUploadContentListVC: UITableViewDelegate, UITableViewData
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if indexPath.section == 0 { if indexPath.section == 0 {
return 82.0 return 77.0
} }
return UITableView.automaticDimension return UITableView.automaticDimension
} }
...@@ -353,7 +352,7 @@ extension YHCertificateUploadContentListVC: UITableViewDelegate, UITableViewData ...@@ -353,7 +352,7 @@ extension YHCertificateUploadContentListVC: UITableViewDelegate, UITableViewData
} }
let tipsLabel = UILabel() let tipsLabel = UILabel()
tipsLabel.textColor = UIColor.mainTextColor tipsLabel.textColor = UIColor.labelTextColor2
tipsLabel.textAlignment = .left tipsLabel.textAlignment = .left
tipsLabel.font = UIFont.PFSC_R(ofSize:14) tipsLabel.font = UIFont.PFSC_R(ofSize:14)
tipsLabel.numberOfLines = 0 tipsLabel.numberOfLines = 0
...@@ -366,7 +365,7 @@ extension YHCertificateUploadContentListVC: UITableViewDelegate, UITableViewData ...@@ -366,7 +365,7 @@ extension YHCertificateUploadContentListVC: UITableViewDelegate, UITableViewData
make.top.equalTo(titlelabel.snp.bottom).offset(5) make.top.equalTo(titlelabel.snp.bottom).offset(5)
make.left.equalToSuperview().offset(20) make.left.equalToSuperview().offset(20)
make.right.equalToSuperview().offset(-20) make.right.equalToSuperview().offset(-20)
make.bottom.equalToSuperview().offset(-20) make.bottom.equalToSuperview().offset(-15)
} }
return view return view
} }
...@@ -419,7 +418,7 @@ extension YHCertificateUploadContentListVC: UITableViewDelegate, UITableViewData ...@@ -419,7 +418,7 @@ extension YHCertificateUploadContentListVC: UITableViewDelegate, UITableViewData
tipsLabel.textAlignment = .left tipsLabel.textAlignment = .left
tipsLabel.numberOfLines = 0 tipsLabel.numberOfLines = 0
if !supplementInfo.auditContent.isEmpty { if !supplementInfo.auditContent.isEmpty {
tipsLabel.text = "被驳回原因: \(supplementInfo.auditContent)" tipsLabel.text = "被驳回原因: " + supplementInfo.auditContent
} else { } else {
tipsLabel.text = "" tipsLabel.text = ""
} }
...@@ -442,14 +441,14 @@ extension YHCertificateUploadContentListVC: UITableViewDelegate, UITableViewData ...@@ -442,14 +441,14 @@ extension YHCertificateUploadContentListVC: UITableViewDelegate, UITableViewData
make.left.equalToSuperview().offset(20) make.left.equalToSuperview().offset(20)
make.right.equalToSuperview().offset(-20) make.right.equalToSuperview().offset(-20)
make.top.equalTo(titlelabel.snp.bottom).offset(3) make.top.equalTo(titlelabel.snp.bottom).offset(3)
make.bottom.equalToSuperview().offset(-15) make.bottom.equalToSuperview()
} }
return view return view
} }
private func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> CGFloat { private func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> CGFloat {
if section == 0 { if section == 0 {
return 1.0 return 20.0
} }
return 60.0 return 60.0
} }
...@@ -465,9 +464,22 @@ extension YHCertificateUploadContentListVC: UITableViewDelegate, UITableViewData ...@@ -465,9 +464,22 @@ extension YHCertificateUploadContentListVC: UITableViewDelegate, UITableViewData
label.textColor = UIColor.labelTextColor2 label.textColor = UIColor.labelTextColor2
label.textAlignment = .center label.textAlignment = .center
label.font = UIFont.PFSC_R(ofSize:12) label.font = UIFont.PFSC_R(ofSize:12)
label.text = "*最多上传\(items.count)/99张图片或文件"
let tipsFont = UIFont.PFSC_R(ofSize: 12)
let a: ASAttributedString = .init("*最多上传", .font(tipsFont),.foreground(UIColor.labelTextColor2))
let b: ASAttributedString = .init(" \(items.count)/99 ", .font(UIFont.PFSC_M(ofSize: 12)), .foreground(UIColor.init(hexString:"#2F2F2F")))
let c: ASAttributedString = .init("张图片或文件", .font(tipsFont), .foreground(UIColor.labelTextColor2))
label.attributed.text = a+b+c
view.addSubview(label) view.addSubview(label)
label.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalToSuperview().offset(20)
make.bottom.equalToSuperview().offset(-20)
}
return view return view
} }
......
...@@ -144,7 +144,7 @@ class YHCertificateFilterView: UIView { ...@@ -144,7 +144,7 @@ class YHCertificateFilterView: UIView {
lazy var confirmBtn:UIButton = { lazy var confirmBtn:UIButton = {
let btn = UIButton() let btn = UIButton()
btn.setTitle("确定".local, for: .normal) btn.setTitle("确定".local, for: .normal)
btn.titleLabel?.font = UIFont.PFSC_R(ofSize: 14) btn.titleLabel?.font = UIFont.PFSC_M(ofSize: 14)
btn.setTitleColor(.white, for: .normal) btn.setTitleColor(.white, for: .normal)
btn.backgroundColor = UIColor(hexString:"#4388FF") btn.backgroundColor = UIColor(hexString:"#4388FF")
btn.layer.cornerRadius = 8.0 btn.layer.cornerRadius = 8.0
...@@ -155,7 +155,7 @@ class YHCertificateFilterView: UIView { ...@@ -155,7 +155,7 @@ class YHCertificateFilterView: UIView {
lazy var resetBtn:UIButton = { lazy var resetBtn:UIButton = {
let btn = UIButton() let btn = UIButton()
btn.setTitle("重置", for: .normal) btn.setTitle("重置", for: .normal)
btn.titleLabel?.font = UIFont.PFSC_R(ofSize: 14) btn.titleLabel?.font = UIFont.PFSC_M(ofSize: 14)
btn.setTitleColor(UIColor.mainTextColor, for: .normal) btn.setTitleColor(UIColor.mainTextColor, for: .normal)
btn.backgroundColor = UIColor(hexString:"#F8F9FB") btn.backgroundColor = UIColor(hexString:"#F8F9FB")
btn.layer.cornerRadius = 8.0 btn.layer.cornerRadius = 8.0
......
...@@ -71,7 +71,7 @@ class YHCertificateInfoCell: UITableViewCell { ...@@ -71,7 +71,7 @@ class YHCertificateInfoCell: UITableViewCell {
var result:ASAttributedString = .init(string:"", .font(UIFont.PFSC_M(ofSize: 16)), .foreground(UIColor.mainTextColor)) var result:ASAttributedString = .init(string:"", .font(UIFont.PFSC_M(ofSize: 16)), .foreground(UIColor.mainTextColor))
let mustTag: ASAttributedString = .init("*", .font(UIFont.PFSC_M(ofSize: 16)),.foreground(UIColor.failColor)) let mustTag: ASAttributedString = .init("*", .font(UIFont.PFSC_M(ofSize: 16)),.foreground(UIColor.failColor))
let cerName: ASAttributedString = .init(string:model.name , .font(UIFont.PFSC_M(ofSize: 16)), .foreground(UIColor.mainTextColor)) let cerName: ASAttributedString = .init(string:model.name , .font(UIFont.PFSC_M(ofSize: 16)), .foreground(UIColor.mainTextColor))
var template: ASAttributedString = "\(.view(templateButton, .original(.center)))" var template: ASAttributedString = " \(.view(templateButton, .original(.center)))"
// 是否展示右边的模版按钮 // 是否展示右边的模版按钮
var showTemplateBtn = true var showTemplateBtn = true
......
...@@ -34,7 +34,7 @@ class YHCertificateSearchBar: UIView { ...@@ -34,7 +34,7 @@ class YHCertificateSearchBar: UIView {
lazy var textField:UITextField = { lazy var textField:UITextField = {
let textField = UITextField() let textField = UITextField()
textField.backgroundColor = .clear textField.backgroundColor = .clear
textField.attributedPlaceholder = NSAttributedString(string: "请输出资料名称搜索".local, attributes: [NSAttributedString.Key.foregroundColor : UIColor.placeHolderColor]) textField.attributedPlaceholder = NSAttributedString(string: "请输入关键词搜索".local, attributes: [NSAttributedString.Key.foregroundColor : UIColor.placeHolderColor])
textField.font = UIFont.PFSC_M(ofSize: 12) textField.font = UIFont.PFSC_M(ofSize: 12)
textField.tintColor = UIColor(hexString: "#3D88F8") textField.tintColor = UIColor(hexString: "#3D88F8")
textField.textColor = UIColor.mainTextColor textField.textColor = UIColor.mainTextColor
......
...@@ -7,6 +7,9 @@ ...@@ -7,6 +7,9 @@
// //
import UIKit import UIKit
/*
*我的文书 列表
*/
class YHMyDocumentsListViewController: YHBaseViewController { class YHMyDocumentsListViewController: YHBaseViewController {
var bottomView: UIView! var bottomView: UIView!
...@@ -17,20 +20,38 @@ class YHMyDocumentsListViewController: YHBaseViewController { ...@@ -17,20 +20,38 @@ class YHMyDocumentsListViewController: YHBaseViewController {
var orderId: Int = 0 var orderId: Int = 0
var mobile: String = "" var mobile: String = ""
lazy var headSessionView : YHMyDocListHeaderView = {
let view = YHMyDocListHeaderView()
return view
}()
//头部背景图片
lazy var headBkgImagV: UIImageView = {
let imagV = UIImageView()
imagV.image = UIImage(named: "my_doc_head_bkg")
imagV.contentMode = .scaleAspectFill
return imagV
}()
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
viewModel = YHMyDocumentsListViewModel() viewModel = YHMyDocumentsListViewModel()
gk_navTitle = "我的文书" gk_navTitle = "我的文书"
setView() setView()
getData() getData()
// Do any additional setup after loading the view.
} }
override func viewWillAppear(_ animated: Bool) { override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated) super.viewWillAppear(animated)
getData() getData()
} }
}
extension YHMyDocumentsListViewController {
func getData() { func getData() {
viewModel?.requestDocumentsList("\(orderId)", mobile, callBackBlock: {[weak self] success, error in viewModel?.requestDocumentsList("\(orderId)", mobile, callBackBlock: {[weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
...@@ -44,11 +65,26 @@ class YHMyDocumentsListViewController: YHBaseViewController { ...@@ -44,11 +65,26 @@ class YHMyDocumentsListViewController: YHBaseViewController {
} }
func setView() { func setView() {
//1
view.addSubview(headBkgImagV)
headBkgImagV.snp.makeConstraints { make in
make.top.equalToSuperview()
make.left.right.equalToSuperview()
make.height.equalTo(312)
}
view.addSubview(headSessionView)
headSessionView.snp.makeConstraints { make in
make.top.equalToSuperview().offset(k_Height_NavigationtBarAndStatuBar)
make.left.equalToSuperview().offset(kMargin)
make.right.equalToSuperview().offset(-kMargin)
make.height.equalTo(YHMyDocListHeaderView.viewH)
}
tableView = { tableView = {
let tableView = UITableView(frame:.zero, style:.plain) let tableView = UITableView(frame:.zero, style:.plain)
if #available(iOS 11.0, *) { tableView.contentInsetAdjustmentBehavior = .never
tableView.contentInsetAdjustmentBehavior = .never
}
tableView.backgroundColor = .clear tableView.backgroundColor = .clear
tableView.separatorStyle = .none tableView.separatorStyle = .none
tableView.delegate = self tableView.delegate = self
...@@ -58,44 +94,42 @@ class YHMyDocumentsListViewController: YHBaseViewController { ...@@ -58,44 +94,42 @@ class YHMyDocumentsListViewController: YHBaseViewController {
}() }()
view.addSubview(tableView) view.addSubview(tableView)
tableView.snp.makeConstraints { make in tableView.snp.makeConstraints { make in
make.top.equalTo(k_Height_NavigationtBarAndStatuBar) make.top.equalTo(headSessionView.snp.bottom)
make.bottom.equalTo(-k_Height_safeAreaInsetsBottom() - 64)
make.left.right.bottom.equalTo(view)
}
bottomView = {
let bottom = UIView()
bottom.backgroundColor = .white
return bottom
}()
view.addSubview(bottomView)
bottomView.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview() make.left.right.bottom.equalToSuperview()
make.height.equalTo(k_Height_safeAreaInsetsBottom() + 64)
} }
bottomButton = { // bottomView = {
let button = UIButton(type: .custom) // let bottom = UIView()
// button.backgroundColor = UIColor(hex:0x2274ee) // bottom.backgroundColor = .white
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 16) // return bottom
button.contentHorizontalAlignment = .center // }()
button.setTitle("提交", for: .normal) // view.addSubview(bottomView)
button.setTitleColor( UIColor(hex:0xffffff), for: .normal) // bottomView.snp.makeConstraints { make in
button.layer.cornerRadius = kCornerRadius6 // make.left.right.bottom.equalToSuperview()
button.clipsToBounds = true // make.height.equalTo(k_Height_safeAreaInsetsBottom() + 64)
button.addTarget(self, action: #selector(submit), for: .touchUpInside) // }
return button //
}() // bottomButton = {
bottomView.addSubview(bottomButton) // let button = UIButton(type: .custom)
bottomButton.snp.makeConstraints { make in // button.titleLabel?.font = UIFont.PFSC_M(ofSize: 16)
make.right.equalTo(-16) // button.contentHorizontalAlignment = .center
make.top.equalTo(8) // button.setTitle("提交", for: .normal)
make.height.equalTo(48) // button.setTitleColor( UIColor(hex:0xffffff), for: .normal)
make.left.equalTo(16) // button.layer.cornerRadius = kCornerRadius6
} // button.clipsToBounds = true
// button.addTarget(self, action: #selector(submit), for: .touchUpInside)
bottomButton.layoutIfNeeded() // return button
bottomButton.addYinHeGradualLayer() // }()
// bottomView.addSubview(bottomButton)
// bottomButton.snp.makeConstraints { make in
// make.right.equalTo(-16)
// make.top.equalTo(8)
// make.height.equalTo(48)
// make.left.equalTo(16)
// }
//
// bottomButton.layoutIfNeeded()
// bottomButton.addYinHeGradualLayer()
} }
@objc func submit() { @objc func submit() {
......
//
// YHMyDocListHeaderView.swift
// galaxy
//
// Created by davidhuangA on 2024/3/27.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
enum ClickButtonType {
case downAll //全部下载
case cancel //取消
}
class YHMyDocListHeaderView: UIView {
static let viewH : CGFloat = 46.0
typealias Block = (ClickButtonType) -> ()
var block: Block?
var curShowType : ClickButtonType? {
didSet {
updataUI()
}
}
override init(frame: CGRect) {
super.init(frame: frame)
initView()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
private lazy var titleLable : UILabel = {
let lable0 = UILabel(text: "您好,林先生/女士")
lable0.textColor = UIColor.mainTextColor
lable0.font = UIFont.PFSC_M(ofSize: 21)
return lable0
}()
//批量下载
private lazy var allDownLoadButton : UIButton = {
let button = UIButton(type: .custom)
button.setImage(UIImage(named: "my_doc_down_icon"), for: .normal)
button.setTitle("批量下载", for: .normal)
button.setTitle("批量下载", for: .selected)
button.setTitleColor(.white, for: .normal)
button.setTitleColor(UIColor.labelTextColor2, for: .highlighted)
button.titleLabel?.font = UIFont.PFSC_R(ofSize: 10)
button.addTarget(self, action: #selector(clickAllBtn), for: .touchUpInside)
button.layerCornerRadius = kCornerRadius4
button.clipsToBounds = true
button.iconInLeft(spacing: 2)
return button
}()
//取消
private lazy var cancelButton : UIButton = {
let button = UIButton(type: .custom)
button.setTitle("取消", for: .normal)
button.setTitleColor(UIColor.mainTextColor, for: .normal)
button.addTarget(self, action: #selector(clickCancelBtn), for: .touchUpInside)
button.titleLabel?.font = UIFont.PFSC_R(ofSize: 16)
button.isHidden = true
return button
}()
}
private extension YHMyDocListHeaderView {
func initView() {
backgroundColor = .clear
addSubview(titleLable)
titleLable.snp.makeConstraints { make in
make.top.equalToSuperview().offset(kMargin)
make.left.right.equalToSuperview()
make.right.equalTo(-80)
make.height.equalTo(26)
}
addSubview(allDownLoadButton)
allDownLoadButton.snp.makeConstraints { make in
make.top.equalToSuperview().offset(19)
make.right.equalToSuperview()
make.width.equalTo(70)
make.height.equalTo(24)
}
allDownLoadButton.layoutIfNeeded()
allDownLoadButton.addYinHeGradualLayer()
addSubview(cancelButton)
cancelButton.snp.makeConstraints { make in
make.top.equalToSuperview().offset(19)
make.right.equalToSuperview()
make.width.equalTo(34)
make.height.equalTo(24)
}
}
//点击全部下载按钮
@objc func clickAllBtn() {
hiddenButton(type: .downAll)
block?(.downAll)
}
//点击取消按钮
@objc func clickCancelBtn() {
hiddenButton(type: .cancel)
block?(.cancel)
}
private func hiddenButton(type : ClickButtonType) {
if type == .downAll {
allDownLoadButton.isHidden = true
cancelButton.isHidden = false
} else if type == .cancel {
allDownLoadButton.isHidden = false
cancelButton.isHidden = true
}
}
func updataUI() {
guard let type = curShowType else { return }
if type == .downAll {
hiddenButton(type:.cancel)
} else if type == .cancel {
hiddenButton(type:.downAll)
}
}
}
...@@ -33,7 +33,7 @@ class YHMineSchemeViewController: YHBaseViewController { ...@@ -33,7 +33,7 @@ class YHMineSchemeViewController: YHBaseViewController {
gk_navTitleColor = .white gk_navTitleColor = .white
gk_navBarAlpha = 1 gk_navBarAlpha = 1
gk_navBackgroundImage = UIImage(named: "my_scheme_nav") gk_navBackgroundImage = UIImage(named: "my_scheme_nav")
gk_backImage = UIImage(named: "nav_icon_back") gk_backImage = UIImage(named: "nav_icon_back_white")
setView() setView()
loadData() loadData()
} }
......
...@@ -37,6 +37,14 @@ class YHPreviewBaseViewController: YHBaseViewController { ...@@ -37,6 +37,14 @@ class YHPreviewBaseViewController: YHBaseViewController {
make.left.equalTo(16) make.left.equalTo(16)
make.right.equalTo(-16) make.right.equalTo(-16)
} }
NotificationCenter.default.addObserver(self, selector: #selector(beginDragging), name:Notification.Name(rawValue: "scrollViewWillBeginDragging0"), object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(endDragging), name:Notification.Name(rawValue: "scrollViewDidEndDragging0"), object: nil)
} }
} }
...@@ -101,3 +109,16 @@ extension YHPreviewBaseViewController: UIScrollViewDelegate { ...@@ -101,3 +109,16 @@ extension YHPreviewBaseViewController: UIScrollViewDelegate {
} }
} }
} }
extension YHPreviewBaseViewController {
@objc func beginDragging() {
homeTableView.isScrollEnabled = false
vcCanScroll = false
}
@objc func endDragging() {
homeTableView.isScrollEnabled = true
// vcCanScroll = true
}
}
...@@ -30,7 +30,6 @@ class YHPreviewControllerHoldViewController: UIViewController { ...@@ -30,7 +30,6 @@ class YHPreviewControllerHoldViewController: UIViewController {
var segmentedView : JXSegmentedView = JXSegmentedView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 55)) var segmentedView : JXSegmentedView = JXSegmentedView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 55))
lazy var segmentedDataSource: JXSegmentedBaseDataSource = { lazy var segmentedDataSource: JXSegmentedBaseDataSource = {
let dataSource = JXSegmentedTitleDataSource() let dataSource = JXSegmentedTitleDataSource()
// dataSource.isTitleColorGradientEnabled = true
dataSource.titles = arrItemTitles dataSource.titles = arrItemTitles
dataSource.titleNormalFont = UIFont.PFSC_R(ofSize: 16) dataSource.titleNormalFont = UIFont.PFSC_R(ofSize: 16)
......
...@@ -32,6 +32,7 @@ let kMargin : CGFloat = 16.0 ...@@ -32,6 +32,7 @@ let kMargin : CGFloat = 16.0
let kCornerRadius4 : CGFloat = 4.0 let kCornerRadius4 : CGFloat = 4.0
let kCornerRadius6 : CGFloat = 6.0 let kCornerRadius6 : CGFloat = 6.0
let kCornerRadius8 : CGFloat = 8.0 let kCornerRadius8 : CGFloat = 8.0
let kCornerRadius12 : CGFloat = 12.0
......
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "nav_icon_back2@2x.png", "filename" : "nav_icon_back@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "nav_icon_back2@3x.png", "filename" : "nav_icon_back@3x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "icon_download@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "icon_download@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Rectangle 2419@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Rectangle 2419@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
...@@ -12,4 +12,10 @@ ...@@ -12,4 +12,10 @@
#import <ATAuthSDK_D/ATAuthSDK.h> #import <ATAuthSDK_D/ATAuthSDK.h>
#import <AliyunOSSiOS/OSSService.h> #import <AliyunOSSiOS/OSSService.h>
#import "JPUSHService.h"
// iOS10注册APNs所需头文件
#ifdef NSFoundationVersionNumber_iOS_9_x_Max
#import <UserNotifications/UserNotifications.h>
#endif
#endif /* galaxy_Bridge_Header_h */ #endif /* galaxy_Bridge_Header_h */
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>aps-environment</key>
<string>development</string>
</dict>
</plist>
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