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
66a63236
Commit
66a63236
authored
May 09, 2019
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
搜索框高度修正
parent
9bcf5a2d
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
60 additions
and
52 deletions
+60
-52
slide.ts
src/components/slide/slide.ts
+1
-0
stuff-detail.html
src/pages/home-pages/stuff-detail/stuff-detail.html
+0
-1
discover.html
src/pages/tabs/discover/discover.html
+46
-46
discover.scss
src/pages/tabs/discover/discover.scss
+7
-0
discover.ts
src/pages/tabs/discover/discover.ts
+5
-4
http.service.ts
src/service/http.service.ts
+1
-1
No files found.
src/components/slide/slide.ts
View file @
66a63236
...
...
@@ -61,6 +61,7 @@ export class SlideComponent implements AfterViewInit{
//查看文章详情
goToDetail
()
{
const
index
=
this
.
slides
.
realIndex
;
if
(
this
.
slidersItems
[
index
].
plateType
==
20
)
return
false
;
this
.
nav
.
push
(
StuffDetailPage
,
{
id
:
this
.
slidersItems
[
index
].
id
})
...
...
src/pages/home-pages/stuff-detail/stuff-detail.html
View file @
66a63236
...
...
@@ -18,7 +18,6 @@
<p
[
innerHTML
]="
stuffObj
?.
content
"
></p>
</div>
<div
class=
"stuff-attachments"
>
<ng-container
*
ngFor=
"let item of attachments"
>
<div
style=
"height: 160px;"
*
ngIf=
"item.resourceType == 1"
>
<img
style=
"height: 160px;"
[
src
]="
url
+
item
.
path
"
alt=
""
>
...
...
src/pages/tabs/discover/discover.html
View file @
66a63236
...
...
@@ -58,51 +58,51 @@
<ion-slides
(
ionSlideDidChange
)="
slideChange
()"
loop=
"true"
>
<ion-slide
*
ngFor=
"let new of slideList"
>
<div
class=
"search-content"
>
<ng-container
*
ngFor=
"let item of new"
>
<div
class=
"search-item"
(
click
)="
goToDetail
(
item
)"
>
<p
class=
"item-info"
>
<span
class=
"item-source"
>
{{item.source}}
</span>
<span>
{{item.publishTime | date:'yyyy-MM-dd'}}
</span>
</p>
<div
class=
"item-news"
>
<ion-row
class=
"news-item"
>
<ng-container
*
ngIf=
"item.imgUrl"
>
<ion-col
col-8
class=
"news-left"
>
<p
class=
"news-title"
>
{{item.title}}
</p>
<p
class=
"news-end"
>
<ion-icon
style=
"font-size: 2.5rem;vertical-align: sub"
name=
"eye"
></ion-icon>
<span>
{{item.browseCount}}
</span>
<ion-icon
name=
"chatboxes"
></ion-icon>
<span>
{{item.commentCount}}
</span>
<ion-icon
name=
"thumbs-up"
></ion-icon>
<span>
{{item.likeCount}}
</span>
<ion-icon
name=
"heart"
></ion-icon>
<span>
{{item.collectionCount}}
</span>
</p>
</ion-col>
<ion-col
col-4
class=
"news-right"
>
<img
src=
"{{picture+item.imgUrl}}"
>
</ion-col>
</ng-container>
<ng-container
*
ngIf=
"!item.imgUrl"
>
<ion-col
col-12
class=
"news-left"
>
<p
class=
"news-title"
>
{{item.title}}
</p>
<p
class=
"news-end"
>
<ion-icon
style=
"font-size: 2.5rem;vertical-align: sub"
name=
"eye"
></ion-icon>
<span>
{{item.browseCount}}
</span>
<ion-icon
name=
"chatboxes"
></ion-icon>
<span>
{{item.commentCount}}
</span>
<ion-icon
name=
"thumbs-up"
></ion-icon>
<span>
{{item.likeCount}}
</span>
<ion-icon
name=
"heart"
></ion-icon>
<span>
{{item.collectionCount}}
</span>
</p>
</ion-col>
</ng-container>
</ion-row>
</div>
</div>
</ng-container>
<ng-container
*
ngFor=
"let item of new"
>
<div
class=
"search-item"
(
click
)="
goToDetail
(
item
)"
>
<p
class=
"item-info"
>
<span
class=
"item-source"
>
{{item.source}}
</span>
<span>
{{item.publishTime | date:'yyyy-MM-dd'}}
</span>
</p>
<div
class=
"item-news"
>
<ion-row
class=
"news-item"
>
<ng-container
*
ngIf=
"item.imgUrl"
>
<ion-col
col-8
class=
"news-left"
>
<p
class=
"news-title"
>
{{item.title}}
</p>
<p
class=
"news-end"
>
<ion-icon
style=
"font-size: 2.5rem;vertical-align: sub"
name=
"eye"
></ion-icon>
<span>
{{item.browseCount}}
</span>
<ion-icon
name=
"chatboxes"
></ion-icon>
<span>
{{item.commentCount}}
</span>
<ion-icon
name=
"thumbs-up"
></ion-icon>
<span>
{{item.likeCount}}
</span>
<ion-icon
name=
"heart"
></ion-icon>
<span>
{{item.collectionCount}}
</span>
</p>
</ion-col>
<ion-col
col-4
class=
"news-right"
>
<img
src=
"{{picture+item.imgUrl}}"
>
</ion-col>
</ng-container>
<ng-container
*
ngIf=
"!item.imgUrl"
>
<ion-col
col-12
class=
"news-left"
>
<p
class=
"news-title"
>
{{item.title}}
</p>
<p
class=
"news-end"
>
<ion-icon
style=
"font-size: 2.5rem;vertical-align: sub"
name=
"eye"
></ion-icon>
<span>
{{item.browseCount}}
</span>
<ion-icon
name=
"chatboxes"
></ion-icon>
<span>
{{item.commentCount}}
</span>
<ion-icon
name=
"thumbs-up"
></ion-icon>
<span>
{{item.likeCount}}
</span>
<ion-icon
name=
"heart"
></ion-icon>
<span>
{{item.collectionCount}}
</span>
</p>
</ion-col>
</ng-container>
</ion-row>
</div>
</div>
</ng-container>
</div>
</ion-slide>
</ion-slides>
...
...
@@ -110,7 +110,7 @@
<ion-infinite-scroll
#
infiniteScrollContentEle
(
ionInfinite
)="
doInfinite
($
event
)"
>
<ion-infinite-scroll-content
loadingSpinner=
"bubbles"
loadingText=
"加载
更多...
"
></ion-infinite-scroll-content>
loadingText=
"加载
中
"
></ion-infinite-scroll-content>
</ion-infinite-scroll>
<p
class=
"noData"
*
ngIf=
"!loadMore"
>
你已经看到我的底线了
</p>
...
...
src/pages/tabs/discover/discover.scss
View file @
66a63236
...
...
@@ -91,6 +91,13 @@ page-discover {
color
:
#333333
;
font-size
:
1
.6rem
;
font-family
:
SourceHanSans-Bold
;
.icon-fire
{
position
:
absolute
;
top
:
3px
;
left
:
-14px
;
font-size
:
1
.5rem
;
color
:
#e42417
;
}
}
.news-end
{
align-self
:
flex-end
;
...
...
src/pages/tabs/discover/discover.ts
View file @
66a63236
...
...
@@ -156,6 +156,7 @@ export class DiscoverPage {
totalNum
;
pageNum
=
1
;
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
public
commonSer
:
CommonService
,
public
renderer
:
Renderer2
,
public
tabsSer
:
TabsService
,
public
emitSer
:
EmitService
)
{
...
...
@@ -267,11 +268,11 @@ export class DiscoverPage {
}
//上拉加载
doInfinite
(
e
)
{
doInfinite
(
infiniteScroll
)
{
if
(
this
.
totalNum
<
this
.
slideList
[
this
.
toIndex
].
length
+
1
)
{
console
.
log
(
'没有数据了'
);
this
.
loadMore
=
false
;
e
.
enable
(
false
);
infiniteScroll
.
enable
(
false
);
return
false
;
}
this
.
pageNum
++
;
...
...
@@ -292,11 +293,11 @@ export class DiscoverPage {
if
(
e
.
attachments
.
length
>
0
)
{
e
.
imgUrl
=
e
.
attachments
[
0
].
path
;
}
this
.
slideList
[
this
.
toIndex
].
push
(
e
);
this
.
slideList
[
this
.
indexParent
].
push
(
e
);
});
}
setTimeout
(()
=>
{
e
.
complete
();
infiniteScroll
.
complete
();
this
.
renderer
.
setStyle
(
this
.
infiniteScrollContentEle
.
nativeElement
,
'height'
,
'0px'
);
},
1000
)
}
...
...
src/service/http.service.ts
View file @
66a63236
...
...
@@ -33,7 +33,7 @@ export class AppGlobal {
getDetails
:
'/api/ionic3/details'
};
static
pageCount
=
2
;
static
pageCount
=
4
;
}
@
Injectable
()
...
...
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