Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
galaxy-iOS
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mobile-group
galaxy-iOS
Commits
57c77d97
Commit
57c77d97
authored
Apr 11, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS
into develop
parents
51f3e487
b0c61a3c
Changes
36
Show whitespace changes
Inline
Side-by-side
Showing
36 changed files
with
628 additions
and
443 deletions
+628
-443
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+19
-3
AppDelegate.swift
galaxy/galaxy/AppDelegate.swift
+18
-1
YHConfigManager.swift
...y/galaxy/Classes/Modules/Home(首页)/C/YHConfigManager.swift
+40
-0
YHHomePageViewController.swift
...Classes/Modules/Home(首页)/C/YHHomePageViewController.swift
+15
-112
YHHomeViewController.swift
...axy/Classes/Modules/Home(首页)/C/YHHomeViewController.swift
+1
-11
YHHomeWebViewController.swift
.../Classes/Modules/Home(首页)/C/YHHomeWebViewController.swift
+53
-4
YHConfigModel.swift
galaxy/galaxy/Classes/Modules/Home(首页)/M/YHConfigModel.swift
+20
-0
YHHomeListModel.swift
...y/galaxy/Classes/Modules/Home(首页)/M/YHHomeListModel.swift
+59
-3
YHWebModel.swift
galaxy/galaxy/Classes/Modules/Home(首页)/M/YHWebModel.swift
+18
-0
YHHomeWebBottomView.swift
...laxy/Classes/Modules/Home(首页)/V/YHHomeWebBottomView.swift
+9
-6
YHHomePageViewModel.swift
...axy/Classes/Modules/Home(首页)/VM/YHHomePageViewModel.swift
+21
-11
YHHomeWebViewModel.swift
...laxy/Classes/Modules/Home(首页)/VM/YHHomeWebViewModel.swift
+77
-0
YHServerHKLifeViewController.swift
...lligentService(服务中心)/C/YHServerHKLifeViewController.swift
+30
-15
YHServiceListViewController.swift
...elligentService(服务中心)/C/YHServiceListViewController.swift
+8
-1
YHMyDocumentsDetailViewController.swift
...Documents(我的文书)/C/YHMyDocumentsDetailViewController.swift
+13
-3
YHMyDocumentsListViewController.swift
...MyDocuments(我的文书)/C/YHMyDocumentsListViewController.swift
+0
-7
YHDocumentToActionTableViewCell.swift
...MyDocuments(我的文书)/V/YHDocumentToActionTableViewCell.swift
+27
-27
YHDocumentUploadTableViewCell.swift
...)/MyDocuments(我的文书)/V/YHDocumentUploadTableViewCell.swift
+10
-0
YHMyDocumentsDetailViewModel.swift
...uments(我的文书)/ViewModel/YHMyDocumentsDetailViewModel.swift
+19
-0
YHMySignatureDetailViewController.swift
...Signature(我的签字)/C/YHMySignatureDetailViewController.swift
+10
-1
YHMyFileMethodTableViewCell.swift
...中心)/MySignature(我的签字)/V/YHMyFileMethodTableViewCell.swift
+27
-27
YHSignatureUploadTableViewCell.swift
.../MySignature(我的签字)/V/YHSignatureUploadTableViewCell.swift
+10
-0
YHMySignatureDetailViewModel.swift
...)/MySignature(我的签字)/VM/YHMySignatureDetailViewModel.swift
+19
-0
YHHomeCollectionViewCell.swift
...IntelligentService(服务中心)/V/YHHomeCollectionViewCell.swift
+31
-101
YHServerNoOrderView.swift
...ules/IntelligentService(服务中心)/V/YHServerNoOrderView.swift
+15
-5
YHServiceSectionView.swift
...les/IntelligentService(服务中心)/V/YHServiceSectionView.swift
+11
-24
YHServiceTableFootView.swift
...s/IntelligentService(服务中心)/V/YHServiceTableFootView.swift
+15
-75
YHAllApiName.swift
galaxy/galaxy/Classes/Tools/NetWork/YHAllApiName.swift
+9
-4
Vector@2x.png
....xcassets/DavidTest/home_red_heart.imageset/Vector@2x.png
+0
-0
Vector@3x.png
....xcassets/DavidTest/home_red_heart.imageset/Vector@3x.png
+0
-0
Contents.json
...sets.xcassets/Home/home_grey_heart.imageset/Contents.json
+2
-2
编组-8@2x.png
...Assets.xcassets/Home/home_grey_heart.imageset/编组-8@2x.png
+0
-0
编组-8@3x.png
...Assets.xcassets/Home/home_grey_heart.imageset/编组-8@3x.png
+0
-0
Contents.json
...ssets.xcassets/Home/home_red_heart.imageset/Contents.json
+22
-0
编组-8@2x.png
.../Assets.xcassets/Home/home_red_heart.imageset/编组-8@2x.png
+0
-0
编组-8@3x.png
.../Assets.xcassets/Home/home_red_heart.imageset/编组-8@3x.png
+0
-0
No files found.
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
57c77d97
...
@@ -233,6 +233,8 @@
...
@@ -233,6 +233,8 @@
0480976B2BA15269000B9DCA
/* YHCertificateInfoCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0480976A2BA15269000B9DCA
/* YHCertificateInfoCell.swift */
;
};
0480976B2BA15269000B9DCA
/* YHCertificateInfoCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0480976A2BA15269000B9DCA
/* YHCertificateInfoCell.swift */
;
};
0480976D2BA158A1000B9DCA
/* YHCertificateListVC.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0480976C2BA158A1000B9DCA
/* YHCertificateListVC.swift */
;
};
0480976D2BA158A1000B9DCA
/* YHCertificateListVC.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0480976C2BA158A1000B9DCA
/* YHCertificateListVC.swift */
;
};
048097712BA18D66000B9DCA
/* YHCertificateSearchBar.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
048097702BA18D66000B9DCA
/* YHCertificateSearchBar.swift */
;
};
048097712BA18D66000B9DCA
/* YHCertificateSearchBar.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
048097702BA18D66000B9DCA
/* YHCertificateSearchBar.swift */
;
};
048B2A442BC7901900A93BF0
/* YHHomeWebViewModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
048B2A432BC7901900A93BF0
/* YHHomeWebViewModel.swift */
;
};
048B2A462BC7912400A93BF0
/* YHWebModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
048B2A452BC7912400A93BF0
/* YHWebModel.swift */
;
};
0493B3DC2BA7EFE600AF9393
/* YHCertificateSearchViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0493B3DB2BA7EFE600AF9393
/* YHCertificateSearchViewController.swift */
;
};
0493B3DC2BA7EFE600AF9393
/* YHCertificateSearchViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0493B3DB2BA7EFE600AF9393
/* YHCertificateSearchViewController.swift */
;
};
0493B3DE2BA80C2300AF9393
/* YHCertificateFilterButton.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0493B3DD2BA80C2300AF9393
/* YHCertificateFilterButton.swift */
;
};
0493B3DE2BA80C2300AF9393
/* YHCertificateFilterButton.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0493B3DD2BA80C2300AF9393
/* YHCertificateFilterButton.swift */
;
};
049537852BA9B28500AF7E59
/* YHCertificateTemplateCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
049537842BA9B28500AF7E59
/* YHCertificateTemplateCell.swift */
;
};
049537852BA9B28500AF7E59
/* YHCertificateTemplateCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
049537842BA9B28500AF7E59
/* YHCertificateTemplateCell.swift */
;
};
...
@@ -322,6 +324,8 @@
...
@@ -322,6 +324,8 @@
A592FE932BA6CFFC0062FACA
/* YHCertificateEntryBottomView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A592FE922BA6CFFC0062FACA
/* YHCertificateEntryBottomView.swift */
;
};
A592FE932BA6CFFC0062FACA
/* YHCertificateEntryBottomView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A592FE922BA6CFFC0062FACA
/* YHCertificateEntryBottomView.swift */
;
};
A592FE952BA6D23C0062FACA
/* YHCertificateEntryCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A592FE942BA6D23C0062FACA
/* YHCertificateEntryCell.swift */
;
};
A592FE952BA6D23C0062FACA
/* YHCertificateEntryCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A592FE942BA6D23C0062FACA
/* YHCertificateEntryCell.swift */
;
};
A592FE972BA6DB340062FACA
/* YHCertificateViewModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A592FE962BA6DB340062FACA
/* YHCertificateViewModel.swift */
;
};
A592FE972BA6DB340062FACA
/* YHCertificateViewModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A592FE962BA6DB340062FACA
/* YHCertificateViewModel.swift */
;
};
A5A4FD632BC79901001EF9F7
/* YHConfigManager.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5A4FD622BC79901001EF9F7
/* YHConfigManager.swift */
;
};
A5A4FD652BC799A9001EF9F7
/* YHConfigModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5A4FD642BC799A9001EF9F7
/* YHConfigModel.swift */
;
};
A5ACE9272B4564F7002C94D2
/* YHLoginViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5ACE8DB2B4564F7002C94D2
/* YHLoginViewController.swift */
;
};
A5ACE9272B4564F7002C94D2
/* YHLoginViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5ACE8DB2B4564F7002C94D2
/* YHLoginViewController.swift */
;
};
A5ACE9282B4564F7002C94D2
/* YHSmsCodeView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5ACE8DE2B4564F7002C94D2
/* YHSmsCodeView.swift */
;
};
A5ACE9282B4564F7002C94D2
/* YHSmsCodeView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5ACE8DE2B4564F7002C94D2
/* YHSmsCodeView.swift */
;
};
A5ACE9292B4564F7002C94D2
/* YHSmsCodeInputView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5ACE8E02B4564F7002C94D2
/* YHSmsCodeInputView.swift */
;
};
A5ACE9292B4564F7002C94D2
/* YHSmsCodeInputView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5ACE8E02B4564F7002C94D2
/* YHSmsCodeInputView.swift */
;
};
...
@@ -670,6 +674,8 @@
...
@@ -670,6 +674,8 @@
0480976A2BA15269000B9DCA
/* YHCertificateInfoCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHCertificateInfoCell.swift
;
sourceTree
=
"<group>"
;
};
0480976A2BA15269000B9DCA
/* YHCertificateInfoCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHCertificateInfoCell.swift
;
sourceTree
=
"<group>"
;
};
0480976C2BA158A1000B9DCA
/* YHCertificateListVC.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHCertificateListVC.swift
;
sourceTree
=
"<group>"
;
};
0480976C2BA158A1000B9DCA
/* YHCertificateListVC.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHCertificateListVC.swift
;
sourceTree
=
"<group>"
;
};
048097702BA18D66000B9DCA
/* YHCertificateSearchBar.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHCertificateSearchBar.swift
;
sourceTree
=
"<group>"
;
};
048097702BA18D66000B9DCA
/* YHCertificateSearchBar.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHCertificateSearchBar.swift
;
sourceTree
=
"<group>"
;
};
048B2A432BC7901900A93BF0
/* YHHomeWebViewModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHHomeWebViewModel.swift
;
sourceTree
=
"<group>"
;
};
048B2A452BC7912400A93BF0
/* YHWebModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHWebModel.swift
;
sourceTree
=
"<group>"
;
};
0493B3DB2BA7EFE600AF9393
/* YHCertificateSearchViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHCertificateSearchViewController.swift
;
sourceTree
=
"<group>"
;
};
0493B3DB2BA7EFE600AF9393
/* YHCertificateSearchViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHCertificateSearchViewController.swift
;
sourceTree
=
"<group>"
;
};
0493B3DD2BA80C2300AF9393
/* YHCertificateFilterButton.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHCertificateFilterButton.swift
;
sourceTree
=
"<group>"
;
};
0493B3DD2BA80C2300AF9393
/* YHCertificateFilterButton.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHCertificateFilterButton.swift
;
sourceTree
=
"<group>"
;
};
049537842BA9B28500AF7E59
/* YHCertificateTemplateCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHCertificateTemplateCell.swift
;
sourceTree
=
"<group>"
;
};
049537842BA9B28500AF7E59
/* YHCertificateTemplateCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHCertificateTemplateCell.swift
;
sourceTree
=
"<group>"
;
};
...
@@ -765,6 +771,8 @@
...
@@ -765,6 +771,8 @@
A592FE922BA6CFFC0062FACA
/* YHCertificateEntryBottomView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHCertificateEntryBottomView.swift
;
sourceTree
=
"<group>"
;
};
A592FE922BA6CFFC0062FACA
/* YHCertificateEntryBottomView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHCertificateEntryBottomView.swift
;
sourceTree
=
"<group>"
;
};
A592FE942BA6D23C0062FACA
/* YHCertificateEntryCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHCertificateEntryCell.swift
;
sourceTree
=
"<group>"
;
};
A592FE942BA6D23C0062FACA
/* YHCertificateEntryCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHCertificateEntryCell.swift
;
sourceTree
=
"<group>"
;
};
A592FE962BA6DB340062FACA
/* YHCertificateViewModel.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHCertificateViewModel.swift
;
sourceTree
=
"<group>"
;
};
A592FE962BA6DB340062FACA
/* YHCertificateViewModel.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHCertificateViewModel.swift
;
sourceTree
=
"<group>"
;
};
A5A4FD622BC79901001EF9F7
/* YHConfigManager.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHConfigManager.swift
;
sourceTree
=
"<group>"
;
};
A5A4FD642BC799A9001EF9F7
/* YHConfigModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHConfigModel.swift
;
sourceTree
=
"<group>"
;
};
A5ACE8DB2B4564F7002C94D2
/* YHLoginViewController.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHLoginViewController.swift
;
sourceTree
=
"<group>"
;
};
A5ACE8DB2B4564F7002C94D2
/* YHLoginViewController.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHLoginViewController.swift
;
sourceTree
=
"<group>"
;
};
A5ACE8DE2B4564F7002C94D2
/* YHSmsCodeView.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHSmsCodeView.swift
;
sourceTree
=
"<group>"
;
};
A5ACE8DE2B4564F7002C94D2
/* YHSmsCodeView.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHSmsCodeView.swift
;
sourceTree
=
"<group>"
;
};
A5ACE8E02B4564F7002C94D2
/* YHSmsCodeInputView.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHSmsCodeInputView.swift
;
sourceTree
=
"<group>"
;
};
A5ACE8E02B4564F7002C94D2
/* YHSmsCodeInputView.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHSmsCodeInputView.swift
;
sourceTree
=
"<group>"
;
};
...
@@ -2154,6 +2162,8 @@
...
@@ -2154,6 +2162,8 @@
A53F42B82BC3DCA9009CAC70
/* YHHomeKingKongBlockModel.swift */
,
A53F42B82BC3DCA9009CAC70
/* YHHomeKingKongBlockModel.swift */
,
049AC4CB2BC6615500F857F4
/* YHHomeListModel.swift */
,
049AC4CB2BC6615500F857F4
/* YHHomeListModel.swift */
,
049AC4CD2BC674A700F857F4
/* YHHomeClassifyModel.swift */
,
049AC4CD2BC674A700F857F4
/* YHHomeClassifyModel.swift */
,
A5A4FD642BC799A9001EF9F7
/* YHConfigModel.swift */
,
048B2A452BC7912400A93BF0
/* YHWebModel.swift */
,
);
);
path
=
M
;
path
=
M
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
...
@@ -2199,6 +2209,7 @@
...
@@ -2199,6 +2209,7 @@
A53D381F2BC243F1006AE6F7
/* YHStartPageViewController.swift */
,
A53D381F2BC243F1006AE6F7
/* YHStartPageViewController.swift */
,
A5173D672BC399B9007D4E74
/* YHHomePageViewController.swift */
,
A5173D672BC399B9007D4E74
/* YHHomePageViewController.swift */
,
044E1E802BC3BBC200A3B4AF
/* YHSearchInfomationVC.swift */
,
044E1E802BC3BBC200A3B4AF
/* YHSearchInfomationVC.swift */
,
A5A4FD622BC79901001EF9F7
/* YHConfigManager.swift */
,
);
);
path
=
C
;
path
=
C
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
...
@@ -2228,6 +2239,7 @@
...
@@ -2228,6 +2239,7 @@
isa
=
PBXGroup
;
isa
=
PBXGroup
;
children
=
(
children
=
(
A5D6AB1C2B46AAFB001C10A5
/* YHHomePageViewModel.swift */
,
A5D6AB1C2B46AAFB001C10A5
/* YHHomePageViewModel.swift */
,
048B2A432BC7901900A93BF0
/* YHHomeWebViewModel.swift */
,
);
);
path
=
VM
;
path
=
VM
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
...
@@ -2459,6 +2471,7 @@
...
@@ -2459,6 +2471,7 @@
045EEF112B9F171A0022A143
/* YHMainInformationModel.swift in Sources */
,
045EEF112B9F171A0022A143
/* YHMainInformationModel.swift in Sources */
,
A58AC09D2BABD59600A30FA9
/* YHFileListModel.swift in Sources */
,
A58AC09D2BABD59600A30FA9
/* YHFileListModel.swift in Sources */
,
045EEEFF2B9F171A0022A143
/* YHSaveAndSubmitView.swift in Sources */
,
045EEEFF2B9F171A0022A143
/* YHSaveAndSubmitView.swift in Sources */
,
A5A4FD632BC79901001EF9F7
/* YHConfigManager.swift in Sources */
,
A5173D682BC399B9007D4E74
/* YHHomePageViewController.swift in Sources */
,
A5173D682BC399B9007D4E74
/* YHHomePageViewController.swift in Sources */
,
045EEF0E2B9F171A0022A143
/* YHBasicInfoFillView.swift in Sources */
,
045EEF0E2B9F171A0022A143
/* YHBasicInfoFillView.swift in Sources */
,
045EEEA12B9F171A0022A143
/* YHWorkExperienceDetailModel.swift in Sources */
,
045EEEA12B9F171A0022A143
/* YHWorkExperienceDetailModel.swift in Sources */
,
...
@@ -2496,6 +2509,7 @@
...
@@ -2496,6 +2509,7 @@
A5ACE93A2B4564F7002C94D2
/* NSAttributedString+Extension.swift in Sources */
,
A5ACE93A2B4564F7002C94D2
/* NSAttributedString+Extension.swift in Sources */
,
A53F42BB2BC3DE6F009CAC70
/* YHHomeKingKongBlockItem.swift in Sources */
,
A53F42BB2BC3DE6F009CAC70
/* YHHomeKingKongBlockItem.swift in Sources */
,
04E86E662B86EB6F00A35F4B
/* YHLoginManager.swift in Sources */
,
04E86E662B86EB6F00A35F4B
/* YHLoginManager.swift in Sources */
,
048B2A442BC7901900A93BF0
/* YHHomeWebViewModel.swift in Sources */
,
04A7BD112BA4218B00BD35A2
/* YHMyDocumentsListViewModel.swift in Sources */
,
04A7BD112BA4218B00BD35A2
/* YHMyDocumentsListViewModel.swift in Sources */
,
A5EF21352BA6E05E005027E6
/* YHQuestionAndAnswerViewController.swift in Sources */
,
A5EF21352BA6E05E005027E6
/* YHQuestionAndAnswerViewController.swift in Sources */
,
A5EF213B2BA6EC98005027E6
/* YHQuestionAndAnswerCell.swift in Sources */
,
A5EF213B2BA6EC98005027E6
/* YHQuestionAndAnswerCell.swift in Sources */
,
...
@@ -2624,6 +2638,7 @@
...
@@ -2624,6 +2638,7 @@
045EEE942B9F171A0022A143
/* YHPreviewInfoQuestionAndAnswerItemView.swift in Sources */
,
045EEE942B9F171A0022A143
/* YHPreviewInfoQuestionAndAnswerItemView.swift in Sources */
,
045EEED32B9F171A0022A143
/* YHScoreItemCell.swift in Sources */
,
045EEED32B9F171A0022A143
/* YHScoreItemCell.swift in Sources */
,
045EEEEE2B9F171A0022A143
/* YHCertificateUploadVC.swift in Sources */
,
045EEEEE2B9F171A0022A143
/* YHCertificateUploadVC.swift in Sources */
,
A5A4FD652BC799A9001EF9F7
/* YHConfigModel.swift in Sources */
,
A510441A2B495DD0006B60BB
/* UIView+Extension.swift in Sources */
,
A510441A2B495DD0006B60BB
/* UIView+Extension.swift in Sources */
,
A5ACE93E2B4564F7002C94D2
/* UIImage+Extension.swift in Sources */
,
A5ACE93E2B4564F7002C94D2
/* UIImage+Extension.swift in Sources */
,
A587F7C02BBADBE1002D9781
/* YHHKPlanItemView.swift in Sources */
,
A587F7C02BBADBE1002D9781
/* YHHKPlanItemView.swift in Sources */
,
...
@@ -2659,6 +2674,7 @@
...
@@ -2659,6 +2674,7 @@
045EEED12B9F171A0022A143
/* YHScorePersonInfoCell.swift in Sources */
,
045EEED12B9F171A0022A143
/* YHScorePersonInfoCell.swift in Sources */
,
044CF8D42BB6BCF700008CE8
/* YHSignatureUploadTableViewCell.swift in Sources */
,
044CF8D42BB6BCF700008CE8
/* YHSignatureUploadTableViewCell.swift in Sources */
,
045EEF0D2B9F171A0022A143
/* YHBasicInfoFillCell.swift in Sources */
,
045EEF0D2B9F171A0022A143
/* YHBasicInfoFillCell.swift in Sources */
,
048B2A462BC7912400A93BF0
/* YHWebModel.swift in Sources */
,
045EEEEC2B9F171A0022A143
/* YHBrotherInfoVC.swift in Sources */
,
045EEEEC2B9F171A0022A143
/* YHBrotherInfoVC.swift in Sources */
,
0477E17A2BA41C7E00436346
/* YHCertificateModel.swift in Sources */
,
0477E17A2BA41C7E00436346
/* YHCertificateModel.swift in Sources */
,
045EEF242B9F171A0022A143
/* YHStepView.swift in Sources */
,
045EEF242B9F171A0022A143
/* YHStepView.swift in Sources */
,
...
@@ -2912,7 +2928,7 @@
...
@@ -2912,7 +2928,7 @@
CODE_SIGN_IDENTITY
=
"Apple Development"
;
CODE_SIGN_IDENTITY
=
"Apple Development"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone Developer"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone Developer"
;
CODE_SIGN_STYLE
=
Manual
;
CODE_SIGN_STYLE
=
Manual
;
CURRENT_PROJECT_VERSION
=
8
;
CURRENT_PROJECT_VERSION
=
10
;
DEVELOPMENT_TEAM
=
""
;
DEVELOPMENT_TEAM
=
""
;
"DEVELOPMENT_TEAM[sdk=iphoneos*]"
=
RXHYW88XR7
;
"DEVELOPMENT_TEAM[sdk=iphoneos*]"
=
RXHYW88XR7
;
ENABLE_USER_SCRIPT_SANDBOXING
=
NO
;
ENABLE_USER_SCRIPT_SANDBOXING
=
NO
;
...
@@ -3113,7 +3129,7 @@
...
@@ -3113,7 +3129,7 @@
CODE_SIGN_IDENTITY
=
"Apple Development"
;
CODE_SIGN_IDENTITY
=
"Apple Development"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone Developer"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone Developer"
;
CODE_SIGN_STYLE
=
Manual
;
CODE_SIGN_STYLE
=
Manual
;
CURRENT_PROJECT_VERSION
=
8
;
CURRENT_PROJECT_VERSION
=
10
;
DEVELOPMENT_TEAM
=
""
;
DEVELOPMENT_TEAM
=
""
;
"DEVELOPMENT_TEAM[sdk=iphoneos*]"
=
RXHYW88XR7
;
"DEVELOPMENT_TEAM[sdk=iphoneos*]"
=
RXHYW88XR7
;
ENABLE_USER_SCRIPT_SANDBOXING
=
NO
;
ENABLE_USER_SCRIPT_SANDBOXING
=
NO
;
...
@@ -3155,7 +3171,7 @@
...
@@ -3155,7 +3171,7 @@
CODE_SIGN_IDENTITY
=
"Apple Development"
;
CODE_SIGN_IDENTITY
=
"Apple Development"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone Developer"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone Developer"
;
CODE_SIGN_STYLE
=
Manual
;
CODE_SIGN_STYLE
=
Manual
;
CURRENT_PROJECT_VERSION
=
8
;
CURRENT_PROJECT_VERSION
=
10
;
DEVELOPMENT_TEAM
=
""
;
DEVELOPMENT_TEAM
=
""
;
"DEVELOPMENT_TEAM[sdk=iphoneos*]"
=
RXHYW88XR7
;
"DEVELOPMENT_TEAM[sdk=iphoneos*]"
=
RXHYW88XR7
;
ENABLE_USER_SCRIPT_SANDBOXING
=
NO
;
ENABLE_USER_SCRIPT_SANDBOXING
=
NO
;
...
...
galaxy/galaxy/AppDelegate.swift
View file @
57c77d97
...
@@ -15,7 +15,6 @@ import DeviceKit
...
@@ -15,7 +15,6 @@ import DeviceKit
@main
@main
class
AppDelegate
:
UIResponder
,
UIApplicationDelegate
{
class
AppDelegate
:
UIResponder
,
UIApplicationDelegate
{
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
{
// JPush服务注册
// JPush服务注册
...
@@ -37,6 +36,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
...
@@ -37,6 +36,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
//4.本地用户信息加载
//4.本地用户信息加载
YHLoginManager
.
shared
.
loadLocalUserInfoData
()
YHLoginManager
.
shared
.
loadLocalUserInfoData
()
YHConfigManager
.
shared
.
loadConfigData
()
// YHAnalytics.analyticsStart(launchOptions: launchOptions)
// YHAnalytics.analyticsStart(launchOptions: launchOptions)
...
@@ -150,6 +151,22 @@ extension AppDelegate {
...
@@ -150,6 +151,22 @@ extension AppDelegate {
window
?
.
makeKeyAndVisible
()
window
?
.
makeKeyAndVisible
()
}
}
// private func requestData() {
// self.homeReqVM.getHomeConfig { flag, error in
// if flag == true {
// //1. 调用model 刷新界面
// YHHUD.flash(message: "数据已更新")
// } else {
// //2. 给出 错误提示
// if let error = error {
// YHHUD.flash(message: error.errorMsg)
// }
// }
// }
// }
}
}
galaxy/galaxy/Classes/Modules/Home(首页)/C/YHConfigManager.swift
0 → 100644
View file @
57c77d97
//
// YHConfigManager.swift
// galaxy
//
// Created by davidhuangA on 2024/4/11.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
class
YHConfigManager
:
NSObject
{
static
let
shared
=
YHConfigManager
()
lazy
var
reqVM
:
YHHomePageViewModel
=
{
let
vm
=
YHHomePageViewModel
()
return
vm
}()
private
var
loadNewDataFlag
:
Bool
=
false
private
override
init
()
{
super
.
init
()
// loadConfigData()
}
var
h5Url
:
String
{
return
reqVM
.
configModel
?
.
h5_url
??
""
}
}
extension
YHConfigManager
{
func
loadConfigData
()
{
reqVM
.
getHomeConfig
{
flag
,
error
in
if
flag
{
self
.
loadNewDataFlag
=
true
}
}
}
}
galaxy/galaxy/Classes/Modules/Home(首页)/C/YHHomePageViewController.swift
View file @
57c77d97
...
@@ -18,35 +18,13 @@ class YHHomePageViewController: YHBaseViewController {
...
@@ -18,35 +18,13 @@ class YHHomePageViewController: YHBaseViewController {
}()
}()
lazy
var
homeCollectView
=
{
lazy
var
homeCollectView
=
{
// // 设置布局方向
// let flowLayout = UICollectionViewFlowLayout()
// let margin = 20.0
// let gap = 20.0
// let itemWidth = ceil((KScreenWidth - 2*margin - gap)/2.0)
// flowLayout.itemSize = CGSize(width: itemWidth, height: 210 + 87 + 4)
// flowLayout.minimumInteritemSpacing = 10.0
// flowLayout.minimumLineSpacing = 10.0
// flowLayout.scrollDirection = .vertical
//
// let collectinoView = UICollectionView(frame: .zero, collectionViewLayout: flowLayout)
// collectinoView.backgroundColor = .white
// collectinoView.register(YHDavidTestCollectionViewCell.self, forCellWithReuseIdentifier:YHDavidTestCollectionViewCell.cellReuseIdentifier)
// collectinoView.delegate = self
// collectinoView.dataSource = self
// collectinoView.showsVerticalScrollIndicator = false
//
// collectinoView.translatesAutoresizingMaskIntoConstraints = false
// collectinoView.alwaysBounceVertical = true
//
// 设置布局方向
// 设置布局方向
let
flowLayout
=
YHHomeCollectionLayout
()
let
flowLayout
=
YHHomeCollectionLayout
()
flowLayout
.
minimumInteritemSpacing
=
7.0
flowLayout
.
minimumInteritemSpacing
=
7.0
flowLayout
.
minimumColumnSpacing
=
10.0
flowLayout
.
minimumColumnSpacing
=
10.0
flowLayout
.
sectionInset
=
UIEdgeInsets
(
top
:
0
,
left
:
20
,
bottom
:
0
,
right
:
20
)
flowLayout
.
sectionInset
=
UIEdgeInsets
(
top
:
0
,
left
:
20
,
bottom
:
0
,
right
:
20
)
let
collectinoView
=
YHGestureCollectionView
(
frame
:
.
zero
,
collectionViewLayout
:
flowLayout
)
let
collectinoView
=
UICollectionView
(
frame
:
.
zero
,
collectionViewLayout
:
flowLayout
)
// collectinoView.contentInset = UIEdgeInsets(top: 20, left: 20, bottom: 20, right: 20)
collectinoView
.
backgroundColor
=
.
white
collectinoView
.
backgroundColor
=
.
white
collectinoView
.
register
(
YHHomeCollectionViewCell
.
self
,
forCellWithReuseIdentifier
:
YHHomeCollectionViewCell
.
cellReuseIdentifier
)
collectinoView
.
register
(
YHHomeCollectionViewCell
.
self
,
forCellWithReuseIdentifier
:
YHHomeCollectionViewCell
.
cellReuseIdentifier
)
collectinoView
.
delegate
=
self
collectinoView
.
delegate
=
self
...
@@ -82,7 +60,7 @@ class YHHomePageViewController: YHBaseViewController {
...
@@ -82,7 +60,7 @@ class YHHomePageViewController: YHBaseViewController {
}
}
func
getData
()
{
func
getData
()
{
viewModel
.
getHomeList
{[
weak
self
]
success
,
error
in
viewModel
.
getHome
News
List
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
self
.
homeCollectView
.
reloadData
()
self
.
homeCollectView
.
reloadData
()
}
}
...
@@ -91,10 +69,6 @@ class YHHomePageViewController: YHBaseViewController {
...
@@ -91,10 +69,6 @@ class YHHomePageViewController: YHBaseViewController {
self
.
homeHeaderView
.
homeBannerView
.
dataArr
=
self
.
viewModel
.
banners
??
[]
self
.
homeHeaderView
.
homeBannerView
.
dataArr
=
self
.
viewModel
.
banners
??
[]
}
}
viewModel
.
getHomeClassify
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
}
}
}
}
}
...
@@ -119,114 +93,43 @@ private extension YHHomePageViewController {
...
@@ -119,114 +93,43 @@ private extension YHHomePageViewController {
homeHeaderView
.
frame
=
CGRect
(
x
:
20
,
y
:
-
YHHomeHeadView
.
viewH
,
width
:
KScreenWidth
-
40
,
height
:
YHHomeHeadView
.
viewH
)
homeHeaderView
.
frame
=
CGRect
(
x
:
20
,
y
:
-
YHHomeHeadView
.
viewH
,
width
:
KScreenWidth
-
40
,
height
:
YHHomeHeadView
.
viewH
)
homeCollectView
.
addSubview
(
homeHeaderView
)
homeCollectView
.
addSubview
(
homeHeaderView
)
homeCollectView
.
contentInset
=
UIEdgeInsets
(
top
:
YHHomeHeadView
.
viewH
,
left
:
0
,
bottom
:
0
,
right
:
0
)
homeCollectView
.
contentInset
=
UIEdgeInsets
(
top
:
YHHomeHeadView
.
viewH
,
left
:
0
,
bottom
:
2
0
,
right
:
0
)
homeCollectView
.
es
.
addInfiniteScrolling
{
homeCollectView
.
es
.
addInfiniteScrolling
{
self
.
loadFakeData
()
}
}
loadFirstItem
()
homeCollectView
.
reloadData
()
homeCollectView
.
reloadData
()
}
}
func
loadFirstItem
()
{
func
loadFirstItem
()
{
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
1
)
{
self
.
items
=
[
AboutAdvantageItem
(
iconName
:
"about_match"
,
title
:
"精准匹配"
,
detail
:
"大数据精准匹配,专属方案获批率更高"
,
url
:
""
),
AboutAdvantageItem
(
iconName
:
"about_match"
,
title
:
"精准匹配"
,
detail
:
"大数据精准匹配,专属方案获批率更高"
,
url
:
""
),
AboutAdvantageItem
(
iconName
:
"about_match"
,
title
:
"精准匹配"
,
detail
:
"大数据精准匹配,专属方案获批率更高"
,
url
:
""
),
AboutAdvantageItem
(
iconName
:
"about_match"
,
title
:
"精准匹配"
,
detail
:
"大数据精准匹配,专属方案获批率更高"
,
url
:
""
)]
self
.
homeCollectView
.
es
.
stopPullToRefresh
(
ignoreDate
:
true
,
ignoreFooter
:
false
)
self
.
homeCollectView
.
reloadData
()
}
}
func
loadFakeData
()
{
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
1
)
{
self
.
items
.
append
(
AboutAdvantageItem
(
iconName
:
"about_match"
,
title
:
"精准匹配"
,
detail
:
"大数据精准匹配,专属方案获批率更高"
,
url
:
""
))
self
.
items
.
append
(
AboutAdvantageItem
(
iconName
:
"about_match"
,
title
:
"精准匹配"
,
detail
:
"大数据精准匹配,专属方案获批率更高"
,
url
:
""
))
self
.
items
.
append
(
AboutAdvantageItem
(
iconName
:
"about_match"
,
title
:
"精准匹配"
,
detail
:
"大数据精准匹配,专属方案获批率更高"
,
url
:
""
))
self
.
items
.
append
(
AboutAdvantageItem
(
iconName
:
"about_match"
,
title
:
"精准匹配"
,
detail
:
"大数据精准匹配,专属方案获批率更高"
,
url
:
""
))
self
.
items
.
append
(
AboutAdvantageItem
(
iconName
:
"about_match"
,
title
:
"精准匹配"
,
detail
:
"大数据精准匹配,专属方案获批率更高"
,
url
:
""
))
self
.
homeCollectView
.
es
.
stopLoadingMore
()
self
.
homeCollectView
.
reloadData
()
}
}
}
func
getImageSize
(
_
url
:
String
?)
->
CGSize
{
guard
let
urlStr
=
url
,
urlStr
.
count
!=
0
else
{
return
CGSize
.
zero
}
let
tempUrl
=
URL
(
string
:
urlStr
)
let
imageSourceRef
=
CGImageSourceCreateWithURL
(
tempUrl
!
as
CFURL
,
nil
)
var
width
:
CGFloat
=
0
var
height
:
CGFloat
=
0
if
let
imageSRef
=
imageSourceRef
{
let
imageProperties
=
CGImageSourceCopyPropertiesAtIndex
(
imageSRef
,
0
,
nil
)
if
let
imageP
=
imageProperties
{
let
imageDict
=
imageP
as
Dictionary
width
=
imageDict
[
kCGImagePropertyPixelWidth
]
as!
CGFloat
height
=
imageDict
[
kCGImagePropertyPixelHeight
]
as!
CGFloat
}
}
return
CGSize
(
width
:
width
,
height
:
height
)
}
}
}
extension
YHHomePageViewController
:
UICollectionViewDelegate
,
UICollectionViewDataSource
{
extension
YHHomePageViewController
:
UICollectionViewDelegate
,
UICollectionViewDataSource
{
func
collectionView
(
_
collectionView
:
UICollectionView
,
numberOfItemsInSection
section
:
Int
)
->
Int
{
func
collectionView
(
_
collectionView
:
UICollectionView
,
numberOfItemsInSection
section
:
Int
)
->
Int
{
return
self
.
viewModel
.
lists
?
.
count
??
0
return
self
.
viewModel
.
arrHomeNewsData
.
count
}
}
func
collectionView
(
_
collectionView
:
UICollectionView
,
cellForItemAt
indexPath
:
IndexPath
)
->
UICollectionViewCell
{
func
collectionView
(
_
collectionView
:
UICollectionView
,
cellForItemAt
indexPath
:
IndexPath
)
->
UICollectionViewCell
{
let
cell
=
collectionView
.
dequeueReusableCell
(
withReuseIdentifier
:
YHHomeCollectionViewCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHHomeCollectionViewCell
let
cell
=
collectionView
.
dequeueReusableCell
(
withReuseIdentifier
:
YHHomeCollectionViewCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHHomeCollectionViewCell
cell
.
listModel
=
self
.
viewModel
.
lists
?
[
indexPath
.
row
]
cell
.
listModel
=
self
.
viewModel
.
arrHomeNewsData
[
indexPath
.
row
]
return
cell
return
cell
}
}
// func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath) {
func
collectionView
(
_
collectionView
:
UICollectionView
,
didSelectItemAt
indexPath
:
IndexPath
)
{
// print("index is \(indexPath.row)")
let
model
=
self
.
viewModel
.
arrHomeNewsData
[
indexPath
.
row
]
// }
let
vc
=
YHHomeWebViewController
()
vc
.
url
=
"https://test-hkdiy-h5.galaxy-immi.com/articleDetail.html?id=
\(
model
?
.
id
??
0
)
"
vc
.
id
=
model
?
.
id
??
0
self
.
navigationController
?
.
pushViewController
(
vc
)
}
}
}
extension
YHHomePageViewController
:
CollectionViewWaterfallLayoutDelegate
{
extension
YHHomePageViewController
:
CollectionViewWaterfallLayoutDelegate
{
func
collectionView
(
_
collectionView
:
UICollectionView
,
layout
:
UICollectionViewLayout
,
sizeForItemAtIndexPath
indexPath
:
NSIndexPath
)
->
CGSize
{
func
collectionView
(
_
collectionView
:
UICollectionView
,
layout
:
UICollectionViewLayout
,
sizeForItemAtIndexPath
indexPath
:
NSIndexPath
)
->
CGSize
{
guard
let
model
=
self
.
viewModel
.
lists
?[
indexPath
.
row
]
else
{
return
CGSize
(
width
:
0
,
height
:
0
)
}
guard
let
model
=
self
.
viewModel
.
arrHomeNewsData
[
indexPath
.
row
]
else
{
return
CGSize
.
zero
}
let
text
=
model
.
title
return
CGSize
(
width
:
model
.
img_width_cell
,
height
:
model
.
img_height_cell
)
let
width
=
(
KScreenWidth
-
47
)
/
2
let
font
=
UIFont
.
PFSC_R
(
ofSize
:
14
)
// 字体大小
let
maxWidth
=
width
-
16
// 最大宽度限制
// 创建NSAttributedString对象并设置属性
let
attributes
=
[
NSAttributedString
.
Key
.
font
:
font
]
as
[
NSAttributedString
.
Key
:
Any
]
_
=
NSMutableAttributedString
(
string
:
text
,
attributes
:
attributes
)
// 根据指定的最大宽度和字体大小计算文本的高度
let
size
=
(
text
as
NSString
)
.
boundingRect
(
with
:
CGSize
(
width
:
maxWidth
,
height
:
.
greatestFiniteMagnitude
),
options
:
.
usesLineFragmentOrigin
,
attributes
:
attributes
,
context
:
nil
)
.
size
var
textHeight
=
size
.
height
if
textHeight
>
40
{
textHeight
=
40
}
let
imageSize
=
getImageSize
(
model
.
img_url
)
var
imageHeight
=
0.0
if
imageSize
.
width
==
0
{
imageHeight
=
width
}
else
{
imageHeight
=
width
*
imageSize
.
height
/
imageSize
.
width
if
imageHeight
>
280
{
imageHeight
=
280
}
}
let
totalHeight
=
imageHeight
+
textHeight
+
46
return
CGSize
(
width
:
width
,
height
:
totalHeight
)
// let margin = 20.0
// let gap = 7.0
// let itemWidth = ceil((KScreenWidth - 2*margin - gap)/2.0)
// let arrItemH : [CGFloat] = [100,150,200,250,300,350,400]
//
// let HHH = arrItemH[Int.random(in: 0...6)]
// return CGSize(width: itemWidth, height: HHH)
}
}
}
}
galaxy/galaxy/Classes/Modules/Home(首页)/C/YHHomeViewController.swift
View file @
57c77d97
...
@@ -223,17 +223,7 @@ extension YHHomeViewController {
...
@@ -223,17 +223,7 @@ extension YHHomeViewController {
}
}
private
func
requestData
()
{
private
func
requestData
()
{
self
.
homeReqVM
.
getHomeConfig
{
flag
,
error
in
if
flag
==
true
{
//1. 调用model 刷新界面
YHHUD
.
flash
(
message
:
"数据已更新"
)
}
else
{
//2. 给出 错误提示
if
let
error
=
error
{
YHHUD
.
flash
(
message
:
error
.
errorMsg
)
}
}
}
}
}
private
func
initView
()
->
Void
{
private
func
initView
()
->
Void
{
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/C/YHHomeWebViewController.swift
View file @
57c77d97
...
@@ -10,22 +10,24 @@ import UIKit
...
@@ -10,22 +10,24 @@ import UIKit
import
WebKit
import
WebKit
class
YHHomeWebViewController
:
YHBaseViewController
,
WKUIDelegate
,
WKNavigationDelegate
{
class
YHHomeWebViewController
:
YHBaseViewController
,
WKUIDelegate
,
WKNavigationDelegate
{
var
viewModel
:
YHHomeWebViewModel
!
var
webview
=
WKWebView
()
var
webview
=
WKWebView
()
var
progBar
=
UIProgressView
()
var
progBar
=
UIProgressView
()
var
bottomView
:
YHHomeWebBottomView
!
var
bottomView
:
YHHomeWebBottomView
!
var
url
=
"https://upload-cdn.galaxy-immi.com/crm/production/1620271613711.pdf"
var
url
=
""
var
id
:
Int
=
0
override
func
viewDidLoad
()
{
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
super
.
viewDidLoad
()
viewModel
=
YHHomeWebViewModel
()
//获取导航栏高度
//获取导航栏高度
let
navHeight
=
self
.
navigationController
?
.
navigationBar
.
frame
.
height
let
navHeight
=
self
.
navigationController
?
.
navigationBar
.
frame
.
height
//获取状态栏高度
//获取状态栏高度
let
statusHeight
=
k_Height_statusBar
()
let
statusHeight
=
k_Height_statusBar
()
// 创建wkwebview
// 创建wkwebview
webview
=
WKWebView
(
frame
:
CGRect
(
x
:
0
,
y
:
statusHeight
+
navHeight
!
,
width
:
self
.
view
.
frame
.
width
,
height
:
self
.
view
.
frame
.
height
))
webview
=
WKWebView
(
frame
:
CGRect
(
x
:
0
,
y
:
statusHeight
+
navHeight
!
,
width
:
self
.
view
.
frame
.
width
,
height
:
self
.
view
.
frame
.
height
-
statusHeight
-
navHeight
!
-
59
-
k_Height_safeAreaInsetsBottom
()
))
webview
.
navigationDelegate
=
self
webview
.
navigationDelegate
=
self
// 创建网址
// 创建网址
let
url
=
NSURL
(
string
:
url
)
let
url
=
NSURL
(
string
:
url
)
...
@@ -48,19 +50,55 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD
...
@@ -48,19 +50,55 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD
let
view
=
YHHomeWebBottomView
()
let
view
=
YHHomeWebBottomView
()
view
.
likeBlock
=
{
[
weak
self
]
flag
in
view
.
likeBlock
=
{
[
weak
self
]
flag
in
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
if
YHLoginManager
.
shared
.
isLogin
()
==
false
{
let
vc
=
UINavigationController
(
rootVC
:
YHPhoneLoginViewController
())
vc
.
modalPresentationStyle
=
.
custom
self
.
navigationController
?
.
present
(
vc
,
animated
:
true
)
return
}
if
flag
{
if
flag
{
self
.
viewModel
.
getLike
(
self
.
id
,
1
)
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
if
success
{
YHHUD
.
flash
(
message
:
"已点赞"
)
YHHUD
.
flash
(
message
:
"已点赞"
)
self
.
getData
()
}
}
}
else
{
}
else
{
self
.
viewModel
.
getLike
(
self
.
id
,
0
)
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
if
success
{
YHHUD
.
flash
(
message
:
"已取消点赞"
)
YHHUD
.
flash
(
message
:
"已取消点赞"
)
self
.
getData
()
}
}
}
}
}
}
view
.
starBlock
=
{
[
weak
self
]
flag
in
view
.
starBlock
=
{
[
weak
self
]
flag
in
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
if
YHLoginManager
.
shared
.
isLogin
()
==
false
{
let
vc
=
UINavigationController
(
rootVC
:
YHPhoneLoginViewController
())
vc
.
modalPresentationStyle
=
.
custom
self
.
navigationController
?
.
present
(
vc
,
animated
:
true
)
return
}
if
flag
{
if
flag
{
self
.
viewModel
.
getStar
(
self
.
id
,
1
)
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
if
success
{
YHHUD
.
flash
(
message
:
"已收藏"
)
YHHUD
.
flash
(
message
:
"已收藏"
)
self
.
getData
()
}
}
}
else
{
}
else
{
self
.
viewModel
.
getStar
(
self
.
id
,
0
)
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
if
success
{
YHHUD
.
flash
(
message
:
"已取消收藏"
)
YHHUD
.
flash
(
message
:
"已取消收藏"
)
self
.
getData
()
}
}
}
}
}
}
return
view
return
view
...
@@ -70,13 +108,24 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD
...
@@ -70,13 +108,24 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD
make
.
bottom
.
left
.
right
.
equalToSuperview
()
make
.
bottom
.
left
.
right
.
equalToSuperview
()
make
.
height
.
equalTo
(
59
+
k_Height_safeAreaInsetsBottom
())
make
.
height
.
equalTo
(
59
+
k_Height_safeAreaInsetsBottom
())
}
}
getData
()
}
}
deinit
{
deinit
{
webview
.
removeObserver
(
self
,
forKeyPath
:
"estimatedProgress"
)
webview
.
removeObserver
(
self
,
forKeyPath
:
"estimatedProgress"
)
}
}
func
getData
()
{
viewModel
.
getWebDetail
(
self
.
id
)
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
guard
let
model
=
self
.
viewModel
.
mainModel
else
{
return
}
bottomView
.
likeCount
=
model
.
like_count
bottomView
.
starCount
=
model
.
collect_count
bottomView
.
isStar
=
model
.
is_collect
bottomView
.
isLike
=
model
.
is_like
}
}
// MARK: - WKNavigationDelegate
// MARK: - WKNavigationDelegate
func
webView
(
_
webView
:
WKWebView
,
didFinish
navigation
:
WKNavigation
!
)
{
func
webView
(
_
webView
:
WKWebView
,
didFinish
navigation
:
WKNavigation
!
)
{
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/M/YHConfigModel.swift
0 → 100644
View file @
57c77d97
//
// YHConfigModel.swift
// galaxy
//
// Created by davidhuangA on 2024/4/11.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
import
SmartCodable
class
YHConfigModel
:
SmartCodable
{
var
min_version_num
:
Int
=
0
var
oss_server
:
Int
=
0
var
countdown
:
Int
=
0
var
h5_url
:
String
=
""
required
init
()
{
}
}
galaxy/galaxy/Classes/Modules/Home(首页)/M/YHHomeListModel.swift
View file @
57c77d97
...
@@ -15,7 +15,63 @@ class YHHomeListModel: YHBaseModel {
...
@@ -15,7 +15,63 @@ class YHHomeListModel: YHBaseModel {
var
content
:
String
=
""
var
content
:
String
=
""
var
view_count
:
Int
=
0
var
view_count
:
Int
=
0
var
img_url
:
String
=
""
var
img_url
:
String
=
""
var
type
:
Int
=
0
var
type
:
Int
=
0
//文章类型 '文章类型 1视频 2图文 3图片',
var
img_width
:
Int
=
0
var
is_like
:
Bool
=
false
var
img_height
:
Int
=
0
//网络返回的图片宽高
var
img_width
:
CGFloat
=
0
var
img_height
:
CGFloat
=
0
//实际使用的图片宽高
var
img_width_use
:
CGFloat
=
0
var
img_height_use
:
CGFloat
=
0
//cell的宽高
var
img_width_cell
:
CGFloat
=
0
var
img_height_cell
:
CGFloat
=
0
//描述的高度
var
textH
:
CGFloat
=
20.0
func
calHeightParam
()
{
let
text
=
self
.
title
let
width
=
(
KScreenWidth
-
47
)
/
2
let
font
=
UIFont
.
PFSC_R
(
ofSize
:
14
)
// 字体大小
let
maxWidth
=
width
-
16
// 最大宽度限制
// 创建NSAttributedString对象并设置属性
let
attributes
=
[
NSAttributedString
.
Key
.
font
:
font
]
as
[
NSAttributedString
.
Key
:
Any
]
_
=
NSMutableAttributedString
(
string
:
text
,
attributes
:
attributes
)
// 根据指定的最大宽度和字体大小计算文本的高度
let
size
=
(
text
as
NSString
)
.
boundingRect
(
with
:
CGSize
(
width
:
maxWidth
,
height
:
.
greatestFiniteMagnitude
),
options
:
.
usesLineFragmentOrigin
,
attributes
:
attributes
,
context
:
nil
)
.
size
var
textHeight
:
CGFloat
=
size
.
height
if
textHeight
>
40.0
{
textHeight
=
40.0
}
else
if
textHeight
<
16
{
textHeight
=
16
}
self
.
textH
=
textHeight
let
imageSize
=
CGSizeMake
(
CGFloat
(
self
.
img_width
),
CGFloat
(
self
.
img_height
))
var
imageHeight
=
0.0
if
imageSize
.
width
==
0
{
imageHeight
=
width
}
else
{
imageHeight
=
width
*
imageSize
.
height
/
imageSize
.
width
if
imageHeight
>
280
{
imageHeight
=
280
}
}
let
totalHeight
=
imageHeight
+
textHeight
+
30
+
16
self
.
img_width_use
=
width
self
.
img_height_use
=
imageHeight
self
.
img_width_cell
=
width
self
.
img_height_cell
=
totalHeight
}
}
}
galaxy/galaxy/Classes/Modules/Home(首页)/M/YHWebModel.swift
0 → 100644
View file @
57c77d97
//
// YHWebModel.swift
// galaxy
//
// Created by EDY on 2024/4/11.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
class
YHWebModel
:
YHBaseModel
{
var
like_count
:
Int
=
0
var
id
:
Int
=
0
var
is_like
:
Bool
=
false
var
view_count
:
Int
=
0
var
is_collect
:
Bool
=
false
var
collect_count
:
Int
=
0
}
galaxy/galaxy/Classes/Modules/Home(首页)/V/YHHomeWebBottomView.swift
View file @
57c77d97
...
@@ -12,23 +12,26 @@ class YHHomeWebBottomView: UIView {
...
@@ -12,23 +12,26 @@ class YHHomeWebBottomView: UIView {
typealias
Block
=
(
Bool
)
->
()
typealias
Block
=
(
Bool
)
->
()
var
likeBlock
:
Block
?
var
likeBlock
:
Block
?
var
starBlock
:
Block
?
var
starBlock
:
Block
?
private
var
likeButton
:
YHHomeWebBottomButton
!
var
likeButton
:
YHHomeWebBottomButton
!
private
var
starButton
:
YHHomeWebBottomButton
!
var
starButton
:
YHHomeWebBottomButton
!
var
likeCount
:
Int
=
0
var
starCount
:
Int
=
0
var
isStar
:
Bool
=
false
{
var
isStar
:
Bool
=
false
{
didSet
{
didSet
{
if
isStar
{
if
isStar
{
starButton
.
setContent
(
"home_web_stared"
,
"
34
"
)
starButton
.
setContent
(
"home_web_stared"
,
"
\(
starCount
)
"
)
}
else
{
}
else
{
starButton
.
setContent
(
"home_web_star"
,
"
34
"
)
starButton
.
setContent
(
"home_web_star"
,
"
\(
starCount
)
"
)
}
}
}
}
}
//是否收藏
}
//是否收藏
var
isLike
:
Bool
=
false
{
var
isLike
:
Bool
=
false
{
didSet
{
didSet
{
if
isLike
{
if
isLike
{
likeButton
.
setContent
(
"home_web_liked"
,
"
34
"
)
likeButton
.
setContent
(
"home_web_liked"
,
"
\(
likeCount
)
"
)
}
else
{
}
else
{
likeButton
.
setContent
(
"home_web_like"
,
"
34
"
)
likeButton
.
setContent
(
"home_web_like"
,
"
\(
likeCount
)
"
)
}
}
}
}
}
//是否点赞
}
//是否点赞
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/VM/YHHomePageViewModel.swift
View file @
57c77d97
...
@@ -10,22 +10,23 @@ import UIKit
...
@@ -10,22 +10,23 @@ import UIKit
class
YHHomePageViewModel
:
YHBaseViewModel
{
class
YHHomePageViewModel
:
YHBaseViewModel
{
//数据源
//数据源
var
configModel
:
YHHomeCofigMode
?
var
configModel
:
YHConfigModel
?
var
lists
:
[
YHHomeListModel
]?
var
arrHomeNewsData
:
[
YHHomeListModel
?]
=
[]
var
banners
:
[
YHBannerModel
]?
var
banners
:
[
YHBannerModel
]?
var
classify
:
[
YHHomeClassifyModel
]?
var
classify
:
[
YHHomeClassifyModel
]?
}
}
//接口
//接口
extension
YHHomePageViewModel
{
extension
YHHomePageViewModel
{
//请求
首页的
配置
//请求配置
func
getHomeConfig
(
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())
{
func
getHomeConfig
(
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())
{
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
Common
.
homeConfigApi
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
Common
.
homeConfigApi
let
_
=
YHNetRequest
.
getRequest
(
url
:
strUrl
)
{
[
weak
self
]
json
,
code
in
let
_
=
YHNetRequest
.
getRequest
(
url
:
strUrl
)
{
[
weak
self
]
json
,
code
in
//1. json字符串 转 对象
//1. json字符串 转 对象
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
let
dic
=
json
.
data
let
dic
=
json
.
data
guard
let
resultModel
=
YH
HomeCofigMode
.
deserialize
(
dict
:
dic
as?
[
AnyHashable
:
Any
])
else
{
guard
let
resultModel
=
YH
ConfigModel
.
deserialize
(
dict
:
dic
as?
[
AnyHashable
:
Any
])
else
{
callBackBlock
(
false
,
nil
)
callBackBlock
(
false
,
nil
)
return
return
}
}
...
@@ -38,7 +39,7 @@ extension YHHomePageViewModel {
...
@@ -38,7 +39,7 @@ extension YHHomePageViewModel {
}
}
}
}
func
getHomeList
(
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())
{
func
getHome
News
List
(
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())
{
let
params
:
[
String
:
Any
]
=
[
"page"
:
1
,
let
params
:
[
String
:
Any
]
=
[
"page"
:
1
,
"page_size"
:
10
]
"page_size"
:
10
]
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
Common
.
consult
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
Common
.
consult
...
@@ -48,12 +49,18 @@ extension YHHomePageViewModel {
...
@@ -48,12 +49,18 @@ extension YHHomePageViewModel {
if
json
.
code
==
200
{
if
json
.
code
==
200
{
let
dic
=
json
.
data
let
dic
=
json
.
data
guard
let
result
=
[
YHHomeListModel
]
.
deserialize
(
from
:
dic
as?
[
Any
])
else
{
guard
let
result
=
[
YHHomeListModel
]
.
deserialize
(
from
:
dic
as?
[
Any
])
else
{
self
.
arrHomeNewsData
=
[]
callBackBlock
(
false
,
nil
)
callBackBlock
(
false
,
nil
)
return
return
}
}
self
.
lists
=
result
as?
[
YHHomeListModel
]
for
item
in
result
{
item
?
.
calHeightParam
()
}
self
.
arrHomeNewsData
=
result
callBackBlock
(
true
,
nil
)
callBackBlock
(
true
,
nil
)
}
else
{
}
else
{
self
.
arrHomeNewsData
=
[]
let
error
:
YHErrorModel
=
YHErrorModel
(
errorCode
:
Int32
(
json
.
code
),
errorMsg
:
json
.
msg
)
let
error
:
YHErrorModel
=
YHErrorModel
(
errorCode
:
Int32
(
json
.
code
),
errorMsg
:
json
.
msg
)
callBackBlock
(
false
,
error
)
callBackBlock
(
false
,
error
)
}
}
...
@@ -119,11 +126,14 @@ extension YHHomePageViewModel {
...
@@ -119,11 +126,14 @@ extension YHHomePageViewModel {
//1. json字符串 转 对象
//1. json字符串 转 对象
if
json
.
code
==
200
{
if
json
.
code
==
200
{
let
dic
=
json
.
data
let
dic
=
json
.
data
// guard let result = [YHHomeListModel].deserialize(from: dic as? [Any]) else {
guard
let
result
=
[
YHHomeListModel
]
.
deserialize
(
from
:
dic
as?
[
Any
])
else
{
// callBackBlock(false,nil)
callBackBlock
(
false
,
nil
)
// return
return
// }
}
// self.lists = result as? [YHHomeListModel]
for
item
in
result
{
item
?
.
calHeightParam
()
}
self
.
arrHomeNewsData
=
result
callBackBlock
(
true
,
nil
)
callBackBlock
(
true
,
nil
)
}
else
{
}
else
{
let
error
:
YHErrorModel
=
YHErrorModel
(
errorCode
:
Int32
(
json
.
code
),
errorMsg
:
json
.
msg
)
let
error
:
YHErrorModel
=
YHErrorModel
(
errorCode
:
Int32
(
json
.
code
),
errorMsg
:
json
.
msg
)
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/VM/YHHomeWebViewModel.swift
0 → 100644
View file @
57c77d97
//
// YHHomeWebViewModel.swift
// galaxy
//
// Created by EDY on 2024/4/11.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
class
YHHomeWebViewModel
:
YHBaseViewModel
{
//数据源
var
mainModel
:
YHWebModel
?
}
extension
YHHomeWebViewModel
{
//请求web详情
func
getWebDetail
(
_
id
:
Int
,
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())
{
let
params
:
[
String
:
Any
]
=
[
"id"
:
id
]
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
Common
.
webInfo
let
_
=
YHNetRequest
.
getRequest
(
url
:
strUrl
,
params
:
params
)
{
[
weak
self
]
json
,
code
in
//1. json字符串 转 对象
guard
let
self
=
self
else
{
return
}
let
dic
=
json
.
data
guard
let
resultModel
=
YHWebModel
.
deserialize
(
from
:
dic
as?
Dictionary
)
else
{
callBackBlock
(
false
,
nil
)
return
}
self
.
mainModel
=
resultModel
callBackBlock
(
true
,
nil
)
}
failBlock
:
{
err
in
callBackBlock
(
false
,
err
)
}
}
// type:0取消 1收藏
func
getStar
(
_
id
:
Int
,
_
type
:
Int
,
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())
{
let
params
:
[
String
:
Any
]
=
[
"operate_type"
:
type
,
"article_id"
:
id
]
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
Common
.
star
let
_
=
YHNetRequest
.
postRequest
(
url
:
strUrl
,
params
:
params
)
{
[
weak
self
]
json
,
code
in
guard
let
self
=
self
else
{
return
}
//1. json字符串 转 对象
if
json
.
code
==
200
{
let
dic
=
json
.
data
callBackBlock
(
true
,
nil
)
}
else
{
let
error
:
YHErrorModel
=
YHErrorModel
(
errorCode
:
Int32
(
json
.
code
),
errorMsg
:
json
.
msg
)
callBackBlock
(
false
,
error
)
}
}
failBlock
:
{
err
in
callBackBlock
(
false
,
err
)
}
}
// type:0取消 1收藏
func
getLike
(
_
id
:
Int
,
_
type
:
Int
,
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())
{
let
params
:
[
String
:
Any
]
=
[
"operate_type"
:
type
,
"article_id"
:
id
]
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
Common
.
like
let
_
=
YHNetRequest
.
postRequest
(
url
:
strUrl
,
params
:
params
)
{
[
weak
self
]
json
,
code
in
guard
let
self
=
self
else
{
return
}
//1. json字符串 转 对象
if
json
.
code
==
200
{
let
dic
=
json
.
data
callBackBlock
(
true
,
nil
)
}
else
{
let
error
:
YHErrorModel
=
YHErrorModel
(
errorCode
:
Int32
(
json
.
code
),
errorMsg
:
json
.
msg
)
callBackBlock
(
false
,
error
)
}
}
failBlock
:
{
err
in
callBackBlock
(
false
,
err
)
}
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/C/YHServerHKLifeViewController.swift
View file @
57c77d97
...
@@ -10,12 +10,16 @@ import UIKit
...
@@ -10,12 +10,16 @@ import UIKit
import
JXSegmentedView
import
JXSegmentedView
class
YHServerHKLifeViewController
:
YHBaseViewController
{
class
YHServerHKLifeViewController
:
YHBaseViewController
{
let
homeViewModel
:
YHHomePageViewModel
=
YHHomePageViewModel
()
private
let
serviceCenterMainReqVM
:
YHServiceCenterMainViewModel
=
YHServiceCenterMainViewModel
()
var
tableHeadView
:
YHServerTableHeadView
!
var
tableHeadView
:
YHServerTableHeadView
!
var
tableFootView
:
YHServiceTableFootView
!
var
tableFootView
:
YHServiceTableFootView
!
var
sectionView
:
YHServiceSectionView
!
var
sectionView
:
YHServiceSectionView
!
var
dataSouce
:
[
YHHomeListModel
?]
=
[]
{
didSet
{
self
.
homeTableView
.
reloadData
()
}
}
var
homeTableView
:
UITableView
=
{
var
homeTableView
:
UITableView
=
{
let
tableView
=
UITableView
(
frame
:
.
zero
,
style
:
.
plain
)
let
tableView
=
UITableView
(
frame
:
.
zero
,
style
:
.
plain
)
if
#available(iOS 15.0, *)
{
if
#available(iOS 15.0, *)
{
...
@@ -44,15 +48,24 @@ class YHServerHKLifeViewController: YHBaseViewController {
...
@@ -44,15 +48,24 @@ class YHServerHKLifeViewController: YHBaseViewController {
extension
YHServerHKLifeViewController
{
extension
YHServerHKLifeViewController
{
func
loadData
()
{
func
loadData
()
{
if
YHLoginManager
.
shared
.
isLogin
()
==
false
{
return
}
serviceCenterMainReqVM
.
getContactList
{
success
,
error
in
homeViewModel
.
getHomeBanner
(
2
){[
weak
self
]
success
,
error
in
if
success
==
true
{
guard
let
self
=
self
else
{
return
}
self
.
tableHeadView
.
bannarView
.
dataArr
=
self
.
homeViewModel
.
banners
??
[]
}
}
else
{
homeViewModel
.
getHomeClassify
{[
weak
self
]
success
,
error
in
YHHUD
.
flash
(
message
:
error
?
.
errorMsg
??
"请求出错"
)
guard
let
self
=
self
,
let
classify
=
self
.
homeViewModel
.
classify
else
{
return
}
for
item
in
classify
{
let
model
=
item
as
YHHomeClassifyModel
if
model
.
id
==
2
{
self
.
sectionView
.
items
=
model
.
children
let
classifyID
=
model
.
children
.
first
?
.
id
??
0
self
.
homeViewModel
.
getList
(
classifyID
)
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
self
.
dataSouce
=
self
.
homeViewModel
.
arrHomeNewsData
}
}
}
}
}
}
}
}
...
@@ -63,6 +76,13 @@ extension YHServerHKLifeViewController {
...
@@ -63,6 +76,13 @@ extension YHServerHKLifeViewController {
sectionView
=
{
sectionView
=
{
let
view
=
YHServiceSectionView
()
let
view
=
YHServiceSectionView
()
view
.
block
=
{[
weak
self
]
model
in
guard
let
self
=
self
else
{
return
}
self
.
homeViewModel
.
getList
(
model
.
id
)
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
self
.
dataSouce
=
self
.
homeViewModel
.
arrHomeNewsData
}
}
return
view
return
view
}()
}()
...
@@ -116,6 +136,7 @@ extension YHServerHKLifeViewController : UITableViewDelegate,UITableViewDataSour
...
@@ -116,6 +136,7 @@ extension YHServerHKLifeViewController : UITableViewDelegate,UITableViewDataSour
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
let
cell0
=
tableView
.
dequeueReusableCell
(
withClass
:
YHServerHKLifeViewCell
.
self
)
let
cell0
=
tableView
.
dequeueReusableCell
(
withClass
:
YHServerHKLifeViewCell
.
self
)
cell0
.
tableFootView
.
items
=
dataSouce
cell0
.
selectionStyle
=
.
none
cell0
.
selectionStyle
=
.
none
return
cell0
return
cell0
}
}
...
@@ -135,12 +156,6 @@ class YHServerHKLifeViewCell: UITableViewCell {
...
@@ -135,12 +156,6 @@ class YHServerHKLifeViewCell: UITableViewCell {
static
let
cellReuseIdentifier
=
"YHServerHKLifeViewCell"
static
let
cellReuseIdentifier
=
"YHServerHKLifeViewCell"
var
tableFootView
:
YHServiceTableFootView
!
var
tableFootView
:
YHServiceTableFootView
!
var
dataModel
:
YHContactItemModel
?
{
didSet
{
updateUI
()
}
}
override
func
awakeFromNib
()
{
override
func
awakeFromNib
()
{
super
.
awakeFromNib
()
super
.
awakeFromNib
()
// Initialization code
// Initialization code
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/C/YHServiceListViewController.swift
View file @
57c77d97
...
@@ -47,7 +47,7 @@ extension YHServiceListViewController {
...
@@ -47,7 +47,7 @@ extension YHServiceListViewController {
let
classifyID
=
model
.
children
.
first
?
.
id
??
0
let
classifyID
=
model
.
children
.
first
?
.
id
??
0
self
.
homeViewModel
.
getList
(
classifyID
)
{[
weak
self
]
success
,
error
in
self
.
homeViewModel
.
getList
(
classifyID
)
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
self
.
normalView
.
dataSouce
=
self
.
homeViewModel
.
arrHomeNewsData
}
}
}
}
}
}
...
@@ -85,6 +85,13 @@ extension YHServiceListViewController {
...
@@ -85,6 +85,13 @@ extension YHServiceListViewController {
normalView
=
{
normalView
=
{
let
view
=
YHServerNoOrderView
()
let
view
=
YHServerNoOrderView
()
view
.
sectionBlock
=
{[
weak
self
]
model
in
guard
let
self
=
self
else
{
return
}
self
.
homeViewModel
.
getList
(
model
.
id
)
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
self
.
normalView
.
dataSouce
=
self
.
homeViewModel
.
arrHomeNewsData
}
}
return
view
return
view
}()
}()
view
.
addSubview
(
normalView
)
view
.
addSubview
(
normalView
)
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyDocuments(我的文书)/C/YHMyDocumentsDetailViewController.swift
View file @
57c77d97
...
@@ -56,6 +56,10 @@ class YHMyDocumentsDetailViewController: YHBaseViewController {
...
@@ -56,6 +56,10 @@ class YHMyDocumentsDetailViewController: YHBaseViewController {
override
func
viewWillAppear
(
_
animated
:
Bool
)
{
override
func
viewWillAppear
(
_
animated
:
Bool
)
{
super
.
viewWillAppear
(
animated
)
super
.
viewWillAppear
(
animated
)
viewModel
.
requestSignBack
(
"
\(
self
.
viewModel
.
mainModel
?
.
writing_document
.
doc_sign
.
id
??
0
)
"
)
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
self
.
getData
()
}
getData
()
getData
()
}
}
...
@@ -71,7 +75,7 @@ class YHMyDocumentsDetailViewController: YHBaseViewController {
...
@@ -71,7 +75,7 @@ class YHMyDocumentsDetailViewController: YHBaseViewController {
}
}
self
.
bottomView
.
isHidden
=
true
self
.
bottomView
.
isHidden
=
true
}
}
if
self
.
viewModel
.
mainModel
?
.
writing_document
.
doc_sign
.
supplement_id
==
0
{
if
self
.
viewModel
.
mainModel
?
.
writing_document
.
status
??
0
<
6
{
//没有doc_sign
//没有doc_sign
self
.
stepView
.
currentIndex
=
0
self
.
stepView
.
currentIndex
=
0
self
.
bottomView
.
isHidden
=
true
self
.
bottomView
.
isHidden
=
true
...
@@ -143,7 +147,7 @@ class YHMyDocumentsDetailViewController: YHBaseViewController {
...
@@ -143,7 +147,7 @@ class YHMyDocumentsDetailViewController: YHBaseViewController {
}
}
func
getPromptHeight
(
_
value
:
String
)
->
CGFloat
{
func
getPromptHeight
(
_
value
:
String
)
->
CGFloat
{
let
text
=
value
// 要显示的文本内容
let
text
=
"驳回原因:"
+
value
// 要显示的文本内容
let
font
=
UIFont
.
PFSC_R
(
ofSize
:
12
)
// 字体大小
let
font
=
UIFont
.
PFSC_R
(
ofSize
:
12
)
// 字体大小
let
maxWidth
=
KScreenWidth
-
74
// 最大宽度限制
let
maxWidth
=
KScreenWidth
-
74
// 最大宽度限制
...
@@ -212,6 +216,7 @@ class YHMyDocumentsDetailViewController: YHBaseViewController {
...
@@ -212,6 +216,7 @@ class YHMyDocumentsDetailViewController: YHBaseViewController {
bottomView
=
{
bottomView
=
{
let
bottom
=
UIView
()
let
bottom
=
UIView
()
bottom
.
backgroundColor
=
.
white
bottom
.
backgroundColor
=
.
white
bottom
.
isHidden
=
true
return
bottom
return
bottom
}()
}()
view
.
addSubview
(
bottomView
)
view
.
addSubview
(
bottomView
)
...
@@ -308,7 +313,8 @@ class YHMyDocumentsDetailViewController: YHBaseViewController {
...
@@ -308,7 +313,8 @@ class YHMyDocumentsDetailViewController: YHBaseViewController {
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
if
success
{
if
success
{
YHHUD
.
flash
(
message
:
"提交成功"
)
YHHUD
.
flash
(
message
:
"提交成功"
)
self
.
navigationController
?
.
popViewController
()
self
.
getData
()
// self.navigationController?.popViewController()
}
}
}
}
}
}
...
@@ -749,6 +755,10 @@ extension YHMyDocumentsDetailViewController: SFSafariViewControllerDelegate {
...
@@ -749,6 +755,10 @@ extension YHMyDocumentsDetailViewController: SFSafariViewControllerDelegate {
// MARK: 点击左上角的完成
// MARK: 点击左上角的完成
func
safariViewControllerDidFinish
(
_
controller
:
SFSafariViewController
)
{
func
safariViewControllerDidFinish
(
_
controller
:
SFSafariViewController
)
{
controller
.
navigationController
?
.
popViewController
()
controller
.
navigationController
?
.
popViewController
()
viewModel
.
requestSignBack
(
"
\(
self
.
viewModel
.
mainModel
?
.
writing_document
.
doc_sign
.
id
??
0
)
"
)
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
self
.
getData
()
}
}
}
// MARK: 加载完成
// MARK: 加载完成
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyDocuments(我的文书)/C/YHMyDocumentsListViewController.swift
View file @
57c77d97
...
@@ -345,12 +345,6 @@ extension YHMyDocumentsListViewController: UITableViewDelegate, UITableViewDataS
...
@@ -345,12 +345,6 @@ extension YHMyDocumentsListViewController: UITableViewDelegate, UITableViewDataS
model
.
isSelectedFlag
=
!
model
.
isSelectedFlag
model
.
isSelectedFlag
=
!
model
.
isSelectedFlag
tableView
.
reloadRows
(
at
:
[
indexPath
],
with
:
UITableView
.
RowAnimation
.
none
)
tableView
.
reloadRows
(
at
:
[
indexPath
],
with
:
UITableView
.
RowAnimation
.
none
)
updateBottomViewNumbers
()
updateBottomViewNumbers
()
}
else
{
if
model
.
document
.
status
==
6
&&
model
.
sign_doc
.
id
>
0
&&
model
.
sign_doc
.
status
>
2
{
//签字状态
let
vc
=
YHMySignatureDetailViewController
()
vc
.
id
=
model
.
sign_doc
.
id
self
.
navigationController
?
.
pushViewController
(
vc
)
}
else
{
}
else
{
//文书状态
//文书状态
if
model
.
template_id
==
195
{
if
model
.
template_id
==
195
{
...
@@ -366,7 +360,6 @@ extension YHMyDocumentsListViewController: UITableViewDelegate, UITableViewDataS
...
@@ -366,7 +360,6 @@ extension YHMyDocumentsListViewController: UITableViewDelegate, UITableViewDataS
}
}
}
}
}
}
}
}
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyDocuments(我的文书)/V/YHDocumentToActionTableViewCell.swift
View file @
57c77d97
...
@@ -106,33 +106,7 @@ class YHDocumentToActionTableViewCell: UITableViewCell {
...
@@ -106,33 +106,7 @@ class YHDocumentToActionTableViewCell: UITableViewCell {
bottomView
.
snp
.
makeConstraints
{
make
in
bottomView
.
snp
.
makeConstraints
{
make
in
make
.
right
.
left
.
equalToSuperview
()
make
.
right
.
left
.
equalToSuperview
()
make
.
height
.
equalTo
(
1
)
make
.
height
.
equalTo
(
1
)
make
.
top
.
equalTo
(
123
)
make
.
top
.
equalTo
(
115
)
}
bottomLeftLineView
=
{
let
view
=
UIView
()
view
.
backgroundColor
=
UIColor
.
separatorColor
return
view
}()
centerView
.
addSubview
(
bottomLeftLineView
)
bottomLeftLineView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
width
)
make
.
width
.
equalTo
(
1
)
make
.
bottom
.
equalTo
(
-
17.5
)
make
.
height
.
equalTo
(
16
)
}
bottomRightLineView
=
{
let
view
=
UIView
()
view
.
backgroundColor
=
UIColor
.
separatorColor
return
view
}()
centerView
.
addSubview
(
bottomRightLineView
)
bottomRightLineView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
width
*
2
)
make
.
width
.
equalTo
(
1
)
make
.
bottom
.
equalTo
(
-
17.5
)
make
.
height
.
equalTo
(
16
)
}
}
editButton
=
{
editButton
=
{
...
@@ -208,6 +182,32 @@ class YHDocumentToActionTableViewCell: UITableViewCell {
...
@@ -208,6 +182,32 @@ class YHDocumentToActionTableViewCell: UITableViewCell {
make
.
height
.
equalTo
(
40
)
make
.
height
.
equalTo
(
40
)
make
.
centerY
.
equalToSuperview
()
make
.
centerY
.
equalToSuperview
()
}
}
bottomLeftLineView
=
{
let
view
=
UIView
()
view
.
backgroundColor
=
UIColor
.
separatorColor
return
view
}()
centerView
.
addSubview
(
bottomLeftLineView
)
bottomLeftLineView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
width
)
make
.
width
.
equalTo
(
1
)
make
.
centerY
.
equalTo
(
editButton
.
snp
.
centerY
)
make
.
height
.
equalTo
(
16
)
}
bottomRightLineView
=
{
let
view
=
UIView
()
view
.
backgroundColor
=
UIColor
.
separatorColor
return
view
}()
centerView
.
addSubview
(
bottomRightLineView
)
bottomRightLineView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
width
*
2
)
make
.
width
.
equalTo
(
1
)
make
.
centerY
.
equalTo
(
editButton
.
snp
.
centerY
)
make
.
height
.
equalTo
(
16
)
}
}
}
func
updateAllViews
()
{
func
updateAllViews
()
{
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyDocuments(我的文书)/V/YHDocumentUploadTableViewCell.swift
View file @
57c77d97
...
@@ -129,6 +129,16 @@ class YHDocumentUploadTableViewCell: UITableViewCell {
...
@@ -129,6 +129,16 @@ class YHDocumentUploadTableViewCell: UITableViewCell {
make
.
bottom
.
equalTo
(
-
153
)
make
.
bottom
.
equalTo
(
-
153
)
make
.
top
.
equalTo
(
52
)
make
.
top
.
equalTo
(
52
)
}
}
let
line
=
UIView
()
line
.
backgroundColor
=
UIColor
.
separatorColor
centerView
.
addSubview
(
line
)
line
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
18
)
make
.
top
.
equalTo
(
52
)
make
.
height
.
equalTo
(
1
)
make
.
right
.
equalTo
(
-
18
)
}
}
}
func
updateAllViews
()
{
func
updateAllViews
()
{
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyDocuments(我的文书)/ViewModel/YHMyDocumentsDetailViewModel.swift
View file @
57c77d97
...
@@ -297,6 +297,25 @@ class YHMyDocumentsDetailViewModel: YHBaseViewModel {
...
@@ -297,6 +297,25 @@ class YHMyDocumentsDetailViewModel: YHBaseViewModel {
callBackBlock
(
false
,
err
)
callBackBlock
(
false
,
err
)
}
}
}
}
func
requestSignBack
(
_
id
:
String
,
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())
{
// let params: [String : Any] = ["order_id": orderId]
let
params
:
[
String
:
Any
]
=
[
"id"
:
id
]
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
Signature
.
signCallBack
let
_
=
YHNetRequest
.
postRequest
(
url
:
strUrl
,
params
:
params
)
{
[
weak
self
]
json
,
code
in
//1. json字符串 转 对象
guard
let
self
=
self
else
{
return
}
if
json
.
code
==
200
{
let
dic
=
json
.
data
callBackBlock
(
true
,
nil
)
}
else
{
let
error
:
YHErrorModel
=
YHErrorModel
(
errorCode
:
Int32
(
json
.
code
),
errorMsg
:
json
.
msg
)
callBackBlock
(
false
,
error
)
}
}
failBlock
:
{
err
in
callBackBlock
(
false
,
err
)
}
}
}
}
private
extension
YHMyDocumentsDetailViewModel
{
private
extension
YHMyDocumentsDetailViewModel
{
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MySignature(我的签字)/C/YHMySignatureDetailViewController.swift
View file @
57c77d97
...
@@ -53,6 +53,10 @@ class YHMySignatureDetailViewController: YHBaseViewController {
...
@@ -53,6 +53,10 @@ class YHMySignatureDetailViewController: YHBaseViewController {
override
func
viewWillAppear
(
_
animated
:
Bool
)
{
override
func
viewWillAppear
(
_
animated
:
Bool
)
{
super
.
viewWillAppear
(
animated
)
super
.
viewWillAppear
(
animated
)
viewModel
.
requestSignBack
(
"
\(
id
)
"
)
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
self
.
getData
()
}
getData
()
getData
()
}
}
...
@@ -116,7 +120,7 @@ class YHMySignatureDetailViewController: YHBaseViewController {
...
@@ -116,7 +120,7 @@ class YHMySignatureDetailViewController: YHBaseViewController {
}
}
func
getPromptHeight
(
_
value
:
String
)
->
CGFloat
{
func
getPromptHeight
(
_
value
:
String
)
->
CGFloat
{
let
text
=
value
// 要显示的文本内容
let
text
=
"驳回原因:"
+
value
// 要显示的文本内容
let
font
=
UIFont
.
PFSC_R
(
ofSize
:
12
)
// 字体大小
let
font
=
UIFont
.
PFSC_R
(
ofSize
:
12
)
// 字体大小
let
maxWidth
=
KScreenWidth
-
74
// 最大宽度限制
let
maxWidth
=
KScreenWidth
-
74
// 最大宽度限制
...
@@ -173,6 +177,7 @@ class YHMySignatureDetailViewController: YHBaseViewController {
...
@@ -173,6 +177,7 @@ class YHMySignatureDetailViewController: YHBaseViewController {
bottomView
=
{
bottomView
=
{
let
bottom
=
UIView
()
let
bottom
=
UIView
()
bottom
.
backgroundColor
=
.
white
bottom
.
backgroundColor
=
.
white
bottom
.
isHidden
=
true
return
bottom
return
bottom
}()
}()
view
.
addSubview
(
bottomView
)
view
.
addSubview
(
bottomView
)
...
@@ -643,6 +648,10 @@ extension YHMySignatureDetailViewController: SFSafariViewControllerDelegate {
...
@@ -643,6 +648,10 @@ extension YHMySignatureDetailViewController: SFSafariViewControllerDelegate {
// MARK: 点击左上角的完成
// MARK: 点击左上角的完成
func
safariViewControllerDidFinish
(
_
controller
:
SFSafariViewController
)
{
func
safariViewControllerDidFinish
(
_
controller
:
SFSafariViewController
)
{
controller
.
navigationController
?
.
popViewController
()
controller
.
navigationController
?
.
popViewController
()
viewModel
.
requestSignBack
(
"
\(
id
)
"
)
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
self
.
getData
()
}
}
}
// MARK: 加载完成
// MARK: 加载完成
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MySignature(我的签字)/V/YHMyFileMethodTableViewCell.swift
View file @
57c77d97
...
@@ -118,33 +118,7 @@ class YHSignatureToActionTableViewCell: UITableViewCell {
...
@@ -118,33 +118,7 @@ class YHSignatureToActionTableViewCell: UITableViewCell {
bottomView
.
snp
.
makeConstraints
{
make
in
bottomView
.
snp
.
makeConstraints
{
make
in
make
.
right
.
left
.
equalToSuperview
()
make
.
right
.
left
.
equalToSuperview
()
make
.
height
.
equalTo
(
1
)
make
.
height
.
equalTo
(
1
)
make
.
top
.
equalTo
(
123
)
make
.
top
.
equalTo
(
115
)
}
bottomLeftLineView
=
{
let
view
=
UIView
()
view
.
backgroundColor
=
UIColor
.
separatorColor
return
view
}()
centerView
.
addSubview
(
bottomLeftLineView
)
bottomLeftLineView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
width
)
make
.
width
.
equalTo
(
1
)
make
.
bottom
.
equalTo
(
-
17.5
)
make
.
height
.
equalTo
(
16
)
}
bottomRightLineView
=
{
let
view
=
UIView
()
view
.
backgroundColor
=
UIColor
.
separatorColor
return
view
}()
centerView
.
addSubview
(
bottomRightLineView
)
bottomRightLineView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
width
*
2
)
make
.
width
.
equalTo
(
1
)
make
.
bottom
.
equalTo
(
-
17.5
)
make
.
height
.
equalTo
(
16
)
}
}
editButton
=
{
editButton
=
{
...
@@ -220,6 +194,32 @@ class YHSignatureToActionTableViewCell: UITableViewCell {
...
@@ -220,6 +194,32 @@ class YHSignatureToActionTableViewCell: UITableViewCell {
make
.
height
.
equalTo
(
40
)
make
.
height
.
equalTo
(
40
)
make
.
centerY
.
equalToSuperview
()
make
.
centerY
.
equalToSuperview
()
}
}
bottomLeftLineView
=
{
let
view
=
UIView
()
view
.
backgroundColor
=
UIColor
.
separatorColor
return
view
}()
centerView
.
addSubview
(
bottomLeftLineView
)
bottomLeftLineView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
width
)
make
.
width
.
equalTo
(
1
)
make
.
centerY
.
equalTo
(
editButton
.
snp
.
centerY
)
make
.
height
.
equalTo
(
16
)
}
bottomRightLineView
=
{
let
view
=
UIView
()
view
.
backgroundColor
=
UIColor
.
separatorColor
return
view
}()
centerView
.
addSubview
(
bottomRightLineView
)
bottomRightLineView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
width
*
2
)
make
.
width
.
equalTo
(
1
)
make
.
centerY
.
equalTo
(
editButton
.
snp
.
centerY
)
make
.
height
.
equalTo
(
16
)
}
}
}
func
updateAllViews
()
{
func
updateAllViews
()
{
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MySignature(我的签字)/V/YHSignatureUploadTableViewCell.swift
View file @
57c77d97
...
@@ -129,6 +129,16 @@ class YHSignatureUploadTableViewCell: UITableViewCell {
...
@@ -129,6 +129,16 @@ class YHSignatureUploadTableViewCell: UITableViewCell {
make
.
bottom
.
equalTo
(
-
153
)
make
.
bottom
.
equalTo
(
-
153
)
make
.
top
.
equalTo
(
52
)
make
.
top
.
equalTo
(
52
)
}
}
let
line
=
UIView
()
line
.
backgroundColor
=
UIColor
.
separatorColor
centerView
.
addSubview
(
line
)
line
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
18
)
make
.
top
.
equalTo
(
52
)
make
.
height
.
equalTo
(
1
)
make
.
right
.
equalTo
(
-
18
)
}
}
}
func
updateAllViews
()
{
func
updateAllViews
()
{
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MySignature(我的签字)/VM/YHMySignatureDetailViewModel.swift
View file @
57c77d97
...
@@ -210,4 +210,23 @@ class YHMySignatureDetailViewModel: YHBaseViewModel {
...
@@ -210,4 +210,23 @@ class YHMySignatureDetailViewModel: YHBaseViewModel {
callBackBlock
(
false
,
err
)
callBackBlock
(
false
,
err
)
}
}
}
}
func
requestSignBack
(
_
id
:
String
,
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())
{
// let params: [String : Any] = ["order_id": orderId]
let
params
:
[
String
:
Any
]
=
[
"id"
:
id
]
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
Signature
.
signCallBack
let
_
=
YHNetRequest
.
postRequest
(
url
:
strUrl
,
params
:
params
)
{
[
weak
self
]
json
,
code
in
//1. json字符串 转 对象
guard
let
self
=
self
else
{
return
}
if
json
.
code
==
200
{
let
dic
=
json
.
data
callBackBlock
(
true
,
nil
)
}
else
{
let
error
:
YHErrorModel
=
YHErrorModel
(
errorCode
:
Int32
(
json
.
code
),
errorMsg
:
json
.
msg
)
callBackBlock
(
false
,
error
)
}
}
failBlock
:
{
err
in
callBackBlock
(
false
,
err
)
}
}
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/V/YHHomeCollectionViewCell.swift
View file @
57c77d97
...
@@ -12,12 +12,6 @@ import Kingfisher
...
@@ -12,12 +12,6 @@ import Kingfisher
class
YHHomeCollectionViewCell
:
UICollectionViewCell
{
class
YHHomeCollectionViewCell
:
UICollectionViewCell
{
static
let
cellReuseIdentifier
=
"YHHomeCollectionViewCell"
static
let
cellReuseIdentifier
=
"YHHomeCollectionViewCell"
var
dataSource
:
AboutAdvantageItem
?
{
didSet
{
updataAllSubViews
()
}
}
var
listModel
:
YHHomeListModel
?
{
var
listModel
:
YHHomeListModel
?
{
didSet
{
didSet
{
updataSubViews
()
updataSubViews
()
...
@@ -27,8 +21,6 @@ class YHHomeCollectionViewCell: UICollectionViewCell {
...
@@ -27,8 +21,6 @@ class YHHomeCollectionViewCell: UICollectionViewCell {
lazy
var
titleImageView
:
UIImageView
=
{
lazy
var
titleImageView
:
UIImageView
=
{
let
imageV
=
UIImageView
(
image
:
UIImage
(
named
:
"home_title_image"
))
let
imageV
=
UIImageView
(
image
:
UIImage
(
named
:
"home_title_image"
))
imageV
.
contentMode
=
.
scaleAspectFill
imageV
.
contentMode
=
.
scaleAspectFill
imageV
.
roundCorners
(
UIRectCorner
.
topLeft
,
radius
:
8
)
imageV
.
roundCorners
(
UIRectCorner
.
topRight
,
radius
:
8
)
return
imageV
return
imageV
}()
}()
...
@@ -37,49 +29,30 @@ class YHHomeCollectionViewCell: UICollectionViewCell {
...
@@ -37,49 +29,30 @@ class YHHomeCollectionViewCell: UICollectionViewCell {
let
label
=
UILabel
()
let
label
=
UILabel
()
label
.
text
=
"赴港攻略,当日往返无忧,这个季节风景..赴港攻略,当日往返无忧,这个季节风景"
label
.
text
=
"赴港攻略,当日往返无忧,这个季节风景..赴港攻略,当日往返无忧,这个季节风景"
label
.
textColor
=
UIColor
(
hexString
:
"#333333"
)
label
.
textColor
=
UIColor
(
hexString
:
"#333333"
)
label
.
font
=
UIFont
.
systemFont
(
ofSize
:
10
)
label
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
14
)
label
.
numberOfLines
=
2
label
.
numberOfLines
=
2
label
.
lineBreakMode
=
.
by
TruncatingTail
label
.
lineBreakMode
=
.
by
WordWrapping
return
label
return
label
}()
}()
lazy
var
headImageView
:
UIImageView
=
{
lazy
var
headImageView
:
UIImageView
=
{
let
imageV
=
UIImageView
(
image
:
UIImage
(
named
:
"
home_person_icon
"
))
let
imageV
=
UIImageView
(
image
:
UIImage
(
named
:
""
))
imageV
.
contentMode
=
.
scaleAspectFill
imageV
.
contentMode
=
.
scaleAspectFill
return
imageV
return
imageV
}()
}()
lazy
var
nameLable
:
UILabel
=
{
let
label
=
UILabel
()
label
.
text
=
"Fiona"
label
.
textColor
=
UIColor
(
hexString
:
"#333333"
)
label
.
font
=
UIFont
.
systemFont
(
ofSize
:
10
)
return
label
}()
lazy
var
dateLable
:
UILabel
=
{
let
label
=
UILabel
()
label
.
text
=
"12-12"
label
.
textColor
=
UIColor
(
hexString
:
"#333333"
)
label
.
font
=
UIFont
.
systemFont
(
ofSize
:
10
)
return
label
}()
lazy
var
heartImageView
:
UIImageView
=
{
lazy
var
heartImageView
:
UIImageView
=
{
let
imageV
=
UIImageView
(
image
:
UIImage
(
named
:
"home_
red
_heart"
))
let
imageV
=
UIImageView
(
image
:
UIImage
(
named
:
"home_
grey
_heart"
))
imageV
.
contentMode
=
.
scaleAspectFill
imageV
.
contentMode
=
.
scaleAspectFill
return
imageV
return
imageV
}()
}()
lazy
var
numLable
:
UILabel
=
{
lazy
var
numLable
:
UILabel
=
{
let
label
=
UILabel
()
let
label
=
UILabel
()
label
.
text
=
"
2000
"
label
.
text
=
""
label
.
textColor
=
UIColor
(
hex
String
:
"#333333"
)
label
.
textColor
=
UIColor
(
hex
:
0x121A264D
,
alpha
:
0.3
)
label
.
font
=
UIFont
.
systemFont
(
ofSize
:
14
)
label
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
12
)
return
label
return
label
}()
}()
...
@@ -93,21 +66,18 @@ class YHHomeCollectionViewCell: UICollectionViewCell {
...
@@ -93,21 +66,18 @@ class YHHomeCollectionViewCell: UICollectionViewCell {
}
}
private
func
setupUI
()
{
private
func
setupUI
()
{
contentView
.
backgroundColor
=
UIColor
(
hexString
:
"#F8F9FB"
)
contentView
.
roundCorners
([
.
topLeft
,
.
topRight
],
radius
:
4
)
contentView
.
clipsToBounds
=
true
contentView
.
clipsToBounds
=
true
contentView
.
addSubview
(
titleImageView
)
contentView
.
addSubview
(
titleImageView
)
titleImageView
.
snp
.
makeConstraints
{
make
in
titleImageView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
top
.
equalToSuperview
()
make
.
left
.
right
.
top
.
equalToSuperview
()
make
.
height
.
equalTo
(
210
)
make
.
height
.
equalTo
(
210
)
}
}
let
subHoldView
=
UIView
()
let
subHoldView
=
UIView
()
subHoldView
.
layer
.
backgroundColor
=
UIColor
(
red
:
1
,
green
:
1
,
blue
:
1
,
alpha
:
1
)
.
cgColor
subHoldView
.
layer
.
backgroundColor
=
UIColor
.
white
.
cgColor
subHoldView
.
layer
.
borderWidth
=
0.
5
subHoldView
.
layer
.
borderWidth
=
0.
6
subHoldView
.
layer
.
borderColor
=
UIColor
(
red
:
0.
798
,
green
:
0.798
,
blue
:
0.798
,
alpha
:
1
)
.
cgColor
subHoldView
.
layer
.
borderColor
=
UIColor
(
red
:
0.
943
,
green
:
0.952
,
blue
:
0.969
,
alpha
:
1
)
.
cgColor
contentView
.
addSubview
(
subHoldView
)
contentView
.
addSubview
(
subHoldView
)
subHoldView
.
snp
.
makeConstraints
{
make
in
subHoldView
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
titleImageView
.
snp
.
bottom
)
make
.
top
.
equalTo
(
titleImageView
.
snp
.
bottom
)
...
@@ -119,87 +89,47 @@ class YHHomeCollectionViewCell: UICollectionViewCell {
...
@@ -119,87 +89,47 @@ class YHHomeCollectionViewCell: UICollectionViewCell {
make
.
top
.
equalToSuperview
()
.
offset
(
10
)
make
.
top
.
equalToSuperview
()
.
offset
(
10
)
make
.
left
.
equalToSuperview
()
.
offset
(
8
)
make
.
left
.
equalToSuperview
()
.
offset
(
8
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
8
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
8
)
make
.
bottom
.
equalTo
(
-
36
)
}
}
subHoldView
.
addSubview
(
numLable
)
subHoldView
.
addSubview
(
numLable
)
numLable
.
snp
.
makeConstraints
{
make
in
numLable
.
snp
.
makeConstraints
{
make
in
make
.
right
.
equalToSuperview
()
.
offset
(
-
8
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
8
)
make
.
height
.
equalTo
(
12
)
make
.
top
.
equalTo
(
descripeLable
.
snp
.
bottom
)
.
offset
(
10
)
make
.
bottom
.
equalTo
(
-
10
)
make
.
height
.
equalTo
(
16
)
}
}
subHoldView
.
addSubview
(
heartImageView
)
subHoldView
.
addSubview
(
heartImageView
)
heartImageView
.
snp
.
makeConstraints
{
make
in
heartImageView
.
snp
.
makeConstraints
{
make
in
make
.
right
.
equalTo
(
numLable
.
snp
.
left
)
.
offset
(
-
6
)
make
.
right
.
equalTo
(
numLable
.
snp
.
left
)
.
offset
(
-
2
)
make
.
height
.
width
.
equalTo
(
1
2
)
make
.
height
.
width
.
equalTo
(
1
6
)
make
.
bottom
.
equalTo
(
-
10
)
make
.
centerY
.
equalTo
(
numLable
)
}
}
}
func
updataAllSubViews
()
{
guard
let
dataSource
=
dataSource
else
{
return
}
let
imageSize
=
getImageSize
(
dataSource
.
url
)
var
imageHeight
=
0.0
if
imageSize
.
width
==
0
{
imageHeight
=
width
}
else
{
imageHeight
=
width
*
imageSize
.
height
/
imageSize
.
width
if
imageHeight
>
280
{
imageHeight
=
280
}
}
titleImageView
.
snp
.
remakeConstraints
{
make
in
make
.
left
.
right
.
top
.
equalToSuperview
()
make
.
height
.
equalTo
(
imageHeight
)
}
if
let
url
=
URL
(
string
:
dataSource
.
url
)
{
titleImageView
.
kf
.
setImage
(
with
:
url
)
}
descripeLable
.
text
=
dataSource
.
title
}
}
func
updataSubViews
()
{
func
updataSubViews
()
{
guard
let
listModel
=
listModel
else
{
return
}
guard
let
listModel
=
listModel
else
{
return
}
let
imageSize
=
getImageSize
(
listModel
.
img_url
)
var
imageHeight
=
0.0
if
imageSize
.
width
==
0
{
imageHeight
=
width
}
else
{
imageHeight
=
width
*
imageSize
.
height
/
imageSize
.
width
if
imageHeight
>
280
{
imageHeight
=
280
}
}
titleImageView
.
snp
.
remakeConstraints
{
make
in
titleImageView
.
snp
.
remakeConstraints
{
make
in
make
.
left
.
right
.
top
.
equalToSuperview
()
make
.
left
.
right
.
top
.
equalToSuperview
()
make
.
height
.
equalTo
(
imageHeight
)
make
.
height
.
equalTo
(
listModel
.
img_height_use
)
}
}
if
let
url
=
URL
(
string
:
listModel
.
img_url
)
{
if
let
url
=
URL
(
string
:
listModel
.
img_url
)
{
titleImageView
.
kf
.
setImage
(
with
:
url
)
titleImageView
.
kf
.
setImage
(
with
:
url
)
}
}
descripeLable
.
text
=
listModel
.
title
descripeLable
.
text
=
listModel
.
title
.
defaultStringIfEmpty
(
detaultValue
:
"***"
)
descripeLable
.
snp
.
removeConstraints
()
descripeLable
.
snp
.
remakeConstraints
{
make
in
make
.
top
.
equalToSuperview
()
.
offset
(
10
)
make
.
left
.
equalToSuperview
()
.
offset
(
8
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
8
)
make
.
height
.
equalTo
(
listModel
.
textH
)
make
.
bottom
.
equalTo
(
-
36
)
}
}
numLable
.
text
=
listModel
.
collect_count
.
string
if
listModel
.
is_like
{
func
getImageSize
(
_
url
:
String
?)
->
CGSize
{
headImageView
.
image
=
UIImage
(
named
:
"home_red_heart"
)
// guard let urlStr = url, urlStr.count != 0 else {
}
else
{
// return CGSize.zero
headImageView
.
image
=
UIImage
(
named
:
"home_grey_heart"
)
// }
}
// let tempUrl = URL(string: urlStr)
// let imageSourceRef = CGImageSourceCreateWithURL(tempUrl! as CFURL, nil)
// var width: CGFloat = 0
// var height: CGFloat = 0
// if let imageSRef = imageSourceRef {
// let imageProperties = CGImageSourceCopyPropertiesAtIndex(imageSRef, 0, nil)
// if let imageP = imageProperties {
// let imageDict = imageP as Dictionary
// width = imageDict[kCGImagePropertyPixelWidth] as! CGFloat
// height = imageDict[kCGImagePropertyPixelHeight] as! CGFloat
// }
// }
return
CGSize
(
width
:
200
,
height
:
250
)
}
}
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/V/YHServerNoOrderView.swift
View file @
57c77d97
...
@@ -9,10 +9,16 @@
...
@@ -9,10 +9,16 @@
import
UIKit
import
UIKit
class
YHServerNoOrderView
:
UIView
{
class
YHServerNoOrderView
:
UIView
{
typealias
SectionBlock
=
(
YHClassifyModel
)
->
()
var
sectionBlock
:
SectionBlock
?
var
tableHeadView
:
YHServerTableHeadView
!
var
tableHeadView
:
YHServerTableHeadView
!
var
tableFootView
:
YHServiceTableFootView
!
var
sectionView
:
YHServiceSectionView
!
var
sectionView
:
YHServiceSectionView
!
var
dataSouce
:
[
YHHomeListModel
?]
=
[]
{
didSet
{
self
.
homeTableView
.
reloadData
()
}
}
var
homeTableView
:
UITableView
=
{
var
homeTableView
:
UITableView
=
{
let
tableView
=
UITableView
(
frame
:
.
zero
,
style
:
.
plain
)
let
tableView
=
UITableView
(
frame
:
.
zero
,
style
:
.
plain
)
if
#available(iOS 15.0, *)
{
if
#available(iOS 15.0, *)
{
...
@@ -41,16 +47,19 @@ class YHServerNoOrderView: UIView {
...
@@ -41,16 +47,19 @@ class YHServerNoOrderView: UIView {
sectionView
=
{
sectionView
=
{
let
view
=
YHServiceSectionView
()
let
view
=
YHServiceSectionView
()
view
.
block
=
{[
weak
self
]
model
in
guard
let
self
=
self
else
{
return
}
if
let
block
=
sectionBlock
{
block
(
model
)
}
}
return
view
return
view
}()
}()
tableHeadView
=
YHServerTableHeadView
()
tableHeadView
=
YHServerTableHeadView
()
tableHeadView
.
frame
=
CGRect
(
x
:
0
,
y
:
0
,
width
:
KScreenWidth
,
height
:
365
)
tableHeadView
.
frame
=
CGRect
(
x
:
0
,
y
:
0
,
width
:
KScreenWidth
,
height
:
365
)
// tableFootView = YHServiceTableFootView()
// tableFootView.frame = CGRect(x: 0, y: 0, width: KScreenWidth, height: KScreenHeight)
addSubview
(
homeTableView
)
addSubview
(
homeTableView
)
homeTableView
.
tableHeaderView
=
tableHeadView
homeTableView
.
tableHeaderView
=
tableHeadView
homeTableView
.
tableFooterView
=
tableFootView
homeTableView
.
snp
.
makeConstraints
{
make
in
homeTableView
.
snp
.
makeConstraints
{
make
in
make
.
top
.
left
.
right
.
equalToSuperview
()
make
.
top
.
left
.
right
.
equalToSuperview
()
make
.
bottom
.
equalToSuperview
()
make
.
bottom
.
equalToSuperview
()
...
@@ -94,6 +103,7 @@ extension YHServerNoOrderView : UITableViewDelegate,UITableViewDataSource {
...
@@ -94,6 +103,7 @@ extension YHServerNoOrderView : UITableViewDelegate,UITableViewDataSource {
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
let
cell0
=
tableView
.
dequeueReusableCell
(
withClass
:
YHServerHKLifeViewCell
.
self
)
let
cell0
=
tableView
.
dequeueReusableCell
(
withClass
:
YHServerHKLifeViewCell
.
self
)
cell0
.
tableFootView
.
items
=
dataSouce
cell0
.
selectionStyle
=
.
none
cell0
.
selectionStyle
=
.
none
return
cell0
return
cell0
}
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/V/YHServiceSectionView.swift
View file @
57c77d97
...
@@ -10,7 +10,8 @@ import UIKit
...
@@ -10,7 +10,8 @@ import UIKit
class
YHServiceSectionView
:
UIView
{
class
YHServiceSectionView
:
UIView
{
typealias
Block
=
(
YHClassifyModel
)
->
()
var
block
:
Block
?
var
items
:
[
YHClassifyModel
]
=
[]
{
var
items
:
[
YHClassifyModel
]
=
[]
{
didSet
{
didSet
{
...
@@ -43,8 +44,6 @@ class YHServiceSectionView: UIView {
...
@@ -43,8 +44,6 @@ class YHServiceSectionView: UIView {
super
.
init
(
frame
:
frame
)
super
.
init
(
frame
:
frame
)
backgroundColor
=
.
white
backgroundColor
=
.
white
setUpView
()
setUpView
()
// self.items = ["优才","高才","留学","专才"]
// self.myCollectView.reloadData()
}
}
required
init
?(
coder
:
NSCoder
)
{
required
init
?(
coder
:
NSCoder
)
{
...
@@ -74,18 +73,21 @@ extension YHServiceSectionView: UICollectionViewDelegate, UICollectionViewDataSo
...
@@ -74,18 +73,21 @@ extension YHServiceSectionView: UICollectionViewDelegate, UICollectionViewDataSo
let
cell
=
collectionView
.
dequeueReusableCell
(
withReuseIdentifier
:
YHServiceSectionCollectionViewCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHServiceSectionCollectionViewCell
let
cell
=
collectionView
.
dequeueReusableCell
(
withReuseIdentifier
:
YHServiceSectionCollectionViewCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHServiceSectionCollectionViewCell
cell
.
dataSource
=
items
[
indexPath
.
row
]
cell
.
dataSource
=
items
[
indexPath
.
row
]
if
indexPath
.
row
==
selectIndex
{
if
indexPath
.
row
==
selectIndex
{
cell
.
isSelected
=
true
cell
.
setSelectedStyle
()
}
else
{
}
else
{
cell
.
isSelected
=
false
cell
.
setDeSelectedStyle
()
}
}
return
cell
return
cell
}
}
private
func
collectionView
(
collectionView
:
UICollectionView
,
didSelectItemAtIndexPath
indexPath
:
NS
IndexPath
)
{
func
collectionView
(
_
collectionView
:
UICollectionView
,
didSelectItemAt
indexPath
:
IndexPath
)
{
selectIndex
=
indexPath
.
row
selectIndex
=
indexPath
.
row
collectionView
.
reloadData
()
collectionView
.
reloadData
()
let
model
=
items
[
indexPath
.
row
]
if
let
block
=
block
{
block
(
model
)
}
print
(
"index is
\(
indexPath
.
row
)
"
)
print
(
"index is
\(
indexPath
.
row
)
"
)
}
}
}
}
...
@@ -93,27 +95,12 @@ extension YHServiceSectionView: UICollectionViewDelegate, UICollectionViewDataSo
...
@@ -93,27 +95,12 @@ extension YHServiceSectionView: UICollectionViewDelegate, UICollectionViewDataSo
class
YHServiceSectionCollectionViewCell
:
UICollectionViewCell
{
class
YHServiceSectionCollectionViewCell
:
UICollectionViewCell
{
static
let
cellReuseIdentifier
=
"YHServiceSectionCollectionViewCell"
static
let
cellReuseIdentifier
=
"YHServiceSectionCollectionViewCell"
private
var
isSelect
:
Bool
=
false
func
setSelectedStyle
()
{
override
var
isSelected
:
Bool
{
set
{
self
.
isSelect
=
newValue
if
newValue
{
self
.
setSelectedStyle
()
}
else
{
self
.
setDeSelectedStyle
()
}
}
get
{
return
self
.
isSelect
}
}
private
func
setSelectedStyle
()
{
contentView
.
backgroundColor
=
UIColor
.
brandMainColor
contentView
.
backgroundColor
=
UIColor
.
brandMainColor
descripeLable
.
textColor
=
UIColor
.
white
descripeLable
.
textColor
=
UIColor
.
white
}
}
private
func
setDeSelectedStyle
()
{
func
setDeSelectedStyle
()
{
contentView
.
backgroundColor
=
UIColor
(
hex
:
0xf4f6fa
)
contentView
.
backgroundColor
=
UIColor
(
hex
:
0xf4f6fa
)
descripeLable
.
textColor
=
UIColor
(
hex
:
0x94a3bb
)
descripeLable
.
textColor
=
UIColor
(
hex
:
0x94a3bb
)
}
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/V/YHServiceTableFootView.swift
View file @
57c77d97
...
@@ -10,14 +10,11 @@ import UIKit
...
@@ -10,14 +10,11 @@ import UIKit
class
YHServiceTableFootView
:
UIView
{
class
YHServiceTableFootView
:
UIView
{
lazy
var
items
=
{
var
items
:[
YHHomeListModel
?]
=
[]
{
return
[
didSet
{
AboutAdvantageItem
(
iconName
:
"about_match"
,
title
:
"精准匹配"
,
detail
:
"大数据精准匹配,专属方案获批率更高"
,
url
:
""
),
self
.
myCollectView
.
reloadData
()
AboutAdvantageItem
(
iconName
:
"about_match"
,
title
:
"精准匹配"
,
detail
:
"大数据精准匹配,专属方案获批率更高"
,
url
:
""
),
}
AboutAdvantageItem
(
iconName
:
"about_match"
,
title
:
"精准匹配"
,
detail
:
"大数据精准匹配,专属方案获批率更高"
,
url
:
""
),
}
AboutAdvantageItem
(
iconName
:
"about_match"
,
title
:
"精准匹配"
,
detail
:
"大数据精准匹配,专属方案获批率更高"
,
url
:
""
)
]
}()
lazy
var
myCollectView
=
{
lazy
var
myCollectView
=
{
// 设置布局方向
// 设置布局方向
...
@@ -36,24 +33,10 @@ class YHServiceTableFootView: UIView {
...
@@ -36,24 +33,10 @@ class YHServiceTableFootView: UIView {
return
collectinoView
return
collectinoView
}()
}()
var
dataSource
:
YHScemeHeadModel
?
{
didSet
{
updateAllViews
()
}
}
override
init
(
frame
:
CGRect
)
{
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
super
.
init
(
frame
:
frame
)
backgroundColor
=
.
white
backgroundColor
=
.
white
setUpView
()
setUpView
()
self
.
items
=
[
AboutAdvantageItem
(
iconName
:
"about_match"
,
title
:
"精准匹配精准匹配精准匹配精准匹配精准匹配精准匹配精准匹配精准匹配精准匹配精准匹配精准匹配精准匹配精准匹配精准匹配精准匹配精准匹配精准匹配精准匹配精准匹配精准匹配精准匹配"
,
detail
:
"大数据精准匹配,专属方案获批率更高"
,
url
:
"https://copyright.bdstatic.com/vcg/creative/cc9c744cf9f7c864889c563cbdeddce6.jpg@h_1280"
),
AboutAdvantageItem
(
iconName
:
"about_match"
,
title
:
"精准匹配精准匹配精准匹配精准匹配精准匹配"
,
detail
:
"大数据精准匹配,专属方案获批率更高"
,
url
:
"https://inews.gtimg.com/om_bt/OjPq2cnMN_-ivDKjxpCZ2kk_ab8YC5VMnL-0pQ21fUvd4AA/1000"
),
AboutAdvantageItem
(
iconName
:
"about_match"
,
title
:
"精准匹配精准匹配精准匹配精准匹配"
,
detail
:
"大数据精准匹配,专属方案获批率更高"
,
url
:
"https://img.pconline.com.cn/images/upload/upc/tx/itbbs/2101/25/c1/251135935_1611532823091_mthumb.jpg"
),
AboutAdvantageItem
(
iconName
:
"about_match"
,
title
:
"精准匹配"
,
detail
:
"大数据精准匹配,专属方案获批率更高"
,
url
:
""
),
AboutAdvantageItem
(
iconName
:
"about_match"
,
title
:
"精准匹配"
,
detail
:
"大数据精准匹配,专属方案获批率更高"
,
url
:
"https://photo.16pic.com/00/47/86/16pic_4786353_b.jpg"
),
AboutAdvantageItem
(
iconName
:
"about_match"
,
title
:
"精准匹配"
,
detail
:
"大数据精准匹配,专属方案获批率更高"
,
url
:
"https://inews.gtimg.com/om_bt/OMvPDmiuH_X5Vq1YLNgbFEzD2h_-2dCfWQ7xZFcKFSEsAAA/641"
)
]
self
.
myCollectView
.
reloadData
()
}
}
required
init
?(
coder
:
NSCoder
)
{
required
init
?(
coder
:
NSCoder
)
{
...
@@ -70,29 +53,6 @@ class YHServiceTableFootView: UIView {
...
@@ -70,29 +53,6 @@ class YHServiceTableFootView: UIView {
// self.loadFakeData()
// self.loadFakeData()
// }
// }
}
}
func
updateAllViews
()
{
guard
let
model
=
dataSource
else
{
return
}
}
func
getImageSize
(
_
url
:
String
?)
->
CGSize
{
// guard let urlStr = url, urlStr.count != 0 else {
// return CGSize.zero
// }
// let tempUrl = URL(string: urlStr)
// let imageSourceRef = CGImageSourceCreateWithURL(tempUrl! as CFURL, nil)
// var width: CGFloat = 0
// var height: CGFloat = 0
// if let imageSRef = imageSourceRef {
// let imageProperties = CGImageSourceCopyPropertiesAtIndex(imageSRef, 0, nil)
// if let imageP = imageProperties {
// let imageDict = imageP as Dictionary
// width = imageDict[kCGImagePropertyPixelWidth] as! CGFloat
// height = imageDict[kCGImagePropertyPixelHeight] as! CGFloat
// }
// }
return
CGSize
(
width
:
150
,
height
:
250
)
}
}
}
extension
YHServiceTableFootView
:
UICollectionViewDelegate
,
UICollectionViewDataSource
{
extension
YHServiceTableFootView
:
UICollectionViewDelegate
,
UICollectionViewDataSource
{
...
@@ -103,7 +63,7 @@ extension YHServiceTableFootView: UICollectionViewDelegate, UICollectionViewData
...
@@ -103,7 +63,7 @@ extension YHServiceTableFootView: UICollectionViewDelegate, UICollectionViewData
func
collectionView
(
_
collectionView
:
UICollectionView
,
cellForItemAt
indexPath
:
IndexPath
)
->
UICollectionViewCell
{
func
collectionView
(
_
collectionView
:
UICollectionView
,
cellForItemAt
indexPath
:
IndexPath
)
->
UICollectionViewCell
{
let
cell
=
collectionView
.
dequeueReusableCell
(
withReuseIdentifier
:
YHHomeCollectionViewCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHHomeCollectionViewCell
let
cell
=
collectionView
.
dequeueReusableCell
(
withReuseIdentifier
:
YHHomeCollectionViewCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHHomeCollectionViewCell
cell
.
dataSource
=
items
[
indexPath
.
row
]
cell
.
listModel
=
items
[
indexPath
.
row
]
return
cell
return
cell
}
}
...
@@ -112,38 +72,18 @@ extension YHServiceTableFootView: UICollectionViewDelegate, UICollectionViewData
...
@@ -112,38 +72,18 @@ extension YHServiceTableFootView: UICollectionViewDelegate, UICollectionViewData
print
(
"index is
\(
indexPath
.
row
)
"
)
print
(
"index is
\(
indexPath
.
row
)
"
)
}
}
// func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
func
collectionView
(
_
collectionView
:
UICollectionView
,
didSelectItemAt
indexPath
:
IndexPath
)
{
//
let
model
=
items
[
indexPath
.
row
]
// }
let
vc
=
YHHomeWebViewController
()
vc
.
url
=
"https://test-hkdiy-h5.galaxy-immi.com/articleDetail.html?id=
\(
model
?
.
id
??
0
)
"
vc
.
id
=
model
?
.
id
??
0
UIViewController
.
current
?
.
navigationController
?
.
pushViewController
(
vc
)
}
}
}
extension
YHServiceTableFootView
:
CollectionViewWaterfallLayoutDelegate
{
extension
YHServiceTableFootView
:
CollectionViewWaterfallLayoutDelegate
{
func
collectionView
(
_
collectionView
:
UICollectionView
,
layout
:
UICollectionViewLayout
,
sizeForItemAtIndexPath
indexPath
:
NSIndexPath
)
->
CGSize
{
func
collectionView
(
_
collectionView
:
UICollectionView
,
layout
:
UICollectionViewLayout
,
sizeForItemAtIndexPath
indexPath
:
NSIndexPath
)
->
CGSize
{
let
model
=
items
[
indexPath
.
row
]
guard
let
model
=
items
[
indexPath
.
row
]
else
{
return
CGSize
.
zero
}
let
text
=
model
.
title
return
CGSize
(
width
:
model
.
img_width_cell
,
height
:
model
.
img_height_cell
)
let
width
=
(
KScreenWidth
-
47
)
/
2
let
font
=
UIFont
.
PFSC_R
(
ofSize
:
14
)
// 字体大小
let
maxWidth
=
width
-
16
// 最大宽度限制
// 创建NSAttributedString对象并设置属性
let
attributes
=
[
NSAttributedString
.
Key
.
font
:
font
]
as
[
NSAttributedString
.
Key
:
Any
]
_
=
NSMutableAttributedString
(
string
:
text
,
attributes
:
attributes
)
// 根据指定的最大宽度和字体大小计算文本的高度
let
size
=
(
text
as
NSString
)
.
boundingRect
(
with
:
CGSize
(
width
:
maxWidth
,
height
:
.
greatestFiniteMagnitude
),
options
:
.
usesLineFragmentOrigin
,
attributes
:
attributes
,
context
:
nil
)
.
size
var
textHeight
=
size
.
height
if
textHeight
>
40
{
textHeight
=
40
}
let
imageSize
=
getImageSize
(
model
.
url
)
var
imageHeight
=
0.0
if
imageSize
.
width
==
0
{
imageHeight
=
width
}
else
{
imageHeight
=
width
*
imageSize
.
height
/
imageSize
.
width
if
imageHeight
>
280
{
imageHeight
=
280
}
}
let
totalHeight
=
imageHeight
+
textHeight
+
46
return
CGSize
(
width
:
width
,
height
:
totalHeight
)
}
}
}
}
galaxy/galaxy/Classes/Tools/NetWork/YHAllApiName.swift
View file @
57c77d97
...
@@ -10,10 +10,8 @@
...
@@ -10,10 +10,8 @@
class
YHAllApiName
{
class
YHAllApiName
{
//接口 模块名 Common
//接口 模块名 Common
struct
Common
{
struct
Common
{
//具体的业务接口
//首页配置接口
//首页配置接口
static
let
homeConfigApi
=
"
common/homepage-config/index
"
static
let
homeConfigApi
=
"
infoflow/app/config
"
//获取首页展示的资讯
//获取首页展示的资讯
static
let
consult
=
"infoflow/home/consult"
static
let
consult
=
"infoflow/home/consult"
//获取首页展示的banner
//获取首页展示的banner
...
@@ -22,6 +20,12 @@ class YHAllApiName {
...
@@ -22,6 +20,12 @@ class YHAllApiName {
static
let
classify
=
"infoflow/classify/list"
static
let
classify
=
"infoflow/classify/list"
//获取资讯
//获取资讯
static
let
article
=
"infoflow/article/list"
static
let
article
=
"infoflow/article/list"
//资讯详情
static
let
webInfo
=
"infoflow/article/info"
//资讯收藏
static
let
star
=
"infoflow/article/collect"
//资讯点赞
static
let
like
=
"infoflow/article/like"
}
}
//order 模块
//order 模块
...
@@ -199,7 +203,8 @@ class YHAllApiName {
...
@@ -199,7 +203,8 @@ class YHAllApiName {
static
let
confirm
=
"infoflow/my-sign/confirm"
static
let
confirm
=
"infoflow/my-sign/confirm"
// 查看合同
// 查看合同
static
let
look
=
"infoflow/sign/view-detail"
static
let
look
=
"infoflow/sign/view-detail"
// 查看签署状态
static
let
signCallBack
=
"infoflow/sign/sign-callback"
}
}
//我的文书
//我的文书
...
...
galaxy/galaxy/Res/Assets.xcassets/DavidTest/home_red_heart.imageset/Vector@2x.png
deleted
100644 → 0
View file @
51f3e487
929 Bytes
galaxy/galaxy/Res/Assets.xcassets/DavidTest/home_red_heart.imageset/Vector@3x.png
deleted
100644 → 0
View file @
51f3e487
1.22 KB
galaxy/galaxy/Res/Assets.xcassets/
DavidTest/home_red
_heart.imageset/Contents.json
→
galaxy/galaxy/Res/Assets.xcassets/
Home/home_grey
_heart.imageset/Contents.json
View file @
57c77d97
...
@@ -5,12 +5,12 @@
...
@@ -5,12 +5,12 @@
"scale"
:
"1x"
"scale"
:
"1x"
},
},
{
{
"filename"
:
"
Vector
@2x.png"
,
"filename"
:
"
编组-8
@2x.png"
,
"idiom"
:
"universal"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
"scale"
:
"2x"
},
},
{
{
"filename"
:
"
Vector
@3x.png"
,
"filename"
:
"
编组-8
@3x.png"
,
"idiom"
:
"universal"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
"scale"
:
"3x"
}
}
...
...
galaxy/galaxy/Res/Assets.xcassets/Home/home_grey_heart.imageset/编组-8@2x.png
0 → 100644
View file @
57c77d97
815 Bytes
galaxy/galaxy/Res/Assets.xcassets/Home/home_grey_heart.imageset/编组-8@3x.png
0 → 100644
View file @
57c77d97
1.21 KB
galaxy/galaxy/Res/Assets.xcassets/Home/home_red_heart.imageset/Contents.json
0 → 100644
View file @
57c77d97
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"filename"
:
"编组-8@2x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"编组-8@3x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
galaxy/galaxy/Res/Assets.xcassets/Home/home_red_heart.imageset/编组-8@2x.png
0 → 100644
View file @
57c77d97
489 Bytes
galaxy/galaxy/Res/Assets.xcassets/Home/home_red_heart.imageset/编组-8@3x.png
0 → 100644
View file @
57c77d97
717 Bytes
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment