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
7b517dda
Commit
7b517dda
authored
Oct 24, 2019
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
1c62b3e3
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
221 additions
and
130 deletions
+221
-130
ionic.config.json
ionic.config.json
+6
-2
app.component.ts
src/app/app.component.ts
+0
-1
car-deal.html
src/pages/serve-pages/use-car/car-deal/car-deal.html
+2
-2
discover.html
src/pages/tabs/discover/discover.html
+1
-1
discover.scss
src/pages/tabs/discover/discover.scss
+0
-4
home.html
src/pages/tabs/home/home.html
+65
-70
home.scss
src/pages/tabs/home/home.scss
+103
-8
home.ts
src/pages/tabs/home/home.ts
+44
-42
No files found.
ionic.config.json
View file @
7b517dda
...
...
@@ -7,11 +7,15 @@
"proxies"
:
[
{
"path"
:
"/wisdomgroup"
,
"proxyUrl"
:
"http://
47.103.33.196:8080
/wisdomgroup"
"proxyUrl"
:
"http://
218.78.19.169:8081
/wisdomgroup"
},
{
"path"
:
"/logistics"
,
"proxyUrl"
:
"http://47.103.33.196:8080/logistics"
}
},
{
"path"
:
"/school"
,
"proxyUrl"
:
"http://10.10.200.172:8080/school"
}
]
}
src/app/app.component.ts
View file @
7b517dda
...
...
@@ -60,7 +60,6 @@ export class MyApp {
this
.
statusBar
.
backgroundColorByHexString
(
'#e12724'
);
this
.
statusBar
.
styleLightContent
();
timer
(
4500
).
subscribe
((
res
)
=>
{
this
.
showSplash
=
false
;
this
.
device
();
...
...
src/pages/serve-pages/use-car/car-deal/car-deal.html
View file @
7b517dda
...
...
@@ -47,10 +47,10 @@
</p>
<div
class=
"tag"
>
<span
class=
"green"
*
ngIf=
"item.applyStatus == 2"
>
通过
已
通过
</span>
<span
class=
"red"
*
ngIf=
"item.applyStatus == 3"
>
驳回
已
驳回
</span>
<span
class=
"gray"
*
ngIf=
"item.applyStatus == 4"
>
已过期
...
...
src/pages/tabs/discover/discover.html
View file @
7b517dda
...
...
@@ -54,7 +54,7 @@
<div
#
fixedTab
>
<div
class=
"fixed-toolbar parent-toolbar"
>
<div
class=
"tabs-fixed
"
>
<div
class=
"tabs-fixed"
>
<div
#
scrollTab
class=
"scroll-tab"
>
<div
#
newContentParent
(
scroll
)="
dragTo
($
event
)"
class=
"news-content parent"
>
<div
#
tabsParent
class=
"tabs-parent parent"
>
...
...
src/pages/tabs/discover/discover.scss
View file @
7b517dda
...
...
@@ -305,10 +305,6 @@ page-discover {
background-color
:
#fff1f0
;
}
.scroll-content
{
margin-bottom
:
50px
!
important
;
}
$slide-height
:
220px
;
.slides-content
{
...
...
src/pages/tabs/home/home.html
View file @
7b517dda
...
...
@@ -88,83 +88,78 @@
</span>
</div>
</div>
<
!--true 隐藏 false 显示--
>
<div
[
hidden
]="
isScroll
"
class=
"scroll-tab"
>
<span
class=
"more"
(
click
)="
moreTab
()
"
>
<ion-icon
style=
"vertical-align: super"
name=
"list"
></ion-icon
>
</span
>
<div
(
scroll
)="
dragTo
($
event
)"
class=
"news-content parent"
>
<div
#
tabsParent
class=
"tabs-parent parent"
>
<div
*
ngFor=
"let item of tabsList;let i = index"
(
click
)="
change
(
item
)"
class=
"tabs-children"
>
<span
#
tabSpan
[
ngClass
]="{'
selectTab
'
:index =
=
i
}"
>
{{item.name}}
</span
>
</div
>
<span
#
tips
class=
"tips"
></span>
</div
>
</div>
</div
>
<div
[
hidden
]="!
isScroll
"
class=
"scroll-tab"
>
<span
class=
"more"
(
click
)="
moreTab
()"
>
<
div
#
fixedTab
>
<!--true 隐藏 false 显示--
>
<div
class=
"fixed-toolbar parent-toolbar
"
>
<div
class=
"tabs-fixed "
>
<div
#
scrollTab
class=
"scroll-tab"
>
<div
#
newContentParent
(
scroll
)="
dragTo
($
event
)"
class=
"news-content parent"
>
<div
#
tabsParent
class=
"tabs-parent parent"
>
<div
#
tabsChildren
*
ngFor=
"let item of tabsList;"
(
click
)="
change
(
item
)"
class=
"tabs-children"
>
<span
#
tabSpan
[
style
.
color
]="
index =
=
item
.
index
?
'#
e12724
'
:
''"
>
{{item.name}}
</span
>
</div>
<span
#
tips
id=
"tips"
></span
>
</div>
</div
>
<span
class=
"more"
(
click
)="
moreTab
()"
>
<ion-icon
name=
"list"
></ion-icon>
</span>
<!--固定 false -->
<div
(
scroll
)="
dragTo
($
event
)"
ion-fixed
class=
"news-content ion-fixed parent"
>
<div
class=
"tabs-parent parent"
>
<div
*
ngFor=
"let item of tabsList;let i = index"
(
click
)="
change
(
item
)"
class=
"tabs-children"
>
<span
[
ngClass
]="{'
selectTab
'
:index =
=
i
}"
>
{{item.name}}
</span>
</div>
<span
#
tips1
class=
"tips"
></span>
</div>
</div>
</div>
<div
id=
"swiper-article"
class=
"swiper-container"
>
<div
class=
"swiper-wrapper"
>
<ng-container
*
ngIf=
"slidersItems.length > 0"
>
<div
[
style
.
top
]="
isScroll =
=
true
?'
50px
'
:
''"
class=
"swiper-slide"
*
ngFor=
"let item of slideList;let i = index;"
>
<ion-content>
<div
class=
"main-news"
>
<ng-container
*
ngFor=
"let new of item;"
>
<ng-container
*
ngIf=
"new.imgUrl"
>
<ion-row
class=
"news-item"
(
click
)="
goToDetail
(
new
)"
>
<ion-col
col-8
class=
"news-left"
>
<p
class=
"news-title"
>
{{new.title}}
<ion-icon
*
ngIf=
"new.topTime"
class=
"icon-fire iconfont"
></ion-icon>
</p>
<p
class=
"news-end"
>
<span>
{{new.source}}
</span>
<span>
{{new.publishTime | date:'yyyy-MM-dd'}}
</span>
</p>
</ion-col>
<ion-col
col-4
class=
"news-right"
>
<img
src=
"{{picture+new.imgUrl}}"
>
</ion-col>
</ion-row>
</ng-container>
<ng-container
*
ngIf=
"!new.imgUrl"
>
<ion-row
class=
"news-item"
(
click
)="
goToDetail
(
new
)"
>
<ion-col
col-12
class=
"news-left"
>
<p
class=
"news-title"
>
{{new.title}}
<ion-icon
*
ngIf=
"new.topTime"
class=
"icon-fire iconfont"
></ion-icon>
</p>
<p
class=
"news-end"
>
<span>
{{new.source}}
</span>
<span>
{{new.publishTime | date:'yyyy-MM-dd'}}
</span>
</p>
</ion-col>
</ion-row>
</ng-container>
</ng-container>
</div>
</ion-content>
</div>
</ng-container>
</div>
</div>
<ion-slides
(
ionSlideDidChange
)="
slideChanged
()"
[
loop
]="
false
"
>
<ng-container
*
ngFor=
"let item of slideList;let i = index;"
>
<ion-slide>
<ion-content>
<div
class=
"main-news"
>
<ng-container
*
ngFor=
"let new of item;"
>
<ng-container
*
ngIf=
"new.imgUrl"
>
<ion-row
class=
"news-item"
(
click
)="
goToDetail
(
new
)"
>
<ion-col
col-8
class=
"news-left"
>
<p
class=
"news-title"
>
{{new.title}}
<ion-icon
*
ngIf=
"new.topTime"
class=
"icon-fire iconfont"
></ion-icon>
</p>
<p
class=
"news-end"
>
<span>
{{new.source}}
</span>
<span>
{{new.publishTime | date:'yyyy-MM-dd'}}
</span>
</p>
</ion-col>
<ion-col
col-4
class=
"news-right"
>
<img
src=
"{{picture+new.imgUrl}}"
>
</ion-col>
</ion-row>
</ng-container>
<ng-container
*
ngIf=
"!new.imgUrl"
>
<ion-row
class=
"news-item"
(
click
)="
goToDetail
(
new
)"
>
<ion-col
col-12
class=
"news-left"
>
<p
class=
"news-title"
>
{{new.title}}
<ion-icon
*
ngIf=
"new.topTime"
class=
"icon-fire iconfont"
></ion-icon>
</p>
<p
class=
"news-end"
>
<span>
{{new.source}}
</span>
<span>
{{new.publishTime | date:'yyyy-MM-dd'}}
</span>
</p>
</ion-col>
</ion-row>
</ng-container>
</ng-container>
</div>
<ion-infinite-scroll
(
ionInfinite
)="
doInfinite
($
event
)"
>
<ion-infinite-scroll-content
loadingSpinner=
"bubbles"
loadingText=
"加载中"
></ion-infinite-scroll-content>
</ion-infinite-scroll>
</ion-content>
</ion-slide>
</ng-container>
</ion-slides>
</ion-content>
<!--政治生日-->
<div
*
ngIf=
"isBir"
class=
"signMask"
(
click
)="
closeBir
()"
>
...
...
src/pages/tabs/home/home.scss
View file @
7b517dda
...
...
@@ -176,11 +176,11 @@ page-home {
//新闻区
.main-news
{
padding
:
0
1rem
4
rem
1rem
;
padding
:
0
1rem
0
rem
1rem
;
text-align
:
left
;
.news-item
{
padding
:
.
2
rem
0
;
padding
:
.
8
rem
0
;
.news-left
{
display
:
flex
;
...
...
@@ -269,22 +269,101 @@ page-home {
.slide-zoom
{
text-align
:
left
;
height
:
100%
;
}
//下拉刷新
ion-infinite-scroll
{
overflow
:
hidden
;
.scroll-tab
{
overflow
:
initial
;
}
.scroll-tab
{
overflow
:
initial
;
}
$slide-height
:
220px
;
.slides-content
{
height
:
$slide-height
;
.swiper-slide
{
width
:
100%
;
height
:
$slide-height
;
background-color
:
#e42417
;
}
.swiper-wrapper
{
width
:
100%
;
height
:
$slide-height
;
}
.slide-image
{
vertical-align
:
middle
;
max-height
:
220px
;
}
.slide-zoom
{
text-align
:
center
;
max-height
:
100%
;
}
.swiper-container
{
height
:
$slide-height
;
width
:
100%
;
overflow-y
:
auto
;
}
}
.slides-title
{
margin-top
:
5px
;
color
:
#4c4c4c
;
width
:
100%
;
text-align
:
left
;
height
:
2rem
;
line-height
:
2rem
;
padding
:
0
1rem
;
font-size
:
1
.4rem
;
font-weight
:
500
;
position
:
relative
;
font-family
:
"Microsoft YaHei"
;
.slide-content
{
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
width
:
93%
;
}
.slide-index
{
position
:
absolute
;
top
:
2px
;
right
:
10px
;
color
:
#e42417
;
font-weight
:
400
;
span
:first-child
{
font-size
:
1
.8rem
;
}
span
:last-child
{
font-size
:
1
.5rem
;
}
}
}
.news-content
{
margin-top
:
1
.2rem
;
}
.tabs-fixed-scroll
{
position
:
absolute
;
z-index
:
999
;
-webkit-transform
:
translateZ
(
0
);
transform
:
translateZ
(
0
);
width
:
100%
;
.news-content
{
margin-top
:
0
;
transition
:
all
500ms
;
}
}
.slides-content
{
height
:
$slide-height
;
...
...
@@ -372,5 +451,21 @@ page-home {
transform
:
scale
(
0
.8
);
}
.swiper-slide
{
align-items
:
baseline
;
font-size
:
1
.4rem
;
overflow-y
:
auto
;
text-align
:
left
;
}
.slide-zoom
{
text-align
:
left
;
width
:
100%
;
height
:
100%
;
}
.scroll-content
{
margin-bottom
:
0
!
important
;
}
}
src/pages/tabs/home/home.ts
View file @
7b517dda
...
...
@@ -21,6 +21,7 @@ import {DatePipe} from "@angular/common";
import
{
SwiperComponent
}
from
"../../../components/swiper/swiper"
;
import
{
FilterComponent
}
from
"../../../components/filter/filter"
;
import
{
AppMainService
}
from
"../../../app/app.service"
;
import
{
timer
}
from
"rxjs/observable/timer"
;
declare
let
Swiper
:
any
;
...
...
@@ -32,18 +33,22 @@ declare let Swiper: any;
export
class
HomePage
{
@
ViewChild
(
Content
)
content
:
Content
;
@
ViewChild
(
Slides
)
slides
:
Slides
;
@
ViewChild
(
'tips'
)
tips
:
ElementRef
;
@
ViewChild
(
'tips1'
)
tips1
:
ElementRef
;
@
ViewChild
(
'verticaLamp'
)
verticaLamp
:
ElementRef
;
@
ViewChild
(
'tabsParent'
)
tabsParent
:
ElementRef
;
@
ViewChild
(
'fixedTab'
)
fixedTab
:
ElementRef
;
@
ViewChild
(
'topHeight'
)
topHeight
:
ElementRef
;
@
ViewChild
(
'tabsParent'
)
tabsParent
:
ElementRef
;
@
ViewChild
(
'tabsChildren'
)
tabsChildren
:
ElementRef
;
@
ViewChild
(
'tabSpan'
)
tabSpan
:
ElementRef
;
@
ViewChild
(
'newsContent'
)
newsContent
:
ElementRef
;
@
ViewChild
(
'newContentParent'
)
newContentParent
:
ElementRef
;
@
ViewChild
(
'scrollTab'
)
scrollTab
:
ElementRef
;
@
ViewChild
(
'verticaLamp'
)
verticaLamp
:
ElementRef
;
@
ViewChild
(
'headerTag'
)
headerTag
:
ElementRef
;
@
ViewChild
(
'homeMiddleTips'
)
homeMiddleTips
:
ElementRef
;
@
ViewChild
(
'infiniteScrollContentEle'
)
infiniteScrollContentEle
:
ElementRef
;
@
ViewChild
(
InfiniteScrollContent
)
InfiniteScrollContent
:
InfiniteScrollContent
;
swiperImg
;
swiperArticle
;
picture
:
string
=
AppGlobal
.
domain
+
'/wisdomgroup'
;
slideTitle
;
...
...
@@ -61,7 +66,6 @@ export class HomePage {
];
isSign
=
false
;
//签到弹窗
isBir
=
false
;
//政治生日弹窗
isScroll
=
false
;
//tabs置顶
noReadNum
;
initSlide
=
0
;
...
...
@@ -75,7 +79,7 @@ export class HomePage {
partyObj
;
//政治生日
plateType
;
index
=
0
;
index
;
slideList
=
[];
itemWidth
;
...
...
@@ -133,18 +137,23 @@ export class HomePage {
)
}
slideChanged
()
{
const
index
=
this
.
slides
.
realIndex
;
this
.
change
(
this
.
tabsList
[
index
]);
}
ionViewDidLoad
()
{
this
.
getBanner
();
const
htmlFontSize
=
getComputedStyle
(
window
.
document
.
documentElement
)[
'font-size'
];
this
.
itemWidth
=
htmlFontSize
.
split
(
"px"
)[
0
]
*
8
;
this
.
spanWidth
=
this
.
tabsParent
.
nativeElement
.
children
[
0
].
children
[
0
].
offsetWidth
;
//文字宽度
this
.
tips
.
nativeElement
.
style
.
width
=
this
.
spanWidth
+
'px'
;
this
.
tips1
.
nativeElement
.
style
.
width
=
this
.
spanWidth
+
'px'
;
this
.
getInfo
();
this
.
scrollHeight
();
this
.
change
(
this
.
tabsList
[
0
]);
this
.
initSwiper
();
timer
(
20
).
subscribe
(()
=>
{
const
htmlFontSize
=
getComputedStyle
(
window
.
document
.
documentElement
)[
'font-size'
];
this
.
itemWidth
=
htmlFontSize
.
split
(
"px"
)[
0
]
*
8
;
this
.
spanWidth
=
this
.
tabsParent
.
nativeElement
.
children
[
0
].
children
[
0
].
offsetWidth
;
//文字宽度
this
.
change
(
this
.
tabsList
[
0
]);
});
}
//初始化swiper
...
...
@@ -179,42 +188,30 @@ export class HomePage {
},
}
});
this
.
swiperArticle
=
new
Swiper
(
'#swiper-article'
,
{
slidesPerView
:
1
,
speed
:
1000
,
autoplay
:
false
,
//可选选项,自动滑动
observer
:
true
,
observeParents
:
true
,
observeSlideChildren
:
true
,
loop
:
false
,
on
:
{
slideChangeTransitionEnd
:
function
()
{
that
.
swiperArticle
.
update
();
that
.
change
(
that
.
tabsList
[
this
.
activeIndex
]);
},
}
})
}
//文章分类固定
scrollHeight
()
{
const
height
=
this
.
topHeight
.
nativeElement
.
offsetHeight
;
this
.
content
.
ionScroll
.
subscribe
((
$event
)
=>
{
this
.
zone
.
run
(()
=>
{
if
(
this
.
content
.
scrollTop
>
height
)
{
this
.
isScroll
=
true
;
this
.
renderer
.
addClass
(
this
.
fixedTab
.
nativeElement
,
'tabs-fixed-scroll'
)
}
else
{
this
.
isScroll
=
false
;
this
.
renderer
.
removeClass
(
this
.
fixedTab
.
nativeElement
,
'tabs-fixed-scroll'
)
}
})
})
}
change
(
item
)
{
this
.
pageNum
=
1
;
console
.
log
(
'213'
);
if
(
this
.
index
===
item
.
index
)
return
;
this
.
index
=
item
.
index
;
this
.
pageNum
=
1
;
this
.
tips
.
nativeElement
.
style
.
width
=
this
.
tabSpan
.
nativeElement
.
offsetWidth
+
'px'
;
// 自身div的一半 - 滑块的一半
this
.
tips
.
nativeElement
.
style
.
left
=
this
.
itemWidth
*
(
this
.
index
)
+
(
this
.
itemWidth
-
this
.
spanWidth
)
/
2
+
'px'
;
this
.
tips1
.
nativeElement
.
style
.
left
=
this
.
itemWidth
*
(
this
.
index
)
+
(
this
.
itemWidth
-
this
.
spanWidth
)
/
2
+
'px'
;
this
.
plateType
=
item
.
type
;
const
data
=
{
...
...
@@ -228,6 +225,7 @@ export class HomePage {
this
.
tabsSer
.
stuffPage
(
data
).
subscribe
(
(
res
)
=>
{
let
arr
=
res
.
data
.
list
;
this
.
total
=
res
.
data
.
total
;
if
(
arr
.
length
>
0
)
{
arr
.
forEach
(
e
=>
{
if
(
e
.
attachments
.
length
>
0
)
{
...
...
@@ -236,19 +234,23 @@ export class HomePage {
});
this
.
slideList
[
this
.
index
]
=
arr
;
}
if
(
this
.
swiperArticle
)
this
.
swiperArticle
.
slideTo
(
this
.
index
,
500
);
this
.
getMore
(
res
);
console
.
log
(
arr
);
this
.
slides
.
slideTo
(
this
.
index
,
500
);
}
)
}
//加载更多
getMore
(
res
)
{
const
totalNum
:
number
=
res
.
data
.
total
;
if
(
totalNum
<
this
.
pageSize
)
return
false
;
doInfinite
(
e
)
{
console
.
log
(
'doInfinite'
);
if
(
this
.
total
<
this
.
pageSize
||
this
.
total
==
this
.
pageSize
)
{
e
.
complete
();
return
false
;
}
this
.
pageNum
++
;
const
data
=
{
pageNum
:
1
,
pageCount
:
totalNum
,
pageNum
:
this
.
pageNum
,
pageCount
:
10
,
obj
:
{
'plateType'
:
this
.
plateType
,
'resourceType'
:
1
...
...
@@ -256,7 +258,8 @@ export class HomePage {
};
this
.
tabsSer
.
stuffPage
(
data
).
subscribe
(
(
res
)
=>
{
res
.
data
.
list
.
splice
(
0
,
10
);
e
.
complete
();
console
.
log
(
'e.complete();'
);
res
.
data
.
list
.
forEach
(
e
=>
{
if
(
e
.
attachments
.
length
>
0
)
{
e
.
imgUrl
=
e
.
attachments
[
0
].
path
;
...
...
@@ -419,7 +422,6 @@ export class HomePage {
this
.
slideList
[
this
.
index
]
=
arr
;
setTimeout
(()
=>
{
this
.
commonSer
.
toastTime
(
'刷新成功!'
,
800
);
this
.
getMore
(
res
);
e
.
complete
();
},
800
)
}
...
...
@@ -446,7 +448,7 @@ export class HomePage {
list
:
this
.
tabsList
,
type
:
this
.
plateType
,
title
:
'我的频道'
,
desc
:
'点击进入我的频道'
desc
:
'点击进入我的频道'
},
{
enterAnimation
:
'modal-from-right-enter'
,
leaveAnimation
:
'modal-from-right-leave'
...
...
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