Browse Source

up search api

openlockPPP 2 years ago
parent
commit
d2c70c24de

+ 8 - 0
JiaPeiManage.xcodeproj/project.pbxproj

@@ -25,6 +25,8 @@
 		90BC4BDC2A3C2556006FD683 /* TVHeaderAnimator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 90BC4BDB2A3C2556006FD683 /* TVHeaderAnimator.swift */; };
 		90BC4BDE2A3C4691006FD683 /* MeTraineeDetailsPageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 90BC4BDD2A3C4691006FD683 /* MeTraineeDetailsPageViewController.swift */; };
 		90BC4BE02A3C46C4006FD683 /* MeTraineeDetailsPageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 90BC4BDF2A3C46C4006FD683 /* MeTraineeDetailsPageViewController.xib */; };
+		90BC4BE52A3DDF33006FD683 /* MeTraineeSubjectHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 90BC4BE42A3DDF33006FD683 /* MeTraineeSubjectHeaderView.swift */; };
+		90BC4BE72A3DDF44006FD683 /* MeTraineeSubjectHeaderView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 90BC4BE62A3DDF44006FD683 /* MeTraineeSubjectHeaderView.xib */; };
 		90CE52192A36C0710033BD06 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 90CE52182A36C0710033BD06 /* AppDelegate.swift */; };
 		90CE521D2A36C0710033BD06 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 90CE521C2A36C0710033BD06 /* ViewController.swift */; };
 		90CE52202A36C0710033BD06 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 90CE521E2A36C0710033BD06 /* Main.storyboard */; };
@@ -143,6 +145,8 @@
 		90BC4BDB2A3C2556006FD683 /* TVHeaderAnimator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TVHeaderAnimator.swift; sourceTree = "<group>"; };
 		90BC4BDD2A3C4691006FD683 /* MeTraineeDetailsPageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MeTraineeDetailsPageViewController.swift; sourceTree = "<group>"; };
 		90BC4BDF2A3C46C4006FD683 /* MeTraineeDetailsPageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MeTraineeDetailsPageViewController.xib; sourceTree = "<group>"; };
+		90BC4BE42A3DDF33006FD683 /* MeTraineeSubjectHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MeTraineeSubjectHeaderView.swift; sourceTree = "<group>"; };
+		90BC4BE62A3DDF44006FD683 /* MeTraineeSubjectHeaderView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MeTraineeSubjectHeaderView.xib; sourceTree = "<group>"; };
 		90CE52152A36C0700033BD06 /* JiaPeiManage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = JiaPeiManage.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		90CE52182A36C0710033BD06 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
 		90CE521C2A36C0710033BD06 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
@@ -306,6 +310,8 @@
 				909DA5C62A3AA1FF0034501F /* MeTraineeNavBar.xib */,
 				909DA5D22A3ADFD80034501F /* MeTraineeSubjectCell.swift */,
 				909DA5D42A3AE0160034501F /* MeTraineeSubjectCell.xib */,
+				90BC4BE42A3DDF33006FD683 /* MeTraineeSubjectHeaderView.swift */,
+				90BC4BE62A3DDF44006FD683 /* MeTraineeSubjectHeaderView.xib */,
 			);
 			path = Views;
 			sourceTree = "<group>";
@@ -823,6 +829,7 @@
 				909DA5D52A3AE0160034501F /* MeTraineeSubjectCell.xib in Resources */,
 				90CE52852A36E5460033BD06 /* EmptyView.xib in Resources */,
 				90CE53002A36F7110033BD06 /* HomeViewController.xib in Resources */,
+				90BC4BE72A3DDF44006FD683 /* MeTraineeSubjectHeaderView.xib in Resources */,
 				909DA5CD2A3AC00D0034501F /* MeTraineeSearchPageViewController.xib in Resources */,
 				909DA5C72A3AA1FF0034501F /* MeTraineeNavBar.xib in Resources */,
 			);
