Procházet zdrojové kódy

提交内容
1、代码提交;

Handy_Cao před 4 roky
rodič
revize
c24731b3b9

+ 4 - 4
MTP_iOS/MTP2_iOS.xcodeproj/project.pbxproj

@@ -2776,7 +2776,7 @@
 				CODE_SIGN_ENTITLEMENTS = MTP2_iOS/BPML.entitlements;
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 1007;
+				CURRENT_PROJECT_VERSION = 1100;
 				DEVELOPMENT_TEAM = QF38M2SZT9;
 				ENABLE_BITCODE = YES;
 				FRAMEWORK_SEARCH_PATHS = (
@@ -2800,7 +2800,7 @@
 					"$(PROJECT_DIR)/MTP2_iOS/ThirdParty/WeChat",
 					"$(PROJECT_DIR)/MTP2_iOS/ThirdParty/UMSPosPayOnly",
 				);
-				MARKETING_VERSION = 1.0.7;
+				MARKETING_VERSION = 1.1.0;
 				ONLY_ACTIVE_ARCH = YES;
 				OTHER_LDFLAGS = "$(inherited)";
 				OTHER_LIBTOOLFLAGS = "$(inherited)";
@@ -2827,7 +2827,7 @@
 				CODE_SIGN_ENTITLEMENTS = MTP2_iOS/BPML.entitlements;
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 1007;
+				CURRENT_PROJECT_VERSION = 1100;
 				DEVELOPMENT_TEAM = QF38M2SZT9;
 				ENABLE_BITCODE = YES;
 				FRAMEWORK_SEARCH_PATHS = (
@@ -2851,7 +2851,7 @@
 					"$(PROJECT_DIR)/MTP2_iOS/ThirdParty/WeChat",
 					"$(PROJECT_DIR)/MTP2_iOS/ThirdParty/UMSPosPayOnly",
 				);
