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
9bcf5a2d
Commit
9bcf5a2d
authored
May 09, 2019
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
搜索框高度修正
parent
384a94c0
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
63 additions
and
13 deletions
+63
-13
search-new.scss
src/pages/home-pages/search-new/search-new.scss
+8
-1
discover.html
src/pages/tabs/discover/discover.html
+3
-3
discover.scss
src/pages/tabs/discover/discover.scss
+10
-0
discover.ts
src/pages/tabs/discover/discover.ts
+42
-6
home.ts
src/pages/tabs/home/home.ts
+0
-3
No files found.
src/pages/home-pages/search-new/search-new.scss
View file @
9bcf5a2d
...
...
@@ -11,10 +11,13 @@ page-search-new {
border-bottom
:
1px
solid
#ffffff
;
background-color
:
#fff
;
border-radius
:
5px
;
height
:
3
5
px
;
height
:
3
0
px
;
padding-left
:
10px
;
}
}
ion-navbar
{
height
:
44px
;
}
.
text-input
:
:-
webkit-input-placeholder
{
color
:
#ffffff
;
...
...
@@ -41,6 +44,10 @@ page-search-new {
background-color
:
#e12724
;
}
.header-ios
.toolbar-ios
:last-child
.toolbar-background-ios
{
border
:
none
;
}
//新闻区
.search-content
{
padding
:
0
1rem
;
...
...
src/pages/tabs/discover/discover.html
View file @
9bcf5a2d
...
...
@@ -19,11 +19,11 @@
</button>
</ion-buttons>
</ion-navbar>
<ion-toolbar
class=
"fixed-toolbar"
>
<div
ion-fixed
class=
"tabs-fixed"
>
<ion-toolbar
class=
"fixed-toolbar
parent-toolbar
"
>
<div
ion-fixed
class=
"tabs-fixed
"
>
<div
class=
"scroll-tab"
>
<div
class=
"news-content"
>
<div
#
tabsParent
class=
"tabs-parent"
>
<div
#
tabsParent
class=
"tabs-parent
parent
"
>
<div
#
tabsChildren
*
ngFor=
"let item of tabsList;"
(
click
)="
changeParent
(
item
)"
class=
"tabs-children"
>
<span
#
tabSpan
[
style
.
color
]="
indexParent =
=
item
.
indexParent
?
'#
e12724
'
:
''"
>
{{item.name}}
</span>
</div>
...
...
src/pages/tabs/discover/discover.scss
View file @
9bcf5a2d
...
...
@@ -135,6 +135,9 @@ page-discover {
}
}
.parent-toolbar
{
margin-bottom
:
.5rem
;
}
.tabs-fixed
{
position
:
fixed
;
top
:
0px
;
...
...
@@ -146,6 +149,9 @@ page-discover {
.tabs-parent
{
background-color
:
#ffffff
;
}
.parent.tabs-parent
{
background-color
:
#fff1f0
;
}
}
.fixed-toolbar
{
...
...
@@ -161,4 +167,8 @@ page-discover {
.slide-zoom
{
text-align
:
left
;
}
//下拉刷新
ion-infinite-scroll
{
overflow
:
hidden
;
}
}
src/pages/tabs/discover/discover.ts
View file @
9bcf5a2d
...
...
@@ -153,6 +153,8 @@ export class DiscoverPage {
pageCount
=
AppGlobal
.
pageCount
;
loadMore
=
true
;
totalNum
;
pageNum
=
1
;
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
public
commonSer
:
CommonService
,
public
renderer
:
Renderer2
,
...
...
@@ -173,6 +175,8 @@ export class DiscoverPage {
//父级选择
changeParent
(
item
)
{
this
.
newsContent
.
nativeElement
.
scrollLeft
=
0
;
//二级菜单滑动重置
this
.
infiniteScrollContent
.
inf
.
enable
(
true
);
this
.
loadMore
=
true
;
const
index
=
item
.
indexParent
;
this
.
indexParent
=
index
;
...
...
@@ -188,7 +192,7 @@ export class DiscoverPage {
this
.
tips
.
nativeElement
.
style
.
left
=
itemWidth
*
(
index
)
+
(
itemWidth
-
spanWidth
)
/
2
+
'px'
;
const
data
=
{
pageSize
:
1
,
pageCount
:
100
,
pageCount
:
this
.
pageCount
,
obj
:
{
'plateType'
:
this
.
plateType
,
'resourceType'
:
1
...
...
@@ -211,9 +215,12 @@ export class DiscoverPage {
//子级选择
changeChildren
(
item
)
{
this
.
indexChildren
=
item
.
indexChildren
;
this
.
infiniteScrollContent
.
inf
.
enable
(
true
);
this
.
loadMore
=
true
;
const
data
=
{
pageSize
:
1
,
pageCount
:
100
,
pageCount
:
this
.
pageCount
,
obj
:
{
'plateType'
:
item
.
type
,
'resourceType'
:
1
...
...
@@ -227,6 +234,7 @@ export class DiscoverPage {
e
.
imgUrl
=
e
.
attachments
[
0
].
path
;
}
})
this
.
slideList
[
this
.
indexParent
]
=
this
.
newList
;
}
)
}
...
...
@@ -260,11 +268,39 @@ export class DiscoverPage {
//上拉加载
doInfinite
(
e
)
{
this
.
renderer
.
setStyle
(
this
.
infiniteScrollContentEle
.
nativeElement
,
'height'
,
'84px'
);
setTimeout
(()
=>
{
if
(
this
.
totalNum
<
this
.
slideList
[
this
.
toIndex
].
length
+
1
)
{
console
.
log
(
'没有数据了'
);
this
.
loadMore
=
false
;
e
.
enable
(
false
);
return
false
;
}
this
.
pageNum
++
;
const
data
=
{
pageNum
:
this
.
pageNum
,
pageCount
:
this
.
pageCount
,
obj
:
{
'plateType'
:
this
.
plateType
,
'resourceType'
:
1
}
};
this
.
renderer
.
setStyle
(
this
.
infiniteScrollContentEle
.
nativeElement
,
'height'
,
'60px'
);
this
.
tabsSer
.
stuffPage
(
data
).
subscribe
(
(
res
)
=>
{
let
arr
=
res
.
data
.
list
;
if
(
arr
.
length
>
0
)
{
arr
.
forEach
(
e
=>
{
if
(
e
.
attachments
.
length
>
0
)
{
e
.
imgUrl
=
e
.
attachments
[
0
].
path
;
}
this
.
slideList
[
this
.
toIndex
].
push
(
e
);
});
}
setTimeout
(()
=>
{
e
.
complete
();
this
.
renderer
.
setStyle
(
this
.
infiniteScrollContentEle
.
nativeElement
,
'height'
,
'0px'
);
},
1000
)
this
.
renderer
.
setStyle
(
this
.
infiniteScrollContentEle
.
nativeElement
,
'height'
,
'0px'
);
},
1000
)
}
)
}
...
...
src/pages/tabs/home/home.ts
View file @
9bcf5a2d
...
...
@@ -267,8 +267,6 @@ export class HomePage {
//上拉加载
doInfinite
(
e
)
{
console
.
log
(
this
.
totalNum
)
console
.
log
(
this
.
slideList
[
this
.
index
].
length
+
1
)
if
(
this
.
totalNum
<
this
.
slideList
[
this
.
index
].
length
+
1
)
{
console
.
log
(
'没有数据了'
);
this
.
loadMore
=
false
;
...
...
@@ -302,7 +300,6 @@ export class HomePage {
},
1000
)
}
)
}
//下拉刷新
...
...
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