@@ -969,6 +976,7 @@
 				90CE52A72A36E59A0033BD06 /* UIImage+Placeholder.swift in Sources */,
 				90CE52CF2A36E5EC0033BD06 /* UICollectionView+Rx.swift in Sources */,
 				90CE52742A36E5460033BD06 /* LWPlayerManager.swift in Sources */,
+				90BC4BE52A3DDF33006FD683 /* MeTraineeSubjectHeaderView.swift in Sources */,
 				90CE52BC2A36E5B70033BD06 /* Networking.swift in Sources */,
 				90CE52E22A36E73A0033BD06 /* SplashViewController.swift in Sources */,
 				90CE52802A36E5460033BD06 /* NYSwToaster.swift in Sources */,

+ 23 - 0
JiaPeiManage/Assets.xcassets/Modules/Stu/close-gray.imageset/Contents.json

@@ -0,0 +1,23 @@
+{
+  "images" : [
+    {
+      "filename" : "close-gray.png",
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "close-gray@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "close-gray@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
JiaPeiManage/Assets.xcassets/Modules/Stu/close-gray.imageset/close-gray.png


BIN
JiaPeiManage/Assets.xcassets/Modules/Stu/close-gray.imageset/close-gray@2x.png


BIN
JiaPeiManage/Assets.xcassets/Modules/Stu/close-gray.imageset/close-gray@3x.png


+ 23 - 0
JiaPeiManage/Assets.xcassets/Modules/Stu/search-gray.imageset/Contents.json

@@ -0,0 +1,23 @@
+{
+  "images" : [
+    {
+      "filename" : "search-gray.png",
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "search-gray@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "search-gray@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
JiaPeiManage/Assets.xcassets/Modules/Stu/search-gray.imageset/search-gray.png


BIN
JiaPeiManage/Assets.xcassets/Modules/Stu/search-gray.imageset/search-gray@2x.png


BIN
JiaPeiManage/Assets.xcassets/Modules/Stu/search-gray.imageset/search-gray@3x.png


+ 11 - 2
JiaPeiManage/Sources/Modulars/学员/Controllers/MeTraineeListViewController.swift

@@ -113,9 +113,11 @@ extension MeTraineeListViewController : VTMagicViewDelegate {
         var menuItem = magicView.menuItem(at: itemIndex)
         if (menuItemCurrentBtn != nil) {
             menuItemCurrentBtn?.titleLabel?.font = NYFont.SysFont.sys_15
+            menuItemCurrentBtn?.qmui_badgeLabel?.isHidden = true
         }
         menuItemCurrentBtn = menuItem
-        menuItem?.titleLabel?.font = UIFont.boldSystemFont(ofSize: 19)
+        menuItem?.titleLabel?.font = UIFont.boldSystemFont(ofSize: 17)
+        menuItem?.qmui_badgeLabel?.isHidden = false
         if itemIndex == 0 || itemIndex == 1 {
             guard let currentVc = pageController.currentViewController else { return }
             
@@ -170,7 +172,7 @@ extension MeTraineeListViewController : VTMagicViewDataSource{
         
         var menuItem = magicView.dequeueReusableItem(withIdentifier: "homeItemIdentifier")
         if menuItem == nil  {
-            menuItem = UIButton(type: .custom)
+            menuItem = QMUIButton(type: .custom)
             menuItem?.setTitleColor(.db_fontGray, for: .normal)
             menuItem?.setTitleColor(.db_fontSelColor, for: .selected)
             menuItem?.titleLabel?.font = NYFont.SysFont.sys_15
@@ -178,6 +180,13 @@ extension MeTraineeListViewController : VTMagicViewDataSource{
                 menuItemCurrentBtn = menuItem
                 menuItem?.titleLabel?.font = UIFont.boldSystemFont(ofSize: 17)
             }
+            menuItem?.qmui_badgeBackgroundColor = UIColor("#F84444")
+            menuItem?.qmui_badgeTextColor = UIColor.white
+            menuItem?.qmui_badgeInteger = 50
+            menuItem?.qmui_badgeLabel?.isHidden = true
+            menuItem?.qmui_badgeFont = NYFont.SysFont.sys_10
+            menuItem?.qmui_badgeOffset = CGPoint(x: -35, y: 26)
+            menuItem?.qmui_badgeContentEdgeInsets = UIEdgeInsets(top: 2, left: 2, bottom: 2, right: 2)
         }
         
         return menuItem ?? UIButton()

+ 138 - 2
JiaPeiManage/Sources/Modulars/学员/Controllers/MeTraineeSearchPageViewController.swift

@@ -8,20 +8,156 @@ import UIKit
 import RxSwift
 import RxCocoa
 
-final class MeTraineeSearchPageViewController: BaseViewController {
+final class MeTraineeSearchPageViewController: BaseTableViewController {
     
+    let cellIdentifier:String = "_MeTraineeSubjectCellSearch"
+    // MARK: 服务属性
+    private let cocahService: CoachServiceType = CoachService(networking: CoachNetworking())
     // MARK: UI属性
     
+    @IBOutlet weak var searchView: UIView!
+    //搜索
+    @IBOutlet weak var search_textfield: QMUITextField!
+    //搜按钮
+    @IBOutlet weak var search_button: UIButton!
+    
+    
+    //search bar
+//    let search_bar = QMUISearchBar().then {
+//        $0.backgroundColor = UIColor("#26486B")
+//        $0.layer.cornerRadius = 15.f
+//        $0.layer.masksToBounds = true
+//    }
+    
+    let headerView = MeTraineeSubjectHeaderView.loadFromNib()
+    // MARK: 数据
+    var traineeDataModel:TraineeDataModel?
+    var page:Int = 1
+    var pageSize:Int = 10
+    var state = ""
+    //重置约束
+    override func setupConstraints() {
+        self.tableView.snp.makeConstraints { make in
+            make.top.equalTo(self.searchView.bottom)
+            make.left.right.bottom.equalTo(self.view)
+        }
+        
+    }
+    
     override func viewDidLoad() {
         super.viewDidLoad()
         setupUI()
+        biandView()
     }
     
+    
     // MARK: 私有方法
     func setupUI(){
         self.view.backgroundColor = .db_theme
-      
+//        self.searchView.addSubview(search_bar)
+        self.search_textfield.placeholderColor = .db_place
+        tableView.delegate = self
+        tableView.dataSource = self
+        tableView.separatorStyle = .none //去除分割线
+        tableView.register(UINib(nibName: "MeTraineeSubjectCell", bundle: nil), forCellReuseIdentifier: cellIdentifier)
+        tableView.rowHeight = 288.f
+        setupRefreshHeader(tableView) {[unowned self] in
+            DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) {
+                // 在延迟 1 秒后执行的代码
+                self.stopRefresh()
+            }
+            NSLog("AAAAAAA")
+        }
+        self.isEmptyDisplay = false
+        //获取第一响应者
+        
+    }
+    
+    //绑定-rx
+    func biandView(){
+        
+        search_textfield.rx.text.orEmpty
+//            .filter { !$0.isEmpty } // Filter out empty strings
+            .subscribe(onNext: { [unowned self] searchText in
+                // Handle the updated search text here
+                print("Search text changed: \(searchText)")
+                self.searchCoachInfoList()
+            })
+            .disposed(by: disposeBag)
+        
+        //Driver
+//        let result = search_textfield.rx.text.skip(1)
+//            .flatMap{
+//                return self.dealWithData(intputText: $0!).observeOn(MainScheduler()).catchErrorJustReturn("监听到错误事件")
+//            }.share(replay: 1,scope: .whileConnected)
     }
     
+//    func dealWithData(intputText:String)-> Observable<Any> {
+//        return Observable<Any>.create({ ob -> Disposable in
+//            self.searchCoachInfoList()
+//            return Disposables.create()
+//        })
+//    }
+    
+    func searchCoachInfoList()
+    {
+        print("网络请求")
+        self.cocahService.coachInfoListRequest(city: LocalManager.userInfo.city!, appCoachId: "", coachId: "\(LocalManager.userInfo.id)", field: search_textfield.text!, pageNum: page, pageSize: pageSize, schoolId: 0, state: state)
+            .subscribe(onSuccess: { traineeDataModel in
+                self.traineeDataModel = traineeDataModel
+                print("coachInfoListRequest成功")
+                self.hideLoadAnimation()
+                self.tableView.reloadData()
+            }, onError: { error in
+            })
+            .disposed(by: disposeBag)
+    }
+    
+}
+
+//数据源
+extension MeTraineeSearchPageViewController:UITableViewDataSource {
+    
+    func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
+        if traineeDataModel != nil {
+            let total = String(format: "%d", traineeDataModel?.total ?? 0)
+            headerView.total_label.text = "总数:"+total
+        }
+        return headerView
+    }
     
+    func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
+        return 55.f
+    }
+    
+    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
+        return traineeDataModel?.rows!.count ?? 0
+    }
+    
+    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
+        let cell = tableView.dequeueReusableCell(withIdentifier: cellIdentifier, for: indexPath) as! MeTraineeSubjectCell
+        cell.index_button.setTitle("\(indexPath.row+1)", for: .normal)
+        cell.setRowInfo(rowInfo: (self.traineeDataModel?.rows?[indexPath.row])!)
+        return cell
+    }
+}
+
+//事件
+extension MeTraineeSearchPageViewController:UITableViewDelegate {
+    
+    func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
+        tableView.deselectRow(at: indexPath, animated: true)
+        let rowInfo = self.traineeDataModel?.rows![indexPath.row]
+        if rowInfo != nil {
+            NYSwRouter.push(NYSwPushType.trainee_info.path)
+        }
+    }
+    
+}
+
+extension MeTraineeSearchPageViewController:UIScrollViewDelegate {
+    
+    func scrollViewWillBeginDragging(_ scrollView: UIScrollView) {
+        self.view.endEditing(true)
+    }
 }

+ 47 - 0
JiaPeiManage/Sources/Modulars/学员/Controllers/MeTraineeSearchPageViewController.xib

@@ -10,6 +10,9 @@
     <objects>
         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="MeTraineeSearchPageViewController" customModule="JiaPeiManage" customModuleProvider="target">
             <connections>
+                <outlet property="searchView" destination="a0a-sl-bPA" id="ZwG-50-IDo"/>
+                <outlet property="search_button" destination="Kuy-oy-vcr" id="NHZ-xx-f80"/>
+                <outlet property="search_textfield" destination="k19-9d-1vC" id="caV-uN-1es"/>
                 <outlet property="view" destination="iN0-l3-epB" id="uwr-i2-6nI"/>
             </connections>
         </placeholder>
@@ -55,9 +58,52 @@
                 </view>
                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="a0a-sl-bPA" userLabel="View-search">
                     <rect key="frame" x="0.0" y="64" width="375" height="54"/>
+                    <subviews>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="lf5-Jn-seD">
+                            <rect key="frame" x="15" y="12" width="345" height="30"/>
+                            <subviews>
+                                <textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入姓名、电话、证件号查询" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="k19-9d-1vC" customClass="QMUITextField">
+                                    <rect key="frame" x="15" y="0.0" width="273" height="30"/>
+                                    <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                    <constraints>
+                                        <constraint firstAttribute="height" constant="30" id="Jw6-ej-aMT"/>
+                                    </constraints>
+                                    <color key="textColor" red="0.83137254901960778" green="0.8666666666666667" blue="0.90196078431372551" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                    <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                    <textInputTraits key="textInputTraits"/>
+                                </textField>
+                                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Kuy-oy-vcr">
+                                    <rect key="frame" x="303" y="0.0" width="30" height="30"/>
+                                    <constraints>
+                                        <constraint firstAttribute="height" constant="30" id="aRZ-l1-i9B"/>
+                                        <constraint firstAttribute="width" constant="30" id="bgV-1E-mJc"/>
+                                    </constraints>
+                                    <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                    <state key="normal" image="search-gray"/>
+                                </button>
+                            </subviews>
+                            <color key="backgroundColor" red="0.14901960784313725" green="0.28235294117647058" blue="0.41960784313725491" alpha="1" colorSpace="calibratedRGB"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="30" id="4ne-s2-9yJ"/>
+                                <constraint firstItem="k19-9d-1vC" firstAttribute="leading" secondItem="lf5-Jn-seD" secondAttribute="leading" constant="15" id="6h2-pa-YN6"/>
+                                <constraint firstAttribute="trailing" secondItem="Kuy-oy-vcr" secondAttribute="trailing" constant="12" id="FRq-cs-9Wb"/>
+                                <constraint firstItem="k19-9d-1vC" firstAttribute="top" secondItem="lf5-Jn-seD" secondAttribute="top" id="RjO-q9-JgA"/>
+                                <constraint firstItem="Kuy-oy-vcr" firstAttribute="leading" secondItem="k19-9d-1vC" secondAttribute="trailing" constant="15" id="Y8W-Nc-Zb3"/>
+                                <constraint firstItem="Kuy-oy-vcr" firstAttribute="top" secondItem="lf5-Jn-seD" secondAttribute="top" id="cIM-QJ-xez"/>
+                            </constraints>
+                            <userDefinedRuntimeAttributes>
+                                <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                    <real key="value" value="15"/>
+                                </userDefinedRuntimeAttribute>
+                            </userDefinedRuntimeAttributes>
+                        </view>
+                    </subviews>
                     <color key="backgroundColor" red="0.043137254899999998" green="0.16862745100000001" blue="0.30196078430000001" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/>
                     <constraints>
+                        <constraint firstItem="lf5-Jn-seD" firstAttribute="leading" secondItem="a0a-sl-bPA" secondAttribute="leading" constant="15" id="H2o-rP-bcH"/>
+                        <constraint firstItem="lf5-Jn-seD" firstAttribute="top" secondItem="a0a-sl-bPA" secondAttribute="top" constant="12" id="Szk-KF-WPz"/>
                         <constraint firstAttribute="height" constant="54" id="dht-1a-4dL"/>
+                        <constraint firstAttribute="trailing" secondItem="lf5-Jn-seD" secondAttribute="trailing" constant="15" id="kZq-dK-Qma"/>
                     </constraints>
                 </view>
             </subviews>
@@ -76,5 +122,6 @@
     </objects>
     <resources>
         <image name="back-white" width="9.3333330154418945" height="17"/>
+        <image name="search-gray" width="21" height="21"/>
     </resources>
 </document>

+ 1 - 0
JiaPeiManage/Sources/Modulars/学员/Controllers/MeTraineeSubjectPageViewController.swift

@@ -18,6 +18,7 @@ final class MeTraineeSubjectPageViewController: BaseTableViewController {
    
     // MARK: UI属性
     
+    
     // MARK: 数据
     var traineeDataModel:TraineeDataModel?
     

+ 3 - 3
JiaPeiManage/Sources/Modulars/学员/Views/MeTraineeSubjectCell.xib

@@ -33,7 +33,7 @@
                                 </userDefinedRuntimeAttribute>
                             </userDefinedRuntimeAttributes>
                         </button>
-                        <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="default-user" translatesAutoresizingMaskIntoConstraints="NO" id="adu-yu-H5N">
+                        <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="default-user-male" translatesAutoresizingMaskIntoConstraints="NO" id="adu-yu-H5N">
                             <rect key="frame" x="15" y="52" width="74" height="102"/>
                             <constraints>
                                 <constraint firstAttribute="width" constant="74" id="dw9-Mk-KTJ"/>
@@ -125,7 +125,7 @@
                                         <constraint firstAttribute="height" constant="24" id="aXd-0e-YlD"/>
                                     </constraints>
                                 </imageView>
-                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="2025-05-24" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="AZo-dC-4iu">
+                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="8888" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="AZo-dC-4iu">
                                     <rect key="frame" x="210" y="9" width="85" height="20"/>
                                     <constraints>
                                         <constraint firstAttribute="width" constant="85" id="YOe-CQ-IRc"/>
@@ -300,7 +300,7 @@
         <image name="K3_no" width="24" height="24"/>
         <image name="K4_no" width="24" height="24"/>
         <image name="call_phone" width="36" height="36"/>
-        <image name="default-user" width="74" height="102"/>
+        <image name="default-user-male" width="74" height="102"/>
         <image name="k2_no" width="24" height="24"/>
         <image name="send_msg" width="36" height="36"/>
         <image name="user-male" width="18" height="18"/>

+ 21 - 0
JiaPeiManage/Sources/Modulars/学员/Views/MeTraineeSubjectHeaderView.swift

@@ -0,0 +1,21 @@
+//
+//  MeTraineeSubjectHeaderView.swift
+//  JiaPeiManage
+//
+//  Created by Ning.ge on 2023/6/17.
+//
+
+import UIKit
+
+final class MeTraineeSubjectHeaderView: UIView,NibLoadable {
+
+    
+    @IBOutlet weak var total_label: UILabel!
+    
+    override func awakeFromNib() {
+        super.awakeFromNib()
+        
+        
+    }
+    
+}

+ 56 - 0
JiaPeiManage/Sources/Modulars/学员/Views/MeTraineeSubjectHeaderView.xib

@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+    <device id="retina6_12" orientation="portrait" appearance="light"/>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21678"/>
+        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="MeTraineeSubjectHeaderView" customModule="JiaPeiManage" customModuleProvider="target">
+            <rect key="frame" x="0.0" y="0.0" width="375" height="55"/>
+            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+            <subviews>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="cF6-jZ-761" userLabel="View-content">
+                    <rect key="frame" x="15" y="15" width="345" height="40"/>
+                    <subviews>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="总数:0" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2jE-JR-7MF">
+                            <rect key="frame" x="15" y="10" width="315" height="20"/>
+                            <fontDescription key="fontDescription" type="boldSystem" pointSize="14"/>
+                            <color key="textColor" red="0.83137254901960778" green="0.8666666666666667" blue="0.90196078431372551" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                            <nil key="highlightedColor"/>
+                        </label>
+                    </subviews>
+                    <color key="backgroundColor" red="0.043137254901960784" green="0.16862745098039217" blue="0.30196078431372547" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                    <constraints>
+                        <constraint firstItem="2jE-JR-7MF" firstAttribute="leading" secondItem="cF6-jZ-761" secondAttribute="leading" constant="15" id="3a7-VC-RXy"/>
+                        <constraint firstAttribute="bottom" secondItem="2jE-JR-7MF" secondAttribute="bottom" constant="10" id="3m4-bl-8dW"/>
+                        <constraint firstAttribute="trailing" secondItem="2jE-JR-7MF" secondAttribute="trailing" constant="15" id="YMW-fN-1vv"/>
+                        <constraint firstItem="2jE-JR-7MF" firstAttribute="top" secondItem="cF6-jZ-761" secondAttribute="top" constant="10" id="jib-Vm-8VM"/>
+                    </constraints>
+                    <userDefinedRuntimeAttributes>
+                        <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                            <real key="value" value="5"/>
+                        </userDefinedRuntimeAttribute>
+                    </userDefinedRuntimeAttributes>
+                </view>
+            </subviews>
+            <viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
+            <color key="backgroundColor" red="0.023529411764705882" green="0.12549019607843137" blue="0.22745098039215686" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+            <constraints>
+                <constraint firstItem="cF6-jZ-761" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" constant="15" id="4hs-Hf-Mbm"/>
+                <constraint firstItem="cF6-jZ-761" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="15" id="HkC-lS-IBT"/>
+                <constraint firstItem="vUN-kp-3ea" firstAttribute="trailing" secondItem="cF6-jZ-761" secondAttribute="trailing" constant="15" id="dYg-RY-0LO"/>
+                <constraint firstAttribute="bottom" secondItem="cF6-jZ-761" secondAttribute="bottom" id="w3T-ti-tg1"/>
+            </constraints>
+            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
+            <connections>
+                <outlet property="total_label" destination="2jE-JR-7MF" id="Ja2-t1-erO"/>
+            </connections>
+            <point key="canvasLocation" x="48" y="21"/>
+        </view>
+    </objects>
+</document>