推送修改
This commit is contained in:
@@ -34,7 +34,7 @@ open class GroupData {
|
||||
// 判断新推送是不是新订单
|
||||
func isOrderPushNotification(userInfo:[AnyHashable:Any]?) -> Bool {
|
||||
if let userInfo {
|
||||
if let dict = parserAlertToDictionary(userInfo: userInfo), dict[pushNoti_pushType_key] == "1" {
|
||||
if let pushType = (userInfo[pushNoti_pushType_key] as? String), pushType == "1" {
|
||||
return true
|
||||
}
|
||||
}
|
||||
@@ -44,7 +44,7 @@ open class GroupData {
|
||||
// 判断新推送是不是取消订单
|
||||
func isCancelOrderPushNotification(userInfo:[AnyHashable:Any]?) -> Bool {
|
||||
if let userInfo {
|
||||
if let dict = parserAlertToDictionary(userInfo: userInfo), dict[pushNoti_pushType_key] == "8" {
|
||||
if let pushType = (userInfo[pushNoti_pushType_key] as? String), pushType == "8" {
|
||||
return true
|
||||
}
|
||||
}
|
||||
@@ -54,7 +54,7 @@ open class GroupData {
|
||||
// 判断是不是跳转报备的订单推送
|
||||
func isReportIndexPushNotification(userInfo:[AnyHashable:Any]?) -> Bool {
|
||||
if let userInfo {
|
||||
if let dict = parserAlertToDictionary(userInfo: userInfo), dict[pushNoti_pushType_key] == "10" {
|
||||
if let pushType = (userInfo[pushNoti_pushType_key] as? String), pushType == "10" {
|
||||
return true
|
||||
}
|
||||
}
|
||||
@@ -82,9 +82,6 @@ open class GroupData {
|
||||
if let isShowPop = (userInfo?[pushNoti_isShowPop_key] as? Bool),isShowPop == true {
|
||||
return true
|
||||
}
|
||||
if let isShowPop = (userInfo?[pushNoti_isShowPop_key] as? String),isShowPop == "true" {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
@@ -27,16 +27,16 @@ open class PushNotiCommonTool : NSObject {
|
||||
if let body = dict[pushNoti_body_key] {
|
||||
commonView.contentLabel.text = body
|
||||
}
|
||||
if let _userOrderId = dict[pushNoti_userOrderId_key] {
|
||||
userOrderId = Int(_userOrderId)
|
||||
}
|
||||
if let _taskOrderId = dict[pushNoti_taskOrderId_key] {
|
||||
taskOrderId = Int(_taskOrderId)
|
||||
if let _userOrderId = (userInfo?[pushNoti_userOrderId_key] as? Int) {
|
||||
userOrderId = _userOrderId
|
||||
}
|
||||
if let _taskCode = dict[pushNoti_taskCode_key] {
|
||||
if let _taskOrderId = (userInfo?[pushNoti_taskOrderId_key] as? Int) {
|
||||
taskOrderId = _taskOrderId
|
||||
}
|
||||
if let _taskCode = (userInfo?[pushNoti_taskCode_key] as? String) {
|
||||
taskCode = _taskCode
|
||||
}
|
||||
}
|
||||
if let cancel = (userInfo?[pushNoti_cancelButtonText_key] as? String) {
|
||||
commonView.cancelButton.setTitle(cancel, for: .normal)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user