Commit f140bcff authored by Steven杜宇's avatar Steven杜宇

// 消息

parent 8e2c6ad6
......@@ -65,8 +65,6 @@ extension AppDelegate: JPUSHRegisterDelegate {
UNUserNotificationCenter.current().removeAllPendingNotificationRequests()
}
@available(iOS 10.0, *)
func jpushNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: ((Int) -> Void)) {
let userInfo = notification.request.content.userInfo
......@@ -77,7 +75,6 @@ extension AppDelegate: JPUSHRegisterDelegate {
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 {
......@@ -85,6 +82,8 @@ extension AppDelegate: JPUSHRegisterDelegate {
}
// 系统要求执行这个方法
completionHandler()
// 转换到消息tab
NotificationCenter.default.post(name: YhConstant.YhNotification.didSwithToMsgTabNotification, object: nil)
}
......
......@@ -55,8 +55,8 @@ extension YHTabBarViewController {
// 转换到消息tab
@objc func switchToMsgTab() {
DispatchQueue.main.async {
self.selectedIndex = 2
DispatchQueue.main.asyncAfter(deadline: .now() + 8) {
goTabBarBy(tabType: .message)
}
}
......
......@@ -70,6 +70,7 @@ class YHDetailMessageModel: SmartCodable {
var content: String = ""
var time: Int = 0
var isRead: Bool = false
var orderId: Int = 0
required init() {
......
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