Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
party-build-cloud
Project
Project
Details
Activity
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
wangqinghua
party-build-cloud
Commits
11ce2696
Commit
11ce2696
authored
Oct 25, 2019
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页分页的问题
parent
7b517dda
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
7 deletions
+4
-7
home.html
src/pages/tabs/home/home.html
+2
-2
home.ts
src/pages/tabs/home/home.ts
+2
-5
No files found.
src/pages/tabs/home/home.html
View file @
11ce2696
...
...
@@ -113,11 +113,11 @@
</div>
<ion-slides
(
ionSlideDidChange
)="
slideChanged
()"
[
loop
]="
false
"
>
<ng-container
*
ngFor=
"let item of slide
List
;let i = index;"
>
<ng-container
*
ngFor=
"let item of slide
Arr
;let i = index;"
>
<ion-slide>
<ion-content>
<div
class=
"main-news"
>
<ng-container
*
ngFor=
"let new of
item
;"
>
<ng-container
*
ngFor=
"let new of
slideList[i]
;"
>
<ng-container
*
ngIf=
"new.imgUrl"
>
<ion-row
class=
"news-item"
(
click
)="
goToDetail
(
new
)"
>
<ion-col
col-8
class=
"news-left"
>
...
...
src/pages/tabs/home/home.ts
View file @
11ce2696
...
...
@@ -80,7 +80,8 @@ export class HomePage {
plateType
;
index
;
slideList
=
[];
slideList
=
new
Array
(
5
);
slideArr
=
new
Array
(
5
);
itemWidth
;
spanWidth
;
//文字宽度
...
...
@@ -205,7 +206,6 @@ export class HomePage {
}
change
(
item
)
{
console
.
log
(
'213'
);
if
(
this
.
index
===
item
.
index
)
return
;
this
.
index
=
item
.
index
;
this
.
pageNum
=
1
;
...
...
@@ -234,7 +234,6 @@ export class HomePage {
});
this
.
slideList
[
this
.
index
]
=
arr
;
}
console
.
log
(
arr
);
this
.
slides
.
slideTo
(
this
.
index
,
500
);
}
)
...
...
@@ -242,7 +241,6 @@ export class HomePage {
//加载更多
doInfinite
(
e
)
{
console
.
log
(
'doInfinite'
);
if
(
this
.
total
<
this
.
pageSize
||
this
.
total
==
this
.
pageSize
)
{
e
.
complete
();
return
false
;
...
...
@@ -259,7 +257,6 @@ export class HomePage {
this
.
tabsSer
.
stuffPage
(
data
).
subscribe
(
(
res
)
=>
{
e
.
complete
();
console
.
log
(
'e.complete();'
);
res
.
data
.
list
.
forEach
(
e
=>
{
if
(
e
.
attachments
.
length
>
0
)
{
e
.
imgUrl
=
e
.
attachments
[
0
].
path
;
...
...
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