-				MARKETING_VERSION = 1.0.7;
+				MARKETING_VERSION = 1.1.0;
 				ONLY_ACTIVE_ARCH = YES;
 				OTHER_CFLAGS = (
 					"$(inherited)",

+ 19 - 19
MTP_iOS/MTP2_iOS/Application/AppDelegate.swift

@@ -212,30 +212,33 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
 // MARK: - MTP2BusinessCoreDelegate
 extension AppDelegate: MTP2BusinessCoreDelegate {
     func onReconnectChangeState(type: PacketType, state: ReconnectChangeState) {
-//        dPrint("网络连接正在进行重连,当前的状态为:\(state)")
-//        DispatchQueue.main.async {
-//            switch state {
-//            case .BeginReconnect:
+        dPrint("网络连接正在进行重连,当前的状态为:\(state)")
+        DispatchQueue.main.async {
+            switch state {
+            case .BeginReconnect:
 //                let message = "正在开始重连......".localized
 //                if (self.window?.rootViewController as? UITabBarController) != nil {
 //                    WHToast.showError(withMessage: message, duration: 1.5, finishHandler: {})
 //                }
-//            case .FailAndWaitPeriod:
+            break
+            case .FailAndWaitPeriod:
 //                let message = "网络已断开......".localized
 //                if (self.window?.rootViewController as? UITabBarController) != nil {
 //                    WHToast.showError(withMessage: message, duration: 1.5, finishHandler: {})
 //                }
-//            case .Logined:
+                break
+            case .Logined:
 //                let message = "网络重连成功".localized
 //                if (self.window?.rootViewController as? UITabBarController) != nil {
 //                    WHToast.showSuccess(withMessage: message, duration: 1.5, finishHandler: {})
 //                }
-//            case .LoginFail:
-//                self.logout(message: "连接异常,请重新登录")
-//            default:
-//                break
-//            }
-//        }
+                break
+            case .LoginFail:
+                self.logout(message: "连接异常,请重新登录")
+            default:
+                break
+            }
+        }
     }
     
     func onReceiveQutoePush(quoteGoodsInfos: [(goodsHqCode: String, exchHqCode: String)]?) {
@@ -279,16 +282,13 @@ extension AppDelegate: MTP2BusinessCoreDelegate {
     func userChangeNtf() {
         /// 通知变化
         MTP2BusinessCore.shared.broadcastManager?.post(action: .NoticeChange, object: self)
-
-        DispatchQueue.main.async {
-            if (self.window?.rootViewController as? UITabBarController) != nil {
-                self.customStatusBar.addMessage("斩仓通知".localized, delay: 2)
-            }
-        }
     }
     
     /// 公告变更通知
-    func onNoticeChanged() {}
+    func onNoticeChanged() {
+        /// 通知变化
+        MTP2BusinessCore.shared.broadcastManager?.post(action: .NoticeChange, object: self)
+    }
 }
 
 extension AppDelegate {

+ 2 - 2
MTP_iOS/MTP2_iOS/BusinessCore/Account/AccountManager.swift

@@ -14,7 +14,7 @@ class AccountManager: BaseManager {
     /// 保存当前资金账户
     var moTaAccountInfo: MoTaAccountInfo?
     /// Check token timer
-    //    private var checkTokenTimer: Timer?
+    /// private var checkTokenTimer: Timer?
     private let checkTokenTimerID = "checkTokenTimerID"
     private let checkTokenInterval: TimeInterval = 10.0 * 60.0
     
@@ -481,7 +481,7 @@ class AccountManager: BaseManager {
                     UserDefaults.goodsUpdateTime.set(value: moAccountBaseInfo?.paramValues.goodsUTime, forKey: .actual)
                     /// 记录信息
                     MTP2BusinessCore.shared.responseDatas.append(newElement: (key: "\(FunCode.LoginQueryRsp)", data: moAccountBaseInfo!))
-                    
+                    /// 执行回调
                     callback(true, nil)
                 })
             })

+ 7 - 3
MTP_iOS/MTP2_iOS/BusinessCore/Global/MTP2BusinessCore.swift

@@ -85,7 +85,7 @@ class MTP2BusinessCore {
         quoteNetworkManager = SocketManager(packetType: .PacketType_40, delegate: self)
         tradingNetworkManager = SocketManager(packetType: .PacketType_50, delegate: self)
         
-        // Business Code
+        /// Business Code
         quoteManager = QuoteManager()
         accountManager = AccountManager()
         orderManager = OrderManager()
@@ -94,7 +94,7 @@ class MTP2BusinessCore {
         uploadManager = UploadManager()
         bankManager = BankManager()
         noticeManager = NoticeManager()
-        // Control
+        /// Control
         broadcastManager = BroadcastManager()
         /// 资管业务管理类
         assetsManager = AssetsManager()
@@ -133,7 +133,11 @@ class MTP2BusinessCore {
         tradeManager = nil
         uploadManager = nil
         bankManager = nil
-        noticeManager = nil
+        if noticeManager != nil {
+            noticeManager?.dellocObject()
+            noticeManager = nil
+            
+        }
         broadcastManager = nil
         assetsManager = nil
         quoteSubscriptManager = nil

+ 45 - 0
MTP_iOS/MTP2_iOS/BusinessCore/Notice/NoticeManager.swift

@@ -10,6 +10,20 @@ import Foundation
 
 class NoticeManager: BaseManager {
     
+    /// Check token timer
+    /// private var checkTokenTimer: Timer?
+    private let checkTokenTimerID = "CheckTokenTimerID"
+    private let checkTokenInterval: TimeInterval = 60.0
+    
+    /// 公告消息数据
+    var notices: [MoNotice] = []
+    
+    // MARK: - 生命周期
+    func dellocObject() {
+        /// TODO: 停止自动CheckToken
+        stopAutoQueryNotices()
+    }
+    
     // MARK: - 公告相关
     /// 获取公告通知数据请求方法
     /// - Parameters:
@@ -18,10 +32,12 @@ class NoticeManager: BaseManager {
     ///   - msgType: 消息类型 - 1:公告通知 2:系统消息
     ///   - onlyUnResd: 是否只获取未读信息
     ///   - callback: 回调块
+    ///   - lastID: 自增ID,传入后会返回这个ID后面的记录
     func requestNotices(_ page: Int? = 0,
                         _ pageSize: Int? = 20,
                         _ msgType: Int?,
                         _ onlyUnResd: Bool = false,
+                        _ lastID: Int?,
                         callback: @escaping (_ isCompleted: Bool,
                                              _ error: ErrorInfo?,
                                              _ notices: [MoNotice]?) -> Void) {
@@ -40,6 +56,7 @@ class NoticeManager: BaseManager {
         if let page = page { params.append((key: "page", value: page)) }
         if let pageSize = pageSize { params.append((key: "pageSize", value: pageSize)) }
         if let type = msgType { params.append((key: "msgType", value: type)) }
+        if let id = lastID { params.append((key: "lastID", value: id)) }
         params.append((key: "loginID", value: MTP2BusinessCore.shared.getLoginID()))
         params.append((key: "onlyUnResd", value: onlyUnResd))
         
@@ -57,6 +74,15 @@ class NoticeManager: BaseManager {
                 let response = Response<[MoNotice]>.deserialize(from: data)
                 if response?.code == 200,
                    let datas = response?.data { /// 查询成功
+                    if let _ = lastID {
+                        self.notices.append(contentsOf: datas.sorted(by: { (obj1, obj2) -> Bool in
+                            return obj1.autoid<obj2.autoid
+                        }))
+                    } else {
+                        self.notices = datas.sorted(by: { (obj1, obj2) -> Bool in
+                            return obj1.autoid<obj2.autoid
+                        })
+                    }
                     /// 执行回调
                     callback(true, nil, datas)
                 } else {
@@ -267,4 +293,23 @@ class NoticeManager: BaseManager {
             }
         }
     }
+    
+    
+    // MARK: - 自动轮询
+    /// 停止查询公告消息
+    fileprivate func stopAutoQueryNotices() {
+        MCGCDTimer.shared.cancleTimer(WithTimerName: self.checkTokenTimerID)
+    }
+    
+    /// 启动查询公告消息
+    func startAutoQueryNotices() {
+        MCGCDTimer.shared.scheduledDispatchTimer(WithTimerName: self.checkTokenTimerID, timeInterval: self.checkTokenInterval, queue: .main, repeats: true, isNowRun: true) {
+            self.requestNotices(nil, nil, nil, false, self.notices.last?.autoid) { (isComplete, error, objs) in
+                if isComplete, let datas = objs, datas.count != 0 {
+                    /// 发送公告通知
+                    MTP2BusinessCore.shared.delegate?.onNoticeChanged()
+                }
+            }
+        }
+    }
 }

+ 17 - 17
MTP_iOS/MTP2_iOS/Resource/Storyboard/Message/Message.storyboard

@@ -12,7 +12,7 @@
         <!--消息-->
         <scene sceneID="zBv-4o-7kE">
             <objects>
-                <navigationController storyboardIdentifier="Message" title="消息" id="tMl-RU-w7z" customClass="BaseNavigationController" customModule="BPML" customModuleProvider="target" sceneMemberID="viewController">
+                <navigationController storyboardIdentifier="Message" title="消息" id="tMl-RU-w7z" customClass="BaseNavigationController" customModule="LYB" customModuleProvider="target" sceneMemberID="viewController">
                     <navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="Y9z-H7-adq">
                         <rect key="frame" x="0.0" y="44" width="414" height="44"/>
                         <autoresizingMask key="autoresizingMask"/>
@@ -32,7 +32,7 @@
         <!--消息-->
         <scene sceneID="5Rx-As-Bhn">
             <objects>
-                <viewController storyboardIdentifier="MessageID" title="消息" id="2xP-Uu-clD" customClass="MessageViewController" customModule="BPML" customModuleProvider="target" sceneMemberID="viewController">
+                <viewController storyboardIdentifier="MessageID" title="消息" id="2xP-Uu-clD" customClass="MessageViewController" customModule="LYB" customModuleProvider="target" sceneMemberID="viewController">
                     <view key="view" contentMode="scaleToFill" id="8nT-el-LXp">
                         <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@@ -69,12 +69,12 @@
                                             <constraint firstAttribute="width" constant="40" id="gMd-lv-Atp"/>
                                         </constraints>
                                     </imageView>
-                                    <label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Xyo-6c-DbO" customClass="AnimatableLabel" customModule="IBAnimatable">
-                                        <rect key="frame" x="130" y="12" width="25" height="15"/>
+                                    <label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="8" translatesAutoresizingMaskIntoConstraints="NO" id="Xyo-6c-DbO" customClass="AnimatableLabel" customModule="IBAnimatable">
+                                        <rect key="frame" x="127.5" y="4.5" width="20" height="20"/>
                                         <color key="backgroundColor" systemColor="systemRedColor"/>
                                         <constraints>
-                                            <constraint firstAttribute="height" constant="15" id="45M-eD-M5D"/>
-                                            <constraint firstAttribute="width" constant="25" id="Nn8-rw-wm3"/>
+                                            <constraint firstAttribute="height" constant="20" id="45M-eD-M5D"/>
+                                            <constraint firstAttribute="width" constant="20" id="Nn8-rw-wm3"/>
                                         </constraints>
                                         <fontDescription key="fontDescription" type="system" pointSize="10"/>
                                         <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
@@ -88,19 +88,19 @@
                                             </userDefinedRuntimeAttribute>
                                         </userDefinedRuntimeAttributes>
                                     </label>
-                                    <label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Dgh-fU-gHh" customClass="AnimatableLabel" customModule="IBAnimatable">
-                                        <rect key="frame" x="329.5" y="12" width="25" height="15"/>
+                                    <label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="8" translatesAutoresizingMaskIntoConstraints="NO" id="Dgh-fU-gHh" customClass="AnimatableLabel" customModule="IBAnimatable">
+                                        <rect key="frame" x="327" y="4.5" width="20" height="20"/>
                                         <color key="backgroundColor" systemColor="systemRedColor"/>
                                         <constraints>
-                                            <constraint firstAttribute="width" constant="25" id="Gp3-hh-cDV"/>
-                                            <constraint firstAttribute="height" constant="15" id="wEe-DI-7Xo"/>
+                                            <constraint firstAttribute="width" constant="20" id="Gp3-hh-cDV"/>
+                                            <constraint firstAttribute="height" constant="20" id="wEe-DI-7Xo"/>
                                         </constraints>
                                         <fontDescription key="fontDescription" type="system" pointSize="10"/>
                                         <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                         <nil key="highlightedColor"/>
                                         <userDefinedRuntimeAttributes>
                                             <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
-                                                <real key="value" value="7.5"/>
+                                                <real key="value" value="10"/>
                                             </userDefinedRuntimeAttribute>
                                         </userDefinedRuntimeAttributes>
                                     </label>
@@ -109,16 +109,16 @@
                                 <constraints>
                                     <constraint firstItem="WVD-eZ-FuR" firstAttribute="top" secondItem="NCy-9Z-Kim" secondAttribute="bottom" id="1Le-rF-MC2"/>
                                     <constraint firstAttribute="bottom" secondItem="WVD-eZ-FuR" secondAttribute="bottom" id="7pF-zT-gWu"/>
-                                    <constraint firstItem="Dgh-fU-gHh" firstAttribute="centerX" secondItem="cBO-Pe-R3s" secondAttribute="centerX" constant="35" id="DaU-PB-34H"/>
+                                    <constraint firstItem="Dgh-fU-gHh" firstAttribute="centerX" secondItem="cBO-Pe-R3s" secondAttribute="centerX" constant="30" id="DaU-PB-34H"/>
                                     <constraint firstAttribute="height" constant="44" id="JhH-ME-mNV"/>
                                     <constraint firstAttribute="trailing" secondItem="NCy-9Z-Kim" secondAttribute="trailing" constant="10" id="N6M-pT-zs2"/>
-                                    <constraint firstItem="cBO-Pe-R3s" firstAttribute="centerY" secondItem="Dgh-fU-gHh" secondAttribute="centerY" id="Om6-mf-2bR"/>
+                                    <constraint firstItem="cBO-Pe-R3s" firstAttribute="centerY" secondItem="Dgh-fU-gHh" secondAttribute="centerY" constant="5" id="Om6-mf-2bR"/>
                                     <constraint firstItem="WVD-eZ-FuR" firstAttribute="centerX" secondItem="PUa-JY-lO1" secondAttribute="centerX" id="Syg-Wc-i51"/>
                                     <constraint firstAttribute="bottom" secondItem="NCy-9Z-Kim" secondAttribute="bottom" constant="5" id="Uxm-rz-SIK"/>
-                                    <constraint firstItem="Xyo-6c-DbO" firstAttribute="centerY" secondItem="PUa-JY-lO1" secondAttribute="centerY" id="X5F-E1-013"/>
+                                    <constraint firstItem="Xyo-6c-DbO" firstAttribute="centerY" secondItem="PUa-JY-lO1" secondAttribute="centerY" constant="-5" id="X5F-E1-013"/>
                                     <constraint firstItem="NCy-9Z-Kim" firstAttribute="leading" secondItem="TSe-7M-icp" secondAttribute="leading" constant="10" id="bsd-x6-ntk"/>
                                     <constraint firstItem="NCy-9Z-Kim" firstAttribute="top" secondItem="TSe-7M-icp" secondAttribute="top" id="fr8-Em-iC3"/>
-                                    <constraint firstItem="Xyo-6c-DbO" firstAttribute="centerX" secondItem="PUa-JY-lO1" secondAttribute="centerX" constant="35" id="haV-04-FhJ"/>
+                                    <constraint firstItem="Xyo-6c-DbO" firstAttribute="centerX" secondItem="PUa-JY-lO1" secondAttribute="centerX" constant="30" id="haV-04-FhJ"/>
                                 </constraints>
                             </view>
                             <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="ZMy-Re-kgU">
@@ -132,7 +132,7 @@
                                     <color key="backgroundColor" red="0.8784313725490196" green="0.8784313725490196" blue="0.8784313725490196" alpha="1" colorSpace="calibratedRGB"/>
                                 </view>
                                 <prototypes>
-                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Message_Cell" rowHeight="80" id="jpk-p2-WJm" customClass="MessageCell" customModule="BPML" customModuleProvider="target">
+                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Message_Cell" rowHeight="80" id="jpk-p2-WJm" customClass="MessageCell" customModule="LYB" customModuleProvider="target">
                                         <rect key="frame" x="0.0" y="28" width="414" height="80"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="jpk-p2-WJm" id="Y1M-Ti-XE4">
@@ -295,7 +295,7 @@
         <!--消息-->
         <scene sceneID="Mg9-a8-VSI">
             <objects>
-                <viewController storyboardIdentifier="MessageDetail" title="消息" id="Pb9-d5-OJ9" customClass="MessageDetailViewController" customModule="BPML" customModuleProvider="target" sceneMemberID="viewController">
+                <viewController storyboardIdentifier="MessageDetail" title="消息" id="Pb9-d5-OJ9" customClass="MessageDetailViewController" customModule="LYB" customModuleProvider="target" sceneMemberID="viewController">
                     <view key="view" contentMode="scaleToFill" id="Bm2-Ka-Zmg">
                         <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>

+ 27 - 0
MTP_iOS/MTP2_iOS/UserInterface/Global/MainViewController.swift

@@ -21,6 +21,33 @@ class MainViewController: UITabBarController {
         /// 初始化界面
         buildView()
     }
+    
+    override func viewWillAppear(_ animated: Bool) {
+        super.viewWillAppear(animated)
+        
+        /// 开始查询公告消息数据
+        MTP2BusinessCore.shared.noticeManager?.startAutoQueryNotices()
+    }
+    
+    override func viewDidAppear(_ animated: Bool) {
+        super.viewDidAppear(animated)
+        /// 添加广播通知接受
+        MTP2BusinessCore.shared.broadcastManager?.addBroadcastListener(owner: self, action: .NoticeChange, block: { (obj) in
+            DispatchQueue.main.async {
+                if let objs = MTP2BusinessCore.shared.noticeManager?.notices.filter({$0.readed == false}),
+                   objs.count != 0 {
+                    self.viewControllers?[2].tabBarItem.badgeValue = "\(objs.count)"
+                }
+            }
+        })
+    }
+    
+    override func viewDidDisappear(_ animated: Bool) {
+        super.viewDidAppear(animated)
+        MTP2BusinessCore.shared.broadcastManager?.removeBroadcastListener(owner: self)
+    }
+    
+    // MARK: - 广播通知
 
     // MARK: - 加载配置项功能相关
     private func buildView() {

+ 0 - 15
MTP_iOS/MTP2_iOS/UserInterface/Home/HomeViewController.swift

@@ -322,14 +322,6 @@ class HomeViewController: BaseViewController {
             group.leave()
         }
         
-        var notices: [MoNotice] = []
-        group.enter()
-        /// 查询未读公告消息
-        noticeManager.requestNotices(nil, nil, nil, true) { (isComplete, error, messages) in
-            notices = messages ?? []
-            group.leave()
-        }
-        
         group.notify(queue: DispatchQueue.main) {
             /// stopAnimating
             self._anim?.stopAnimating()
@@ -349,13 +341,6 @@ class HomeViewController: BaseViewController {
                 })
                 self.bannerView.imageURLStringsGroup = paths
             }
-            /// 更新成功
-            if notices.contains(where: {$0.readed == false}) {
-                self.showAlertController(title: "提示", message: "有新的未读消息公告,是否前去查看", cancelTitle: "取消", sureTitle: "去查看", cancelBlock: {}) {
-                    /// 跳转到公告消息页面
-                    (self.appDelegate.window?.rootViewController as? MainViewController)?.selectedIndex = 2
-                }
-            }
             
             /// 新闻地址信息
             if let url = MTP2BusinessCore.shared.address?.newsUrl,

+ 14 - 4
MTP_iOS/MTP2_iOS/UserInterface/Message/MessageViewController.swift

@@ -21,9 +21,19 @@ class MessageViewController: BaseViewController {
     /// 公告
     @IBOutlet weak var notice: UIButton!
     /// 消息数量
-    @IBOutlet weak var msgCount: AnimatableLabel!
+    @IBOutlet weak var msgCount: AnimatableLabel! {
+        didSet {
+            msgCount.layer.cornerRadius = 10.0
+            msgCount.layer.masksToBounds = true
+        }
+    }
     /// 公告数量
-    @IBOutlet weak var noticeCount: AnimatableLabel!
+    @IBOutlet weak var noticeCount: AnimatableLabel! {
+        didSet {
+            noticeCount.layer.cornerRadius = 10.0
+            noticeCount.layer.masksToBounds = true
+        }
+    }
     /// 分割线
     @IBOutlet weak var line: UIImageView!
     /// 属性列表
@@ -124,7 +134,7 @@ class MessageViewController: BaseViewController {
         /// 开启Loading
         self._anim?.startAnimating()
         /// 数据查询
-        noticeManager.requestNotices(nil, nil, msgType, false) { (isComplete, error, notices) in
+        noticeManager.requestNotices(nil, nil, msgType, false, nil) { (isComplete, error, notices) in
             DispatchQueue.main.async {
                 /// stop
                 self._anim?.stopAnimating()
@@ -148,7 +158,7 @@ class MessageViewController: BaseViewController {
             return
         }
         /// 数据查询
-        noticeManager.requestNotices(nil, nil, nil, false) { (isComplete, error, notices) in
+        noticeManager.requestNotices(nil, nil, nil, false, nil) { (isComplete, error, notices) in
             DispatchQueue.main.async {
                 if isComplete,
                    let msgs = notices,