Commit 90e2798c authored by pete谢兆麟's avatar pete谢兆麟

Merge commit 'fbb41f1f' into xiezhaolin

parents 486a2c29 fbb41f1f
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
0414BDAB2BC7E9C200225367 /* YHMyPermissionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0414BDAA2BC7E9C200225367 /* YHMyPermissionCell.swift */; }; 0414BDAB2BC7E9C200225367 /* YHMyPermissionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0414BDAA2BC7E9C200225367 /* YHMyPermissionCell.swift */; };
0414BDAD2BC7F02C00225367 /* YHMyNotifySettingVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0414BDAC2BC7F02C00225367 /* YHMyNotifySettingVC.swift */; }; 0414BDAD2BC7F02C00225367 /* YHMyNotifySettingVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0414BDAC2BC7F02C00225367 /* YHMyNotifySettingVC.swift */; };
0414BDB22BCCC0A500225367 /* YHCollectionModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0414BDB12BCCC0A500225367 /* YHCollectionModel.swift */; }; 0414BDB22BCCC0A500225367 /* YHCollectionModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0414BDB12BCCC0A500225367 /* YHCollectionModel.swift */; };
04174D642BCD52BD000BA46D /* YHTestViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04174D632BCD52BD000BA46D /* YHTestViewController.swift */; }; 04174D642BCD52BD000BA46D /* YHDeviceInfoViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04174D632BCD52BD000BA46D /* YHDeviceInfoViewController.swift */; };
04174D732BCD5B74000BA46D /* YHMsgViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04174D672BCD5B74000BA46D /* YHMsgViewModel.swift */; }; 04174D732BCD5B74000BA46D /* YHMsgViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04174D672BCD5B74000BA46D /* YHMsgViewModel.swift */; };
04174D742BCD5B74000BA46D /* IMAppKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04174D692BCD5B74000BA46D /* IMAppKey.swift */; }; 04174D742BCD5B74000BA46D /* IMAppKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04174D692BCD5B74000BA46D /* IMAppKey.swift */; };
04174D762BCD5B74000BA46D /* YHMsgListModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04174D6C2BCD5B74000BA46D /* YHMsgListModel.swift */; }; 04174D762BCD5B74000BA46D /* YHMsgListModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04174D6C2BCD5B74000BA46D /* YHMsgListModel.swift */; };
...@@ -462,7 +462,7 @@ ...@@ -462,7 +462,7 @@
0414BDAA2BC7E9C200225367 /* YHMyPermissionCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyPermissionCell.swift; sourceTree = "<group>"; }; 0414BDAA2BC7E9C200225367 /* YHMyPermissionCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyPermissionCell.swift; sourceTree = "<group>"; };
0414BDAC2BC7F02C00225367 /* YHMyNotifySettingVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyNotifySettingVC.swift; sourceTree = "<group>"; }; 0414BDAC2BC7F02C00225367 /* YHMyNotifySettingVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyNotifySettingVC.swift; sourceTree = "<group>"; };
0414BDB12BCCC0A500225367 /* YHCollectionModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCollectionModel.swift; sourceTree = "<group>"; }; 0414BDB12BCCC0A500225367 /* YHCollectionModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCollectionModel.swift; sourceTree = "<group>"; };
04174D632BCD52BD000BA46D /* YHTestViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHTestViewController.swift; sourceTree = "<group>"; }; 04174D632BCD52BD000BA46D /* YHDeviceInfoViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHDeviceInfoViewController.swift; sourceTree = "<group>"; };
04174D672BCD5B74000BA46D /* YHMsgViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHMsgViewModel.swift; sourceTree = "<group>"; }; 04174D672BCD5B74000BA46D /* YHMsgViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHMsgViewModel.swift; sourceTree = "<group>"; };
04174D692BCD5B74000BA46D /* IMAppKey.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IMAppKey.swift; sourceTree = "<group>"; }; 04174D692BCD5B74000BA46D /* IMAppKey.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IMAppKey.swift; sourceTree = "<group>"; };
04174D6C2BCD5B74000BA46D /* YHMsgListModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHMsgListModel.swift; sourceTree = "<group>"; }; 04174D6C2BCD5B74000BA46D /* YHMsgListModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHMsgListModel.swift; sourceTree = "<group>"; };
...@@ -1973,7 +1973,7 @@ ...@@ -1973,7 +1973,7 @@
0414BDAC2BC7F02C00225367 /* YHMyNotifySettingVC.swift */, 0414BDAC2BC7F02C00225367 /* YHMyNotifySettingVC.swift */,
049A48A72B49417300D0C641 /* YHAboutUsViewController.swift */, 049A48A72B49417300D0C641 /* YHAboutUsViewController.swift */,
048B2A492BC7D9DC00A93BF0 /* YHMyLikeViewController.swift */, 048B2A492BC7D9DC00A93BF0 /* YHMyLikeViewController.swift */,
04174D632BCD52BD000BA46D /* YHTestViewController.swift */, 04174D632BCD52BD000BA46D /* YHDeviceInfoViewController.swift */,
); );
path = C; path = C;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -2620,7 +2620,7 @@ ...@@ -2620,7 +2620,7 @@
045EEEB92B9F171A0022A143 /* YHWorkMessageSelectTableViewCell.swift in Sources */, 045EEEB92B9F171A0022A143 /* YHWorkMessageSelectTableViewCell.swift in Sources */,
044E1E812BC3BBC200A3B4AF /* YHSearchInfomationVC.swift in Sources */, 044E1E812BC3BBC200A3B4AF /* YHSearchInfomationVC.swift in Sources */,
04A7BD0F2BA41C9800BD35A2 /* YHMyDocumentsModel.swift in Sources */, 04A7BD0F2BA41C9800BD35A2 /* YHMyDocumentsModel.swift in Sources */,
04174D642BCD52BD000BA46D /* YHTestViewController.swift in Sources */, 04174D642BCD52BD000BA46D /* YHDeviceInfoViewController.swift in Sources */,
A5ACE92E2B4564F7002C94D2 /* YHValidateCodeInputView.swift in Sources */, A5ACE92E2B4564F7002C94D2 /* YHValidateCodeInputView.swift in Sources */,
045EEED82B9F171A0022A143 /* YHQuestionInfo.swift in Sources */, 045EEED82B9F171A0022A143 /* YHQuestionInfo.swift in Sources */,
048787D32BCE6B7D0036E221 /* YHServiceOrderAlertView.swift in Sources */, 048787D32BCE6B7D0036E221 /* YHServiceOrderAlertView.swift in Sources */,
......
...@@ -52,8 +52,12 @@ extension AppDelegate: JPUSHRegisterDelegate { ...@@ -52,8 +52,12 @@ extension AppDelegate: JPUSHRegisterDelegate {
func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) { func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
JPUSHService.handleRemoteNotification(userInfo) JPUSHService.handleRemoteNotification(userInfo)
completionHandler(UIBackgroundFetchResult.newData) completionHandler(UIBackgroundFetchResult.newData)
// 转换到消息tab // 转换到消息tab
NotificationCenter.default.post(name: YhConstant.YhNotification.didSwithToMsgTabNotification, object: nil) YHLoginManager.shared.needJumpToMsgTabFlag = true
DispatchQueue.main.asyncAfter(deadline: .now() + 0.25, execute: {
goTabBarBy(tabType: .message)
})
} }
...@@ -65,8 +69,6 @@ extension AppDelegate: JPUSHRegisterDelegate { ...@@ -65,8 +69,6 @@ extension AppDelegate: JPUSHRegisterDelegate {
UNUserNotificationCenter.current().removeAllPendingNotificationRequests() UNUserNotificationCenter.current().removeAllPendingNotificationRequests()
} }
@available(iOS 10.0, *)
func jpushNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: ((Int) -> Void)) { func jpushNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: ((Int) -> Void)) {
let userInfo = notification.request.content.userInfo let userInfo = notification.request.content.userInfo
...@@ -77,7 +79,6 @@ extension AppDelegate: JPUSHRegisterDelegate { ...@@ -77,7 +79,6 @@ extension AppDelegate: JPUSHRegisterDelegate {
completionHandler(Int(UNNotificationPresentationOptions.alert.rawValue)) completionHandler(Int(UNNotificationPresentationOptions.alert.rawValue))
} }
@available(iOS 10.0, *)
func jpushNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: (() -> Void)) { func jpushNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: (() -> Void)) {
let userInfo = response.notification.request.content.userInfo let userInfo = response.notification.request.content.userInfo
if response.notification.request.trigger is UNPushNotificationTrigger { if response.notification.request.trigger is UNPushNotificationTrigger {
...@@ -85,6 +86,13 @@ extension AppDelegate: JPUSHRegisterDelegate { ...@@ -85,6 +86,13 @@ extension AppDelegate: JPUSHRegisterDelegate {
} }
// 系统要求执行这个方法 // 系统要求执行这个方法
completionHandler() completionHandler()
// 转换到消息tab
YHLoginManager.shared.needJumpToMsgTabFlag = true
DispatchQueue.main.asyncAfter(deadline: .now() + 0.25, execute: {
goTabBarBy(tabType: .message)
})
} }
......
...@@ -29,7 +29,6 @@ class YHTabBarViewController: ESTabBarController { ...@@ -29,7 +29,6 @@ class YHTabBarViewController: ESTabBarController {
NotificationCenter.default.addObserver(self, selector: #selector(loginSuccess), name: YhConstant.YhNotification.didLoginSuccessNotifiction, object: nil) NotificationCenter.default.addObserver(self, selector: #selector(loginSuccess), name: YhConstant.YhNotification.didLoginSuccessNotifiction, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(logoutSuccess), name: YhConstant.YhNotification.didLogoutSuccessNotifiction, object: nil) NotificationCenter.default.addObserver(self, selector: #selector(logoutSuccess), name: YhConstant.YhNotification.didLogoutSuccessNotifiction, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(clearAllUnreadMsg), name: YhConstant.YhNotification.didMarkAllMessagesReadedNotifiction, object: nil) NotificationCenter.default.addObserver(self, selector: #selector(clearAllUnreadMsg), name: YhConstant.YhNotification.didMarkAllMessagesReadedNotifiction, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(switchToMsgTab), name: YhConstant.YhNotification.didSwithToMsgTabNotification, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(getTotalUnreadMsgCount), name: YhConstant.YhNotification.didRequestUnreadMsgTotalCountNotification, object: nil) NotificationCenter.default.addObserver(self, selector: #selector(getTotalUnreadMsgCount), name: YhConstant.YhNotification.didRequestUnreadMsgTotalCountNotification, object: nil)
} }
...@@ -53,12 +52,6 @@ extension YHTabBarViewController { ...@@ -53,12 +52,6 @@ extension YHTabBarViewController {
printLog("登出成功") printLog("登出成功")
} }
// 转换到消息tab
@objc func switchToMsgTab() {
DispatchQueue.main.async {
self.selectedIndex = 2
}
}
@objc func clearAllUnreadMsg() { @objc func clearAllUnreadMsg() {
DispatchQueue.main.async { DispatchQueue.main.async {
......
...@@ -133,6 +133,14 @@ private extension YHStartPageViewController { ...@@ -133,6 +133,14 @@ private extension YHStartPageViewController {
} }
} }
agreeAlertView.urlBlock = { [weak self] url in
guard let self = self else { return }
let vc = YHWebViewViewController()
vc.url = url
self.navigationController?.pushViewController(vc)
}
} }
} }
...@@ -165,5 +173,11 @@ private extension YHStartPageViewController { ...@@ -165,5 +173,11 @@ private extension YHStartPageViewController {
let window = UIApplication.shared.yhKeyWindow() let window = UIApplication.shared.yhKeyWindow()
window?.rootViewController = tabBarController window?.rootViewController = tabBarController
window?.makeKeyAndVisible() window?.makeKeyAndVisible()
if YHLoginManager.shared.needJumpToMsgTabFlag {
DispatchQueue.main.asyncAfter(deadline: .now() + 0.25, execute: {
goTabBarBy(tabType: .message)
})
}
} }
} }
...@@ -7,11 +7,16 @@ ...@@ -7,11 +7,16 @@
// //
import UIKit import UIKit
import AttributedString
class YHAgreementAlertView: UIView { class YHAgreementAlertView: UIView {
typealias UrlBlock = (_ url: String) -> ()
var urlBlock: UrlBlock?
typealias AgreeBlock = () -> () typealias AgreeBlock = () -> ()
var agreeBlock: AgreeBlock? var agreeBlock: AgreeBlock?
var cancelBlock:AgreeBlock? var cancelBlock:AgreeBlock?
var centerView: UIView! var centerView: UIView!
var titleLabel: UILabel! var titleLabel: UILabel!
var lineView: UIView! var lineView: UIView!
...@@ -83,7 +88,7 @@ class YHAgreementAlertView: UIView { ...@@ -83,7 +88,7 @@ class YHAgreementAlertView: UIView {
label.textColor = UIColor.mainTextColor label.textColor = UIColor.mainTextColor
label.font = UIFont.PFSC_R(ofSize: 16) label.font = UIFont.PFSC_R(ofSize: 16)
label.numberOfLines = 0 label.numberOfLines = 0
label.text = "感谢您信任并使用智汇银河App,我们将通过《智汇银河App隐私协议》和《智汇银河App用户条款》帮助您了解我们收集、使用、存储和共享个人信息的情况,特别是我们所采取的个人信息类型和用途的对应关系。此外,您还能了解到您所享受的相关权利以及实现途径。认真阅读之后,如您同意,请点击下方的按钮开始接受我们的服务。" label.text = ""
return label return label
}() }()
...@@ -135,6 +140,30 @@ class YHAgreementAlertView: UIView { ...@@ -135,6 +140,30 @@ class YHAgreementAlertView: UIView {
make.width.equalTo(itemW) make.width.equalTo(itemW)
make.left.equalTo(disAgressButton.snp.right).offset(10) make.left.equalTo(disAgressButton.snp.right).offset(10)
} }
let a: ASAttributedString = .init("感谢您信任并使用智汇银河App,我们将通过", .font(UIFont.PFSC_R(ofSize: 16)),.foreground(UIColor.mainTextColor))
let aa: ASAttributedString = .init("《智汇银河App隐私协议》", .font(UIFont.PFSC_M(ofSize: 16)),.foreground(UIColor.brandMainColor), .action {
if let block = self.urlBlock {
block("https://www.baidu.com")
}
})
let and: ASAttributedString = .init("和", .font(UIFont.PFSC_R(ofSize: 16)),.foreground(UIColor.mainTextColor))
let aab: ASAttributedString = .init("《智汇银河App用户条款》", .font(UIFont.PFSC_M(ofSize: 16)),.foreground(UIColor.brandMainColor), .action {
if let block = self.urlBlock {
block("https://www.baidu.com")
}
})
let aaa: ASAttributedString = .init("帮助您了解我们收集、使用、存储和共享个人信息的情况,特别是我们所采取的个人信息类型和用途的对应关系。此外,您还能了解到您所享受的相关权利以及实现途径。认真阅读之后,如您同意,请点击下方的按钮开始接受我们的服务。", .font(UIFont.PFSC_R(ofSize: 16)),.foreground(UIColor.mainTextColor))
messageLabel.attributed.text = a + aa + and + aab + aaa
} }
@objc func agree() { @objc func agree() {
......
...@@ -170,7 +170,6 @@ extension YHHomeCollectionViewCell { ...@@ -170,7 +170,6 @@ extension YHHomeCollectionViewCell {
make.height.equalTo(listModel.img_height_use) make.height.equalTo(listModel.img_height_use)
} }
if let url = URL(string: listModel.img_url) { if let url = URL(string: listModel.img_url) {
// titleImageView.kf.setImage(with: url)
titleImageView.kf.setImage(with: url, placeholder: UIImage(named: "global_default_image")) titleImageView.kf.setImage(with: url, placeholder: UIImage(named: "global_default_image"))
} }
...@@ -207,7 +206,6 @@ extension YHHomeCollectionViewCell { ...@@ -207,7 +206,6 @@ extension YHHomeCollectionViewCell {
viewModel.getLike(listModel.id, 1) {[weak self] success, error in viewModel.getLike(listModel.id, 1) {[weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
if success { if success {
YHHUD.flash(message: "已点赞")
listModel.is_like = true listModel.is_like = true
listModel.like_count = listModel.like_count + 1 listModel.like_count = listModel.like_count + 1
updataSubViews() updataSubViews()
...@@ -217,7 +215,6 @@ extension YHHomeCollectionViewCell { ...@@ -217,7 +215,6 @@ extension YHHomeCollectionViewCell {
viewModel.getLike(listModel.id, 0) {[weak self] success, error in viewModel.getLike(listModel.id, 0) {[weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
if success { if success {
YHHUD.flash(message: "已取消点赞")
listModel.is_like = false listModel.is_like = false
listModel.like_count = listModel.like_count - 1 listModel.like_count = listModel.like_count - 1
updataSubViews() updataSubViews()
......
...@@ -277,7 +277,6 @@ extension YHServiceCenterMainViewModel { ...@@ -277,7 +277,6 @@ extension YHServiceCenterMainViewModel {
model.isFinished = false model.isFinished = false
} }
if item == target { if item == target {
model.isDoing = true model.isDoing = true
} }
......
...@@ -20,6 +20,10 @@ class YHLoginManager: NSObject { ...@@ -20,6 +20,10 @@ class YHLoginManager: NSObject {
private override init() {} private override init() {}
var needJumpToMsgTabFlag : Bool = false
}
extension YHLoginManager {
func isLogin() -> Bool { func isLogin() -> Bool {
let ttt = userModel?.token?.count ?? 0 let ttt = userModel?.token?.count ?? 0
if ttt != 0 { if ttt != 0 {
......
...@@ -90,6 +90,7 @@ class YHMessageListVC: YHBaseViewController { ...@@ -90,6 +90,7 @@ class YHMessageListVC: YHBaseViewController {
override func viewWillAppear(_ animated: Bool) { override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated) super.viewWillAppear(animated)
YHLoginManager.shared.needJumpToMsgTabFlag = false
getUnreadMsgList() getUnreadMsgList()
NotificationCenter.default.post(name: YhConstant.YhNotification.didRequestUnreadMsgTotalCountNotification, object: nil) NotificationCenter.default.post(name: YhConstant.YhNotification.didRequestUnreadMsgTotalCountNotification, object: nil)
...@@ -127,11 +128,9 @@ class YHMessageListVC: YHBaseViewController { ...@@ -127,11 +128,9 @@ class YHMessageListVC: YHBaseViewController {
} }
func getUnreadMsgList() { func getUnreadMsgList() {
YHHUD.show(.progress(message: "加载中..."))
self.viewModel.getUnreadMsgList { self.viewModel.getUnreadMsgList {
[weak self] success, error in [weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
YHHUD.hide()
if success, let msgList = viewModel.msgList { if success, let msgList = viewModel.msgList {
msgArr.removeAll() msgArr.removeAll()
// 资料填写 // 资料填写
......
...@@ -70,6 +70,7 @@ class YHDetailMessageModel: SmartCodable { ...@@ -70,6 +70,7 @@ class YHDetailMessageModel: SmartCodable {
var content: String = "" var content: String = ""
var time: Int = 0 var time: Int = 0
var isRead: Bool = false var isRead: Bool = false
var orderId: Int = 0
required init() { required init() {
......
...@@ -19,38 +19,7 @@ class YHMsgViewModel: NSObject { ...@@ -19,38 +19,7 @@ class YHMsgViewModel: NSObject {
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Message.unreadMsgListApi let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Message.unreadMsgListApi
let _ = YHNetRequest.getRequest(url: strUrl) { json, code in let _ = YHNetRequest.getRequest(url: strUrl) { json, code in
var dic = json.data var dic = json.data
// var json = json
// json.code = 200
// dic = [
// "information": [
// "unread_count": 0,
// "last_message": "阿法守法所发生的法师打发",
// "last_message_time": 1586507545,
// "type": 0
// ],
// "certificate": [
// "unread_count": 3,
// "last_message": "发生发顺丰大声道发生大发萨法沙发沙发沙发沙发阿斯顿发生发顺丰阿凡达放大第三方",
// "last_message_time": 1586507545,
// "type": 0
// ],
// "draft": [
// "unread_count": 100,
// "last_message": "发生发顺丰大声道发生大发",
// "last_message_time": 1712737945,
// "type": 0
// ],
// "signature": [
// "unread_count": 87,
// "last_message": "发生发",
// "last_message_time": 1713236425,
// "type": 0
// ]
// ]
printLog("model 是 ==> \(json)") printLog("model 是 ==> \(json)")
if json.code == 200 { if json.code == 200 {
guard let result = YHMsgListModel.deserialize(dict: dic as? Dictionary ) else { guard let result = YHMsgListModel.deserialize(dict: dic as? Dictionary ) else {
......
...@@ -8,26 +8,25 @@ ...@@ -8,26 +8,25 @@
import UIKit import UIKit
class YHTestViewController: YHBaseViewController { class YHDeviceInfoViewController: YHBaseViewController {
lazy var nameLabel: UILabel = { lazy var deviceInfoLabel: UILabel = {
let nameLabel = UILabel() let label = UILabel()
nameLabel.textColor = UIColor(hex:0x121A26) label.textColor = UIColor(hex:0x121A26)
nameLabel.textAlignment = .left label.textAlignment = .left
nameLabel.font = UIFont.PFSC_M(ofSize:15) label.font = UIFont.PFSC_M(ofSize:15)
nameLabel.numberOfLines = 0 label.numberOfLines = 0
return nameLabel return label
}() }()
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
view.backgroundColor = .white view.backgroundColor = .white
view.addSubview(nameLabel) view.addSubview(deviceInfoLabel)
nameLabel.snp.makeConstraints { make in deviceInfoLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(20) make.left.equalToSuperview().offset(20)
make.right.equalToSuperview().offset(-20) make.right.equalToSuperview().offset(-20)
make.top.equalToSuperview().offset(k_Height_NavigationtBarAndStatuBar) make.top.equalToSuperview().offset(k_Height_NavigationtBarAndStatuBar)
make.bottom.equalToSuperview()
} }
YHHUD.show(.progress(message: "加载中...")) YHHUD.show(.progress(message: "加载中..."))
...@@ -39,9 +38,10 @@ class YHTestViewController: YHBaseViewController { ...@@ -39,9 +38,10 @@ class YHTestViewController: YHBaseViewController {
YHLoginManager.shared.deviceTokenModel.registerId = registrationID ?? "" YHLoginManager.shared.deviceTokenModel.registerId = registrationID ?? ""
var info = "deviceToken: \n" + (YHLoginManager.shared.deviceTokenModel.deviceToken) var info = "deviceToken: \n" + (YHLoginManager.shared.deviceTokenModel.deviceToken)
info += "\n"
info += "\nregisterId: \n" + (YHLoginManager.shared.deviceTokenModel.registerId) info += "\nregisterId: \n" + (YHLoginManager.shared.deviceTokenModel.registerId)
DispatchQueue.main.async { DispatchQueue.main.async {
self.nameLabel.text = info self.deviceInfoLabel.text = info
} }
} }
} }
......
...@@ -40,7 +40,8 @@ class YHMySettingViewController: YHBaseViewController, ConstraintRelatableTarget ...@@ -40,7 +40,8 @@ class YHMySettingViewController: YHBaseViewController, ConstraintRelatableTarget
PersonalModuleItem(title: "权限配置".local, type:.permissionSettings), PersonalModuleItem(title: "权限配置".local, type:.permissionSettings),
PersonalModuleItem(title: "个人信息收集清单".local, type:.infoCollectList), PersonalModuleItem(title: "个人信息收集清单".local, type:.infoCollectList),
PersonalModuleItem(title: "第三方信息共享清单".local, type:.infoShareList), PersonalModuleItem(title: "第三方信息共享清单".local, type:.infoShareList),
PersonalModuleItem(title: "关于我们".local, type:.aboutUs)] PersonalModuleItem(title: "关于我们".local, type:.aboutUs),
PersonalModuleItem(title: "设备相关".local, type:.deviceInfo)]
}() }()
override func viewDidLoad() { override func viewDidLoad() {
...@@ -98,6 +99,7 @@ extension YHMySettingViewController : UITableViewDelegate, UITableViewDataSource ...@@ -98,6 +99,7 @@ extension YHMySettingViewController : UITableViewDelegate, UITableViewDataSource
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
if 0 <= indexPath.row && indexPath.row < items.count { if 0 <= indexPath.row && indexPath.row < items.count {
let item = items[indexPath.row] let item = items[indexPath.row]
if item.type == .notifySettings { if item.type == .notifySettings {
let vc = YHMyNotifySettingVC() let vc = YHMyNotifySettingVC()
...@@ -110,6 +112,10 @@ extension YHMySettingViewController : UITableViewDelegate, UITableViewDataSource ...@@ -110,6 +112,10 @@ extension YHMySettingViewController : UITableViewDelegate, UITableViewDataSource
} else if item.type == .aboutUs { } else if item.type == .aboutUs {
let vc = YHAboutUsViewController() let vc = YHAboutUsViewController()
self.navigationController?.pushViewController(vc) self.navigationController?.pushViewController(vc)
} else if item.type == .deviceInfo {
let vc = YHDeviceInfoViewController()
self.navigationController?.pushViewController(vc)
} }
} }
} }
......
...@@ -25,6 +25,7 @@ enum YHPersonalModuleItemType: Int { ...@@ -25,6 +25,7 @@ enum YHPersonalModuleItemType: Int {
case infoCollectList case infoCollectList
case infoShareList case infoShareList
case aboutUs case aboutUs
case deviceInfo
} }
class PersonalModuleItem { class PersonalModuleItem {
......
...@@ -200,9 +200,6 @@ extension YhConstant { ...@@ -200,9 +200,6 @@ extension YhConstant {
//清空所有未读消息数 //清空所有未读消息数
public static let didMarkAllMessagesReadedNotifiction = Notification.Name(rawValue: "com.yinhe.msgPage.readAll") public static let didMarkAllMessagesReadedNotifiction = Notification.Name(rawValue: "com.yinhe.msgPage.readAll")
// 自动转换到消息tab
public static let didSwithToMsgTabNotification = Notification.Name(rawValue: "com.yinhe.msgPage.switch")
// 请求消息未读总数通知 // 请求消息未读总数通知
public static let didRequestUnreadMsgTotalCountNotification = Notification.Name(rawValue: "com.yinhe.msgPage.unreadMsgTotal") public static let didRequestUnreadMsgTotalCountNotification = Notification.Name(rawValue: "com.yinhe.msgPage.unreadMsgTotal")
} }
......
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