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
3ca7e00d
Commit
3ca7e00d
authored
Apr 12, 2024
by
David黄金龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
多页每次请求 6
控制 banner 不超过6
parent
29b83ed8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
YHHomePageViewModel.swift
...axy/Classes/Modules/Home(首页)/VM/YHHomePageViewModel.swift
+9
-2
YHMyLikeViewModel.swift
...lasses/Modules/Mine(我的)/ViewModel/YHMyLikeViewModel.swift
+1
-1
No files found.
galaxy/galaxy/Classes/Modules/Home(首页)/VM/YHHomePageViewModel.swift
View file @
3ca7e00d
...
@@ -17,7 +17,7 @@ class YHHomePageViewModel : YHBaseViewModel {
...
@@ -17,7 +17,7 @@ class YHHomePageViewModel : YHBaseViewModel {
var
hkList
:
[
YHHKEventModel
]?
var
hkList
:
[
YHHKEventModel
]?
//首页相关参数
//首页相关参数
private
var
curPageIndex
:
Int
=
1
private
var
curPageIndex
:
Int
=
1
private
var
page_Size
:
Int
=
10
private
var
page_Size
:
Int
=
6
private
var
totalCount
:
Int
=
0
private
var
totalCount
:
Int
=
0
var
hasMoreForHomeNews
:
Bool
=
true
var
hasMoreForHomeNews
:
Bool
=
true
}
}
...
@@ -117,7 +117,14 @@ extension YHHomePageViewModel {
...
@@ -117,7 +117,14 @@ extension YHHomePageViewModel {
callBackBlock
(
false
,
nil
)
callBackBlock
(
false
,
nil
)
return
return
}
}
self
.
banners
=
result
as?
[
YHBannerModel
]
var
arrData
=
result
as?
[
YHBannerModel
]
if
let
arr
=
arrData
,
arr
.
count
>
6
{
arrData
=
Array
(
arrData
?[
0
...
5
]
??
[])
}
self
.
banners
=
arrData
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/Mine(我的)/ViewModel/YHMyLikeViewModel.swift
View file @
3ca7e00d
...
@@ -12,7 +12,7 @@ class YHMyLikeViewModel: YHBaseViewModel {
...
@@ -12,7 +12,7 @@ class YHMyLikeViewModel: YHBaseViewModel {
var
arrHomeNewsData
:
[
YHHomeListModel
]?
var
arrHomeNewsData
:
[
YHHomeListModel
]?
private
var
curPageIndex
:
Int
=
1
private
var
curPageIndex
:
Int
=
1
private
var
page_Size
:
Int
=
10
private
var
page_Size
:
Int
=
6
private
var
totalCount
:
Int
=
0
private
var
totalCount
:
Int
=
0
var
hasMoreForHomeNews
:
Bool
=
true
var
hasMoreForHomeNews
:
Bool
=
true
}
}
...
...
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