Commit 4d68d303 authored by Alex朱枝文's avatar Alex朱枝文

Merge branch 'develop' into develop-desk-tx

# Conflicts:
#	galaxy/galaxy/Applegate(JPush).swift
parents a218ff2e 1334471c
...@@ -37,7 +37,7 @@ platform :ios do ...@@ -37,7 +37,7 @@ platform :ios do
push = "HIGH" push = "HIGH"
#打包正使用的分支 #打包正使用的分支
myPack_branch = notification myPack_branch = push
# 打adhoc包 执行命令 fastlane galaxyTest # 打adhoc包 执行命令 fastlane galaxyTest
......
...@@ -8510,7 +8510,7 @@ ...@@ -8510,7 +8510,7 @@
CODE_SIGN_ENTITLEMENTS = galaxy/galaxyTestEnv.entitlements; CODE_SIGN_ENTITLEMENTS = galaxy/galaxyTestEnv.entitlements;
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1; CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_TEAM = RXHYW88XR7; DEVELOPMENT_TEAM = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO; ENABLE_USER_SCRIPT_SANDBOXING = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
...@@ -8658,7 +8658,7 @@ ...@@ -8658,7 +8658,7 @@
CODE_SIGN_ENTITLEMENTS = galaxy/galaxy.entitlements; CODE_SIGN_ENTITLEMENTS = galaxy/galaxy.entitlements;
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1; CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_TEAM = RXHYW88XR7; DEVELOPMENT_TEAM = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO; ENABLE_USER_SCRIPT_SANDBOXING = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
...@@ -8868,7 +8868,7 @@ ...@@ -8868,7 +8868,7 @@
CODE_SIGN_ENTITLEMENTS = galaxy/galaxyDebug.entitlements; CODE_SIGN_ENTITLEMENTS = galaxy/galaxyDebug.entitlements;
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1; CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_TEAM = RXHYW88XR7; DEVELOPMENT_TEAM = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO; ENABLE_USER_SCRIPT_SANDBOXING = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
...@@ -8918,7 +8918,7 @@ ...@@ -8918,7 +8918,7 @@
CODE_SIGN_ENTITLEMENTS = galaxy/galaxy.entitlements; CODE_SIGN_ENTITLEMENTS = galaxy/galaxy.entitlements;
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1; CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_TEAM = RXHYW88XR7; DEVELOPMENT_TEAM = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO; ENABLE_USER_SCRIPT_SANDBOXING = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
......
...@@ -24,6 +24,8 @@ import TUICore ...@@ -24,6 +24,8 @@ import TUICore
@main @main
class AppDelegate: UIResponder, UIApplicationDelegate, WXApiDelegate { class AppDelegate: UIResponder, UIApplicationDelegate, WXApiDelegate {
private lazy var liveViewModel = YHLiveSalesViewModel() private lazy var liveViewModel = YHLiveSalesViewModel()
let viewModel = YHMsgViewModel()
var window: UIWindow? var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
......
...@@ -33,7 +33,7 @@ extension AppDelegate: JPUSHRegisterDelegate { ...@@ -33,7 +33,7 @@ extension AppDelegate: JPUSHRegisterDelegate {
#if DEBUG #if DEBUG
let isProduction = false let isProduction = false
#elseif TESTENV #elseif TESTENV
let isProduction = true let isProduction = false
#else #else
let isProduction = true let isProduction = true
#endif #endif
...@@ -119,19 +119,21 @@ extension AppDelegate: JPUSHRegisterDelegate { ...@@ -119,19 +119,21 @@ extension AppDelegate: JPUSHRegisterDelegate {
if let msgType = userInfo["msg_type"] as? Int, msgType == YHMessageType.article.rawValue { if let msgType = userInfo["msg_type"] as? Int, msgType == YHMessageType.article.rawValue {
goToMessagePage() goToMessagePage()
let model = YHNewsModel() let model = YHNewsModel()
model.id = userInfo["msg_id"] as? String ?? "" let taskId = userInfo["task_id"] as? Int ?? 0
model.article_id = userInfo["article_id"] as? Int ?? 0 model.article_id = userInfo["article_id"] as? Int ?? 0
model.news_type = userInfo["news_type"] as? Int ?? 0 model.news_type = userInfo["news_type"] as? Int ?? 0
model.cover_img = userInfo["cover_img"] as? String ?? "" model.cover_img = userInfo["cover_img"] as? String ?? ""
model.url = userInfo["url"] as? String ?? "" model.url = userInfo["url"] as? String ?? ""
model.media_url = userInfo["media_url"] as? String ?? "" model.media_url = userInfo["media_url"] as? String ?? ""
model.media_transcode_url = userInfo["media_transcode_url"] as? String ?? "" model.media_transcode_url = userInfo["media_transcode_url"] as? String ?? ""
printLog("DDDDY: \(model.id)")
yh_newsList.enterDetail(model) yh_newsList.enterDetail(model)
yh_newsList.markRead(model) self.viewModel.readMessage(taskId: taskId) { _, _ in
}
} else { } else {
goToMessagePage(userInfo) goToMessagePage(userInfo)
} }
}) })
} }
......
...@@ -12,6 +12,7 @@ import IQKeyboardManagerSwift ...@@ -12,6 +12,7 @@ import IQKeyboardManagerSwift
class YHAITabViewController: YHBaseViewController, UIGestureRecognizerDelegate { class YHAITabViewController: YHBaseViewController, UIGestureRecognizerDelegate {
var viewDidAppear: Bool = false
var defaltIndex: Int = 0 var defaltIndex: Int = 0
let viewModel = YHAIViewModel() let viewModel = YHAIViewModel()
...@@ -110,34 +111,27 @@ class YHAITabViewController: YHBaseViewController, UIGestureRecognizerDelegate { ...@@ -110,34 +111,27 @@ class YHAITabViewController: YHBaseViewController, UIGestureRecognizerDelegate {
override func viewWillAppear(_ animated: Bool) { override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated) super.viewWillAppear(animated)
// 处于第一个item的时候,才允许屏幕边缘手势返回
self.navigationController?.interactivePopGestureRecognizer?.isEnabled = (self.segmentedView.selectedIndex == 0)
self.gk_interactivePopDisabled = (self.segmentedView.selectedIndex != 0)
self.gk_fullScreenPopDisabled = (self.segmentedView.selectedIndex != 0)
requestList() requestList()
} }
override func viewDidAppear(_ animated: Bool) { override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated) super.viewDidAppear(animated)
viewDidAppear = true
self.navigationController?.interactivePopGestureRecognizer?.isEnabled = (self.segmentedView.selectedIndex == 0) self.navigationController?.interactivePopGestureRecognizer?.isEnabled = (self.segmentedView.selectedIndex == 0)
self.gk_interactivePopDisabled = (self.segmentedView.selectedIndex != 0)
self.gk_fullScreenPopDisabled = (self.segmentedView.selectedIndex != 0)
} }
override func viewWillDisappear(_ animated: Bool) { override func viewDidDisappear(_ animated: Bool) {
super.viewWillDisappear(animated) super.viewDidDisappear(animated)
viewDidAppear = false
// 离开页面的时候,需要恢复屏幕边缘手势,不能影响其他页面 // 离开页面的时候,需要恢复屏幕边缘手势,不能影响其他页面
self.navigationController?.interactivePopGestureRecognizer?.isEnabled = true self.navigationController?.interactivePopGestureRecognizer?.isEnabled = true
self.gk_interactivePopDisabled = false
self.gk_fullScreenPopDisabled = false
} }
override func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool { override func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool {
if gestureRecognizer == navigationController?.interactivePopGestureRecognizer {
if self.segmentedView.selectedIndex == 0 { if viewDidAppear {
self.gk_interactivePopDisabled = false return self.segmentedView.selectedIndex == 0
self.gk_fullScreenPopDisabled = false }
return true
} }
return false return false
} }
...@@ -281,8 +275,6 @@ extension YHAITabViewController: JXSegmentedViewDelegate { ...@@ -281,8 +275,6 @@ extension YHAITabViewController: JXSegmentedViewDelegate {
func segmentedView(_ segmentedView: JXSegmentedView, didSelectedItemAt index: Int) { func segmentedView(_ segmentedView: JXSegmentedView, didSelectedItemAt index: Int) {
self.navigationController?.interactivePopGestureRecognizer?.isEnabled = (self.segmentedView.selectedIndex == 0) self.navigationController?.interactivePopGestureRecognizer?.isEnabled = (self.segmentedView.selectedIndex == 0)
self.gk_interactivePopDisabled = (self.segmentedView.selectedIndex != 0)
self.gk_fullScreenPopDisabled = (self.segmentedView.selectedIndex != 0)
if segmentedView.selectedIndex == 1 { // AI对话 if segmentedView.selectedIndex == 1 { // AI对话
bgImgView.isHidden = false bgImgView.isHidden = false
......
...@@ -73,8 +73,8 @@ class YHServiceSelectAlertView: UICollectionViewCell { ...@@ -73,8 +73,8 @@ class YHServiceSelectAlertView: UICollectionViewCell {
lazy var titleLabel: UILabel = { lazy var titleLabel: UILabel = {
let label = UILabel() let label = UILabel()
label.numberOfLines = 0 label.numberOfLines = 0
let a: ASAttributedString = .init("期望银河在", .font(UIFont.PFSC_B(ofSize: 18)), .foreground(UIColor.mainTextColor)) let a: ASAttributedString = .init("期望银河在您的", .font(UIFont.PFSC_B(ofSize: 18)), .foreground(UIColor.mainTextColor))
let b: ASAttributedString = .init("审批阶段", .font(UIFont.PFSC_B(ofSize: 18)), .foreground(UIColor.brandMainColor)) let b: ASAttributedString = .init("香港新生活", .font(UIFont.PFSC_B(ofSize: 18)), .foreground(UIColor.brandMainColor))
let c: ASAttributedString = .init("\n提供哪些服务", .font(UIFont.PFSC_B(ofSize: 18)), .foreground(UIColor.mainTextColor)) let c: ASAttributedString = .init("\n提供哪些服务", .font(UIFont.PFSC_B(ofSize: 18)), .foreground(UIColor.mainTextColor))
label.attributed.text = a+b+c label.attributed.text = a+b+c
return label return label
......
...@@ -140,6 +140,25 @@ class YHMsgViewModel: NSObject { ...@@ -140,6 +140,25 @@ class YHMsgViewModel: NSObject {
} }
} }
func readMessage(taskId: Int, _ callBackBlock: @escaping (_ success: Bool, _ error: YHErrorModel?) -> Void) {
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Message.readPushMsgApi
let params: [String: Any] = ["type": YHMessageType.article.rawValue,
"task_id": taskId]
_ = YHNetRequest.postRequest(url: strUrl, params: params) { json, _ in
printLog("model 是 ==> \(json)")
if json.code == 200 {
callBackBlock(true, nil)
} else {
let error: YHErrorModel = YHErrorModel(errorCode: Int32(json.code), errorMsg: json.msg)
callBackBlock(false, error)
}
} failBlock: { error in
callBackBlock(false, error)
}
}
func requestTotalUnreadMsgCount(_ callBackBlock: @escaping (_ success: Bool, _ error: YHErrorModel?) -> Void) { func requestTotalUnreadMsgCount(_ callBackBlock: @escaping (_ success: Bool, _ error: YHErrorModel?) -> Void) {
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Message.unreadTotalCountApi let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Message.unreadTotalCountApi
......
...@@ -433,6 +433,7 @@ class YHAllApiName { ...@@ -433,6 +433,7 @@ class YHAllApiName {
static let msgDetaiListApi = "infoflow/message/list/v2" static let msgDetaiListApi = "infoflow/message/list/v2"
// 标记消息已读 // 标记消息已读
static let readMsgApi = "infoflow/read-push" static let readMsgApi = "infoflow/read-push"
static let readPushMsgApi = "infoflow/read-push-from-bar"
// 获取未读消息总数 // 获取未读消息总数
static let unreadTotalCountApi = "infoflow/unread-total" static let unreadTotalCountApi = "infoflow/unread-total"
// 报备设备信息 // 报备设备信息
......
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