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
cb2a6bba
Commit
cb2a6bba
authored
Apr 11, 2024
by
pete谢兆麟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
四大金刚跳转
parent
93c7ec4d
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
172 additions
and
17 deletions
+172
-17
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+4
-0
YHFourKingViewController.swift
...Classes/Modules/Home(首页)/C/YHFourKingViewController.swift
+135
-0
YHHomePageViewController.swift
...Classes/Modules/Home(首页)/C/YHHomePageViewController.swift
+4
-4
YHHomeListModel.swift
...y/galaxy/Classes/Modules/Home(首页)/M/YHHomeListModel.swift
+5
-0
YHHomeKingKongBlockView.swift
.../Classes/Modules/Home(首页)/V/YHHomeKingKongBlockView.swift
+9
-0
YHHomePageViewModel.swift
...axy/Classes/Modules/Home(首页)/VM/YHHomePageViewModel.swift
+11
-9
YHServerHKLifeViewController.swift
...lligentService(服务中心)/C/YHServerHKLifeViewController.swift
+2
-2
YHServiceListViewController.swift
...elligentService(服务中心)/C/YHServiceListViewController.swift
+2
-2
No files found.
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
cb2a6bba
...
@@ -235,6 +235,7 @@
...
@@ -235,6 +235,7 @@
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 */
;
};
048B2A442BC7901900A93BF0
/* YHHomeWebViewModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
048B2A432BC7901900A93BF0
/* YHHomeWebViewModel.swift */
;
};
048B2A462BC7912400A93BF0
/* YHWebModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
048B2A452BC7912400A93BF0
/* YHWebModel.swift */
;
};
048B2A462BC7912400A93BF0
/* YHWebModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
048B2A452BC7912400A93BF0
/* YHWebModel.swift */
;
};
048B2A482BC7CE4800A93BF0
/* YHFourKingViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
048B2A472BC7CE4800A93BF0
/* YHFourKingViewController.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 */
;
};
...
@@ -676,6 +677,7 @@
...
@@ -676,6 +677,7 @@
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>"
;
};
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>"
;
};
048B2A452BC7912400A93BF0
/* YHWebModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHWebModel.swift
;
sourceTree
=
"<group>"
;
};
048B2A472BC7CE4800A93BF0
/* YHFourKingViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHFourKingViewController.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>"
;
};
...
@@ -2210,6 +2212,7 @@
...
@@ -2210,6 +2212,7 @@
A5173D672BC399B9007D4E74
/* YHHomePageViewController.swift */
,
A5173D672BC399B9007D4E74
/* YHHomePageViewController.swift */
,
044E1E802BC3BBC200A3B4AF
/* YHSearchInfomationVC.swift */
,
044E1E802BC3BBC200A3B4AF
/* YHSearchInfomationVC.swift */
,
A5A4FD622BC79901001EF9F7
/* YHConfigManager.swift */
,
A5A4FD622BC79901001EF9F7
/* YHConfigManager.swift */
,
048B2A472BC7CE4800A93BF0
/* YHFourKingViewController.swift */
,
);
);
path
=
C
;
path
=
C
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
...
@@ -2609,6 +2612,7 @@
...
@@ -2609,6 +2612,7 @@
A53F42B92BC3DCA9009CAC70
/* YHHomeKingKongBlockModel.swift in Sources */
,
A53F42B92BC3DCA9009CAC70
/* YHHomeKingKongBlockModel.swift in Sources */
,
A5ACE93F2B4564F7002C94D2
/* UIViewController+Extension.swift in Sources */
,
A5ACE93F2B4564F7002C94D2
/* UIViewController+Extension.swift in Sources */
,
A53B61192BB3C9960010B573
/* YHMyDocListHeaderView.swift in Sources */
,
A53B61192BB3C9960010B573
/* YHMyDocListHeaderView.swift in Sources */
,
048B2A482BC7CE4800A93BF0
/* YHFourKingViewController.swift in Sources */
,
045EEF082B9F171A0022A143
/* YHBasicInfoCellModel.swift in Sources */
,
045EEF082B9F171A0022A143
/* YHBasicInfoCellModel.swift in Sources */
,
A592FE952BA6D23C0062FACA
/* YHCertificateEntryCell.swift in Sources */
,
A592FE952BA6D23C0062FACA
/* YHCertificateEntryCell.swift in Sources */
,
A5ACE9472B4564F7002C94D2
/* YHHUD.swift in Sources */
,
A5ACE9472B4564F7002C94D2
/* YHHUD.swift in Sources */
,
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/C/YHFourKingViewController.swift
0 → 100644
View file @
cb2a6bba
//
// YHFourKingViewController.swift
// galaxy
//
// Created by EDY on 2024/4/11.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
class
YHFourKingViewController
:
YHBaseViewController
{
let
homeViewModel
:
YHHomePageViewModel
=
YHHomePageViewModel
()
var
tableFootView
:
YHServiceTableFootView
!
var
sectionView
:
YHServiceSectionView
!
var
id
=
3
var
dataSouce
:
[
YHHomeListModel
?]
=
[]
{
didSet
{
self
.
homeTableView
.
reloadData
()
}
}
var
homeTableView
:
UITableView
=
{
let
tableView
=
UITableView
(
frame
:
.
zero
,
style
:
.
plain
)
if
#available(iOS 15.0, *)
{
tableView
.
sectionHeaderTopPadding
=
0
}
tableView
.
backgroundColor
=
.
clear
tableView
.
separatorStyle
=
.
none
tableView
.
showsHorizontalScrollIndicator
=
false
tableView
.
showsVerticalScrollIndicator
=
false
tableView
.
rowHeight
=
UITableView
.
automaticDimension
tableView
.
estimatedRowHeight
=
81.0
tableView
.
register
(
YHServerHKLifeViewCell
.
self
,
forCellReuseIdentifier
:
YHServerHKLifeViewCell
.
cellReuseIdentifier
)
return
tableView
}()
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
setupUI
()
}
override
func
viewWillAppear
(
_
animated
:
Bool
)
{
super
.
viewWillAppear
(
animated
)
loadData
()
}
}
extension
YHFourKingViewController
{
func
loadData
()
{
homeViewModel
.
getHomeClassify
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
,
let
classify
=
self
.
homeViewModel
.
classify
else
{
return
}
for
item
in
classify
{
let
model
=
item
as
YHHomeClassifyModel
if
model
.
id
==
self
.
id
{
gk_navTitle
=
model
.
name
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
??
[]
}
}
}
}
}
func
setupUI
()
{
gk_navBarAlpha
=
1
sectionView
=
{
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
}()
view
.
addSubview
(
homeTableView
)
homeTableView
.
tableFooterView
=
tableFootView
homeTableView
.
snp
.
makeConstraints
{
make
in
make
.
bottom
.
left
.
right
.
equalToSuperview
()
make
.
top
.
equalToSuperview
()
.
offset
(
k_Height_NavigationtBarAndStatuBar
)
}
homeTableView
.
delegate
=
self
homeTableView
.
dataSource
=
self
}
}
// MARK: - UITableViewDelegate 和 UITableViewDataSource
extension
YHFourKingViewController
:
UITableViewDelegate
,
UITableViewDataSource
{
func
numberOfSections
(
in
tableView
:
UITableView
)
->
Int
{
return
1
}
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
return
1
}
func
tableView
(
_
tableView
:
UITableView
,
heightForHeaderInSection
section
:
Int
)
->
CGFloat
{
return
48
}
func
tableView
(
_
tableView
:
UITableView
,
viewForHeaderInSection
section
:
Int
)
->
UIView
?
{
return
sectionView
}
func
tableView
(
_
tableView
:
UITableView
,
heightForFooterInSection
section
:
Int
)
->
CGFloat
{
return
0.01
}
func
tableView
(
_
tableView
:
UITableView
,
viewForFooterInSection
section
:
Int
)
->
UIView
?
{
return
UIView
()
}
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
return
KScreenHeight
}
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
let
cell0
=
tableView
.
dequeueReusableCell
(
withClass
:
YHServerHKLifeViewCell
.
self
)
cell0
.
tableFootView
.
items
=
dataSouce
cell0
.
selectionStyle
=
.
none
return
cell0
}
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
}
}
galaxy/galaxy/Classes/Modules/Home(首页)/C/YHHomePageViewController.swift
View file @
cb2a6bba
...
@@ -109,17 +109,17 @@ private extension YHHomePageViewController {
...
@@ -109,17 +109,17 @@ private extension YHHomePageViewController {
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
.
arrHomeNewsData
.
count
return
self
.
viewModel
.
arrHomeNewsData
?
.
count
??
0
}
}
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
.
arrHomeNewsData
[
indexPath
.
row
]
cell
.
listModel
=
self
.
viewModel
.
arrHomeNewsData
?
[
indexPath
.
row
]
return
cell
return
cell
}
}
func
collectionView
(
_
collectionView
:
UICollectionView
,
didSelectItemAt
indexPath
:
IndexPath
)
{
func
collectionView
(
_
collectionView
:
UICollectionView
,
didSelectItemAt
indexPath
:
IndexPath
)
{
guard
let
model
=
self
.
viewModel
.
arrHomeNewsData
[
indexPath
.
row
]
else
{
return
}
guard
let
model
=
self
.
viewModel
.
arrHomeNewsData
?
[
indexPath
.
row
]
else
{
return
}
let
vc
=
YHHomeWebViewController
()
let
vc
=
YHHomeWebViewController
()
vc
.
url
=
YHConfigManager
.
shared
.
h5Url
+
"?id=
\(
model
.
id
)
"
vc
.
url
=
YHConfigManager
.
shared
.
h5Url
+
"?id=
\(
model
.
id
)
"
...
@@ -130,7 +130,7 @@ extension YHHomePageViewController: UICollectionViewDelegate, UICollectionViewDa
...
@@ -130,7 +130,7 @@ extension YHHomePageViewController: UICollectionViewDelegate, UICollectionViewDa
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
.
arrHomeNewsData
[
indexPath
.
row
]
else
{
return
CGSize
.
zero
}
guard
let
model
=
self
.
viewModel
.
arrHomeNewsData
?
[
indexPath
.
row
]
else
{
return
CGSize
.
zero
}
return
CGSize
(
width
:
model
.
img_width_cell
,
height
:
model
.
img_height_cell
)
return
CGSize
(
width
:
model
.
img_width_cell
,
height
:
model
.
img_height_cell
)
}
}
}
}
galaxy/galaxy/Classes/Modules/Home(首页)/M/YHHomeListModel.swift
View file @
cb2a6bba
...
@@ -8,6 +8,11 @@
...
@@ -8,6 +8,11 @@
import
UIKit
import
UIKit
class
YHHomeListTotalModel
:
YHBaseModel
{
var
data
:
[
YHHomeListModel
]
=
[]
var
total
:
Int
=
0
}
class
YHHomeListModel
:
YHBaseModel
{
class
YHHomeListModel
:
YHBaseModel
{
var
collect_count
:
Int
=
0
var
collect_count
:
Int
=
0
var
id
:
Int
=
0
var
id
:
Int
=
0
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/V/YHHomeKingKongBlockView.swift
View file @
cb2a6bba
...
@@ -57,10 +57,19 @@ private extension YHHomeKingKongBlockView {
...
@@ -57,10 +57,19 @@ private extension YHHomeKingKongBlockView {
if
let
tag
=
gestureRecognizer
.
view
?
.
tag
{
if
let
tag
=
gestureRecognizer
.
view
?
.
tag
{
switch
tag
{
switch
tag
{
case
0
:
case
0
:
let
vc
=
YHFourKingViewController
()
vc
.
id
=
3
UIViewController
.
current
?
.
navigationController
?
.
pushViewController
(
vc
)
printLog
(
"跳转 身份福利"
)
printLog
(
"跳转 身份福利"
)
case
1
:
case
1
:
let
vc
=
YHFourKingViewController
()
vc
.
id
=
4
UIViewController
.
current
?
.
navigationController
?
.
pushViewController
(
vc
)
printLog
(
"跳转 办理攻略"
)
printLog
(
"跳转 办理攻略"
)
case
2
:
case
2
:
let
vc
=
YHFourKingViewController
()
vc
.
id
=
5
UIViewController
.
current
?
.
navigationController
?
.
pushViewController
(
vc
)
printLog
(
"跳转 客户心声"
)
printLog
(
"跳转 客户心声"
)
case
3
:
case
3
:
printLog
(
"跳转 香港办事"
)
printLog
(
"跳转 香港办事"
)
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/VM/YHHomePageViewModel.swift
View file @
cb2a6bba
...
@@ -12,7 +12,7 @@ class YHHomePageViewModel : YHBaseViewModel {
...
@@ -12,7 +12,7 @@ class YHHomePageViewModel : YHBaseViewModel {
//数据源
//数据源
var
configModel
:
YHConfigModel
?
var
configModel
:
YHConfigModel
?
var
arrHomeNewsData
:
[
YHHomeListModel
?]
=
[]
var
arrHomeNewsData
:
[
YHHomeListModel
]?
var
banners
:
[
YHBannerModel
]?
var
banners
:
[
YHBannerModel
]?
var
classify
:
[
YHHomeClassifyModel
]?
var
classify
:
[
YHHomeClassifyModel
]?
...
@@ -53,16 +53,16 @@ extension YHHomePageViewModel {
...
@@ -53,16 +53,16 @@ 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
=
YHHomeListTotalModel
.
deserialize
(
from
:
dic
as?
Dictionary
)
else
{
self
.
arrHomeNewsData
=
[]
self
.
arrHomeNewsData
=
[]
callBackBlock
(
false
,
nil
)
callBackBlock
(
false
,
nil
)
return
return
}
}
for
item
in
result
{
for
item
in
result
.
data
{
item
?
.
calHeightParam
()
item
.
calHeightParam
()
}
}
self
.
arrHomeNewsData
=
result
self
.
arrHomeNewsData
=
result
.
data
callBackBlock
(
true
,
nil
)
callBackBlock
(
true
,
nil
)
}
else
{
}
else
{
self
.
arrHomeNewsData
=
[]
self
.
arrHomeNewsData
=
[]
...
@@ -131,14 +131,16 @@ extension YHHomePageViewModel {
...
@@ -131,14 +131,16 @@ 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
=
YHHomeListTotalModel
.
deserialize
(
from
:
dic
as?
Dictionary
)
else
{
self
.
arrHomeNewsData
=
[]
callBackBlock
(
false
,
nil
)
callBackBlock
(
false
,
nil
)
return
return
}
}
for
item
in
result
{
item
?
.
calHeightParam
()
for
item
in
result
.
data
{
item
.
calHeightParam
()
}
}
self
.
arrHomeNewsData
=
result
self
.
arrHomeNewsData
=
result
.
data
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/IntelligentService(服务中心)/C/YHServerHKLifeViewController.swift
View file @
cb2a6bba
...
@@ -63,7 +63,7 @@ extension YHServerHKLifeViewController {
...
@@ -63,7 +63,7 @@ extension YHServerHKLifeViewController {
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
.
dataSouce
=
self
.
homeViewModel
.
arrHomeNewsData
self
.
dataSouce
=
self
.
homeViewModel
.
arrHomeNewsData
??
[]
}
}
}
}
}
}
...
@@ -80,7 +80,7 @@ extension YHServerHKLifeViewController {
...
@@ -80,7 +80,7 @@ extension YHServerHKLifeViewController {
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
self
.
homeViewModel
.
getList
(
model
.
id
)
{[
weak
self
]
success
,
error
in
self
.
homeViewModel
.
getList
(
model
.
id
)
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
self
.
dataSouce
=
self
.
homeViewModel
.
arrHomeNewsData
self
.
dataSouce
=
self
.
homeViewModel
.
arrHomeNewsData
??
[]
}
}
}
}
return
view
return
view
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/C/YHServiceListViewController.swift
View file @
cb2a6bba
...
@@ -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
self
.
normalView
.
dataSouce
=
self
.
homeViewModel
.
arrHomeNewsData
??
[]
}
}
}
}
}
}
...
@@ -89,7 +89,7 @@ extension YHServiceListViewController {
...
@@ -89,7 +89,7 @@ extension YHServiceListViewController {
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
self
.
homeViewModel
.
getList
(
model
.
id
)
{[
weak
self
]
success
,
error
in
self
.
homeViewModel
.
getList
(
model
.
id
)
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
self
.
normalView
.
dataSouce
=
self
.
homeViewModel
.
arrHomeNewsData
self
.
normalView
.
dataSouce
=
self
.
homeViewModel
.
arrHomeNewsData
??
[]
}
}
}
}
return
view
return
view
...
...
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