Commit 6e8f76e9 authored by David黄金龙's avatar David黄金龙

Merge branch 'develop' of http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS into develop

* 'develop' of http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS:
  // JPush
  // 我的证件UI走查
  // 集成JPush
  // UI走查
  // 我的证件
parents d5d44e3b f2622100
...@@ -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 */; };
...@@ -621,6 +622,7 @@ ...@@ -621,6 +622,7 @@
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>"; };
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>"; };
...@@ -1645,6 +1647,7 @@ ...@@ -1645,6 +1647,7 @@
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
A5573ED12B317BFF00D98EC0 /* AppDelegate.swift */, A5573ED12B317BFF00D98EC0 /* AppDelegate.swift */,
04AA19FC2BB40D5C00C1CBBD /* Applegate(JPush).swift */,
A51044172B493675006B60BB /* README.md */, A51044172B493675006B60BB /* README.md */,
A5ACE9142B4564F7002C94D2 /* Res */, A5ACE9142B4564F7002C94D2 /* Res */,
A5ACE8D72B4564F7002C94D2 /* Classes */, A5ACE8D72B4564F7002C94D2 /* Classes */,
...@@ -2322,6 +2325,7 @@ ...@@ -2322,6 +2325,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 */,
......
...@@ -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()
//全局导航栏、返回事件/手势 //全局导航栏、返回事件/手势
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() {
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)
}
//系统获取Token
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
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]?) {
}
}
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
import UIKit import UIKit
import IQKeyboardManagerSwift import IQKeyboardManagerSwift
import AttributedString
class YHCertificateUploadContentListVC: YHBaseViewController { class YHCertificateUploadContentListVC: YHBaseViewController {
...@@ -312,7 +313,7 @@ extension YHCertificateUploadContentListVC: UITableViewDelegate, UITableViewData ...@@ -312,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
} }
...@@ -351,7 +352,7 @@ extension YHCertificateUploadContentListVC: UITableViewDelegate, UITableViewData ...@@ -351,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
...@@ -417,7 +418,7 @@ extension YHCertificateUploadContentListVC: UITableViewDelegate, UITableViewData ...@@ -417,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 = ""
} }
...@@ -463,7 +464,14 @@ extension YHCertificateUploadContentListVC: UITableViewDelegate, UITableViewData ...@@ -463,7 +464,14 @@ 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 label.snp.makeConstraints { make in
......
...@@ -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
......
...@@ -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 */
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