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
9d4ae409
Commit
9d4ae409
authored
Aug 01, 2019
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分页参数修改
parent
89089c66
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
469 additions
and
63 deletions
+469
-63
search-new.ts
src/pages/home-pages/search-new/search-new.ts
+8
-7
car-apply.html
src/pages/serve-pages/use-car/car-apply/car-apply.html
+45
-0
car-apply.ts
src/pages/serve-pages/use-car/car-apply/car-apply.ts
+94
-3
use-car.html
src/pages/serve-pages/use-car/use-car.html
+42
-2
use-car.scss
src/pages/serve-pages/use-car/use-car.scss
+207
-0
use-car.ts
src/pages/serve-pages/use-car/use-car.ts
+49
-4
discover.html
src/pages/tabs/discover/discover.html
+1
-1
discover.scss
src/pages/tabs/discover/discover.scss
+1
-1
discover.ts
src/pages/tabs/discover/discover.ts
+17
-40
home.ts
src/pages/tabs/home/home.ts
+4
-4
key.html
src/pages/tabs/key/key.html
+1
-1
No files found.
src/pages/home-pages/search-new/search-new.ts
View file @
9d4ae409
...
@@ -11,18 +11,19 @@ import {AppGlobal} from "../../../service/http.service";
...
@@ -11,18 +11,19 @@ import {AppGlobal} from "../../../service/http.service";
templateUrl
:
'search-new.html'
,
templateUrl
:
'search-new.html'
,
})
})
export
class
SearchNewPage
{
export
class
SearchNewPage
{
@
ViewChild
(
InfiniteScrollContent
)
infiniteScrollContent
:
InfiniteScrollContent
;
@
ViewChild
(
InfiniteScrollContent
)
infiniteScrollContent
:
InfiniteScrollContent
;
picture
:
string
=
AppGlobal
.
domain
+
'/wisdomgroup'
;
picture
:
string
=
AppGlobal
.
domain
+
'/wisdomgroup'
;
newList
=
[];
newList
=
[];
pageNum
:
number
=
1
;
searchObj
=
{
searchObj
=
{
title
:
''
,
title
:
''
,
stuffType
:
null
,
//类型:(1图文,2视频)
stuffType
:
null
,
//类型:(1图文,2视频)
order
:
'desc'
,
//asc升序 desc 降序
order
:
'desc'
,
//asc升序 desc 降序
};
};
totalNum
:
number
;
pageNum
:
number
=
1
;
pageSize
=
AppGlobal
.
pageCount
;
totalNum
:
number
;
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
public
tabs
:
TabsService
)
{
public
tabs
:
TabsService
)
{
...
@@ -49,7 +50,7 @@ export class SearchNewPage {
...
@@ -49,7 +50,7 @@ export class SearchNewPage {
search
()
{
search
()
{
const
data
=
{
const
data
=
{
pageNum
:
1
,
pageNum
:
1
,
page
Count
:
10
,
page
Size
:
this
.
pageSize
,
isRecent
:
0
,
isRecent
:
0
,
obj
:
this
.
searchObj
,
obj
:
this
.
searchObj
,
};
};
...
@@ -78,15 +79,15 @@ export class SearchNewPage {
...
@@ -78,15 +79,15 @@ export class SearchNewPage {
//上拉加载
//上拉加载
doInfinite
(
e
)
{
doInfinite
(
e
)
{
if
(
this
.
totalNum
==
this
.
newList
.
length
)
{
if
(
this
.
totalNum
==
this
.
newList
.
length
)
{
console
.
log
(
'done'
)
console
.
log
(
'done'
)
e
.
enable
(
false
);
e
.
enable
(
false
);
return
false
;
return
false
;
}
}
this
.
pageNum
++
;
this
.
pageNum
++
;
const
data
=
{
const
data
=
{
pageNum
:
this
.
pageNum
,
pageNum
:
1
,
page
Count
:
10
,
page
Size
:
this
.
pageSize
,
isRecent
:
0
,
isRecent
:
0
,
obj
:
this
.
searchObj
,
obj
:
this
.
searchObj
,
};
};
...
...
src/pages/serve-pages/use-car/car-apply/car-apply.html
View file @
9d4ae409
...
@@ -8,5 +8,50 @@
...
@@ -8,5 +8,50 @@
<ion-content>
<ion-content>
<div
class=
"padding-6"
>
<ion-item>
<ion-item>
<ion-label
class=
"item-left"
>
用车时间:
</ion-label>
<ion-datetime
cancelText=
"取消"
doneText=
"确认"
displayFormat=
"YYYY-MM-DD HH:mm"
pickerFormat=
"YYYY MM DD HH mm"
placeholder=
"请选择"
[(
ngModel
)]="
obj
.
startTime
"
></ion-datetime>
</ion-item>
<ion-item>
<ion-label
class=
"item-left"
>
还车时间:
</ion-label>
<ion-datetime
cancelText=
"取消"
doneText=
"确认"
displayFormat=
"YYYY-MM-DD HH:mm"
pickerFormat=
"YYYY MM DD HH mm"
placeholder=
"请选择"
[(
ngModel
)]="
obj
.
endTime
"
></ion-datetime>
</ion-item>
<ion-item>
<ion-label
class=
"item-left"
>
用车人数:
</ion-label>
<ion-input
[(
ngModel
)]="
obj
.
passengerCount
"
type=
"text"
maxlength=
"20"
[
placeholder
]="
roomMax
"
></ion-input>
</ion-item>
<div
class=
"item-box"
>
<div
class=
"left"
>
使用人:
</div>
<div
class=
"right"
>
<button
color=
"danger"
ion-button
small
(
click
)="
choose
()"
>
选择
</button>
<div
class=
"div-tag"
>
<span
*
ngFor=
"let item of personList;let i = index"
>
{{item.userName}}
<ion-icon
(
click
)="
removePerson
(
i
)"
name=
"close"
></ion-icon>
</span>
</div>
</div>
</div>
<ion-label
class=
"item-left"
>
用车事由:
</ion-label>
<ion-select
[(
ngModel
)]="
obj
.
useReason
"
cancelText=
"取消"
okText=
"确定"
placeholder=
"请选择"
>
<ion-option
*
ngFor=
"let type of meetTypeList"
[
value
]="
type
.
id
"
>
{{type.name}}
</ion-option>
</ion-select>
</ion-item>
<div
class=
"item-box"
>
<div
class=
"left"
>
起讫地点:
</div>
<div
class=
"right"
>
<ion-textarea
[(
ngModel
)]="
obj
.
fromTo
"
></ion-textarea>
</div>
</div>
</div>
<button
class=
"submit-btn submit"
(
click
)="
submit
()"
>
提交
</button>
</ion-content>
</ion-content>
src/pages/serve-pages/use-car/car-apply/car-apply.ts
View file @
9d4ae409
import
{
Component
}
from
'@angular/core'
;
import
{
Component
}
from
'@angular/core'
;
import
{
IonicPage
,
NavController
,
NavParams
}
from
'ionic-angular'
;
import
{
IonicPage
,
ModalController
,
NavController
,
NavParams
}
from
'ionic-angular'
;
import
{
ServeService
}
from
"../../serve.service"
;
import
{
CommonService
}
from
"../../../../provide/common.service"
;
import
{
DatePipe
}
from
"@angular/common"
;
import
{
PersonMulComponent
}
from
"../../../../components/person-mul/person-mul"
;
@
Component
({
@
Component
({
...
@@ -8,11 +12,98 @@ import { IonicPage, NavController, NavParams } from 'ionic-angular';
...
@@ -8,11 +12,98 @@ import { IonicPage, NavController, NavParams } from 'ionic-angular';
})
})
export
class
CarApplyPage
{
export
class
CarApplyPage
{
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
)
{
obj
=
{
startTime
:
''
,
endTime
:
''
,
carUser
:
''
,
useReason
:
''
,
passengerCount
:
''
,
driverName
:
''
,
phone
:
''
,
};
meetTypeList
=
[
{
id
:
'1'
,
name
:
'工作会议'
},
{
id
:
'2'
,
name
:
'座谈会'
},
{
id
:
'3'
,
name
:
'中心组学习'
},
{
id
:
'4'
,
name
:
'访谈'
},
];
roomList
=
[];
orgList
=
[];
leaderList
=
[];
personList
=
[];
roomMax
=
'请输入参会人数'
;
//会议室最大人数
applyId
;
//是否编辑
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
private
serveSer
:
ServeService
,
public
modalCtrl
:
ModalController
,
private
commonSer
:
CommonService
,
private
datePipe
:
DatePipe
)
{
}
}
ionViewDidLoad
()
{
ionViewDidLoad
()
{
console
.
log
(
'ionViewDidLoad CarApplyPage'
);
this
.
getList
();
this
.
applyId
=
this
.
navParams
.
get
(
'id'
);
if
(
this
.
applyId
)
{
this
.
meetDetail
();
}
}
//会议详情
meetDetail
()
{
this
.
serveSer
.
meetDetail
(
this
.
applyId
).
subscribe
(
(
res
)
=>
{
if
(
res
)
{
console
.
log
(
this
.
obj
);
}
}
)
}
//会议室列表,部领导列表,处室列表
getList
()
{
this
.
serveSer
.
getLeaders
().
subscribe
(
(
res
)
=>
{
this
.
leaderList
=
res
.
data
;
}
);
this
.
serveSer
.
getRoomList
().
subscribe
(
(
res
)
=>
{
this
.
roomList
=
res
.
data
;
}
);
const
data
=
{
order
:
0
};
this
.
serveSer
.
getAllOrganization
(
data
).
subscribe
(
(
res
)
=>
{
this
.
orgList
=
res
;
}
)
}
//选择人员
choose
()
{
let
modal
=
this
.
modalCtrl
.
create
(
PersonMulComponent
,
{
enterAnimation
:
'modal-scale-enter'
,
leaveAnimation
:
'modal-scale-leave'
});
modal
.
onDidDismiss
(
data
=>
{
if
(
data
)
{
this
.
personList
=
data
;
}
});
modal
.
present
();
}
//移除人员
removePerson
(
index
)
{
console
.
log
(
index
);
this
.
personList
.
splice
(
index
,
1
);
}
submit
()
{
}
}
}
}
src/pages/serve-pages/use-car/use-car.html
View file @
9d4ae409
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<ion-navbar>
<ion-navbar>
<ion-title>
用车申请
</ion-title>
<ion-title>
用车申请
</ion-title>
<ion-buttons
end
>
<ion-buttons
end
>
<button
ion-button
(
click
)="
add
Meet
()"
>
<button
ion-button
(
click
)="
add
Apply
()"
>
<span
ion-text
style=
"font-size: 1.4rem"
class=
"color-fff margin-right-10"
>
申请用车
</span>
<span
ion-text
style=
"font-size: 1.4rem"
class=
"color-fff margin-right-10"
>
申请用车
</span>
</button>
</button>
</ion-buttons>
</ion-buttons>
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
<ion-content>
<ion-content>
<ion-content
direction=
"y"
scrollbar-y=
"true"
>
<ion-content
direction=
"y"
scrollbar-y=
"true"
class=
"bgc-e7e8ed"
>
<ng-container
*
ngIf=
"changeType == 1"
>
<ng-container
*
ngIf=
"changeType == 1"
>
<ion-calendar
[(
ngModel
)]="
date
"
<ion-calendar
[(
ngModel
)]="
date
"
(
onChange
)="
getApply
($
event
)"
(
onChange
)="
getApply
($
event
)"
...
@@ -80,6 +80,46 @@
...
@@ -80,6 +80,46 @@
</ng-container>
</ng-container>
<ng-container
*
ngIf=
"changeType == 2"
>
<ng-container
*
ngIf=
"changeType == 2"
>
<div
class=
"duty-content"
>
<div
class=
"duty-content"
>
<ion-list
class=
"myItem"
>
<ion-item-sliding
class=
"apply"
*
ngFor=
"let item of applyList"
>
<ion-item>
<p>
<span
*
ngIf=
"item.applyStatus == 1"
>
已申请
</span>
<span
*
ngIf=
"item.applyStatus == 2"
>
已通过
</span>
<span
*
ngIf=
"item.applyStatus == 3"
>
已驳回
</span>
<span
float-end
>
申请时间:
<span>
{{item.applyTime | date:'yyyy-MM-dd HH:mm'}}
</span>
</span>
</p>
<p>
<span
class=
"apply-room"
>
会议室:
<span>
{{item.roomName}}
</span>
</span>
<span
class=
"meet-type"
>
<span
*
ngIf=
"item.meetingType == 1"
>
工作会议
</span>
<span
*
ngIf=
"item.meetingType == 2"
>
座谈会
</span>
<span
*
ngIf=
"item.meetingType == 3"
>
中心组学习
</span>
<span
*
ngIf=
"item.meetingType == 4"
>
访谈
</span>
</span>
</p>
<p>
<span
class=
"order-time"
>
预定时间:
<span>
{{item.startTime | date:'yyyy-MM-dd HH:mm'}}
</span>
</span>
</p>
</ion-item>
<ion-item-options>
<button
ion-button
color=
"danger"
(
click
)="
removeItem
(
item
)"
>
删除
</button>
</ion-item-options>
</ion-item-sliding>
</ion-list>
<ion-list
text-center
style=
"margin-top: 10rem;color: #666666"
*
ngIf=
"!isLoad && applyList.length == 0"
>
<img
style=
"width: 20%;"
src=
"./assets/imgs/no-info.png"
alt=
""
>
<p
text-center
>
暂无预订
</p>
</ion-list>
</div>
</div>
</ng-container>
</ng-container>
</ion-content>
</ion-content>
...
...
src/pages/serve-pages/use-car/use-car.scss
View file @
9d4ae409
page-use-car
{
page-use-car
{
.list-ios
.item-block
.item-inner
{
border
:
none
;
}
.duty
{
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
center
;
height
:
36px
;
background-color
:
#fff
;
}
.duty-state
{
border
:
1px
solid
#f8ac56
;
font-size
:
1
.3rem
;
border-radius
:
4px
;
padding
:
1px
4px
;
color
:
#f8ac56
;
}
.duty
div
{
width
:
50%
;
text-align
:
center
;
position
:
relative
;
}
.duty-title
{
position
:
relative
;
color
:
#e42417
;
}
.
duty-title
:
:
after
{
content
:
''
;
position
:
absolute
;
width
:
100%
;
height
:
2px
;
background-color
:
#e42417
;
bottom
:
-10px
;
left
:
0px
;
}
.span-btn
{
background-color
:
#e42417
;
font-size
:
1
.4rem
;
padding
:
4px
6px
;
color
:
#fff
;
border-radius
:
3px
;
}
.dutyItem
>
div
{
margin-bottom
:
10px
;
}
.daySpan
{
padding
:
2px
20px
;
background-color
:
#e42417
;
color
:
#fff
;
border-bottom-right-radius
:
5px
;
}
.nightSpan
{
padding
:
4px
20px
;
background-color
:
#4e5e6f
;
color
:
#fff
;
border-bottom-right-radius
:
5px
;
}
.duty-Obj
.item-ios
p
{
margin-bottom
:
15px
;
}
.duty-Obj
.label-ios
{
margin
:
0
;
}
.duty-Obj
{
.item-ios.item-block
.item-inner
{
background-color
:
#f5f6f7
;
}
}
.room
{
padding
:
15px
;
background-color
:
#fff
;
}
.morning
,
.afternoon
{
display
:
flex
;
.morning-text
,
.afternoon-text
{
width
:
20%
;
display
:
flex
;
align-items
:
center
;
font-weight
:
bold
;
padding-left
:
15px
;
}
.morning-room
,
.morning-room
{
width
:
80%
;
padding
:
10px
5px
;
min-height
:
53px
;
span
{
display
:
inline-block
;
font-size
:
1
.2rem
;
background-color
:
#e42417
;
border
:
1px
solid
#e42417
;
border-radius
:
4px
;
color
:
#ffffff
;
padding
:
3px
6px
;
margin-bottom
:
8px
;
margin-right
:
5px
;
}
}
}
.morning
+
.afternoon
{
border-top
:
1px
solid
#cccccc
;
}
.already
,
.notYet
{
border
:
1px
solid
#dddddd
;
border-radius
:
3px
;
p
{
background-color
:
#fff1f0
;
color
:
#e42417
;
padding
:
6px
15px
;
}
}
.already
{
.morning
{
border-top-right-radius
:
8px
;
border-top-left-radius
:
8px
;
}
.afternoon
{
border-bottom-right-radius
:
8px
;
border-bottom-left-radius
:
8px
;
}
}
.notYet
{
margin-top
:
15px
;
.morning
,
.afternoon
{
.morning-room
{
span
{
background-color
:
#f2f2f2
;
border
:
1px
solid
#f2f2f2
;
color
:
#666666
;
}
}
}
}
.duty-content
{
padding
:
15px
;
ion-item
{
p
{
padding
:
0
10px
10px
10px
;
span
{
color
:
#333333
;
font-weight
:
500
;
span
{
color
:
#666666
;
font-weight
:
400
;
}
}
}
p
:first-child
{
border-bottom
:
1px
solid
#cccccc
;
margin-bottom
:
10px
;
}
}
}
.apply
{
font-size
:
1
.4rem
;
border-radius
:
5px
;
.apply-room
{
font-size
:
1
.4rem
;
}
.meet-type
{
font-size
:
1
.4rem
;
margin-left
:
20px
;
span
{
font-size
:
1
.4rem
;
}
}
.order-time
{
font-size
:
1
.4rem
;
}
}
.apply
+
.apply
{
margin-top
:
8px
;
}
.list-ios
.item-block
.item-inner
{
padding
:
0
;
}
}
}
src/pages/serve-pages/use-car/use-car.ts
View file @
9d4ae409
...
@@ -5,6 +5,9 @@ import {monthCh, weekDay} from "../../../app/main";
...
@@ -5,6 +5,9 @@ import {monthCh, weekDay} from "../../../app/main";
import
{
ServeService
}
from
"../serve.service"
;
import
{
ServeService
}
from
"../serve.service"
;
import
{
DatePipe
}
from
"@angular/common"
;
import
{
DatePipe
}
from
"@angular/common"
;
import
{
RoomApplyPage
}
from
"../meet-room/room-apply/room-apply"
;
import
{
RoomApplyPage
}
from
"../meet-room/room-apply/room-apply"
;
import
{
AppGlobal
}
from
"../../../service/http.service"
;
import
{
CommonService
}
from
"../../../provide/common.service"
;
import
{
CarApplyPage
}
from
"./car-apply/car-apply"
;
@
IonicPage
()
@
IonicPage
()
@
Component
({
@
Component
({
...
@@ -25,18 +28,27 @@ export class UseCarPage {
...
@@ -25,18 +28,27 @@ export class UseCarPage {
};
};
room
;
room
;
applyList
=
[];
pageNumber
=
1
;
pageSize
=
AppGlobal
.
pageCount
;
total
;
isLoad
=
true
;
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
private
serveSer
:
ServeService
,
public
datePipe
:
DatePipe
)
{
private
serveSer
:
ServeService
,
public
datePipe
:
DatePipe
,
private
commonSer
:
CommonService
)
{
}
}
ionViewDidEnter
()
{
ionViewDidEnter
()
{
const
date
=
this
.
datePipe
.
transform
(
new
Date
(),
'yyyy-MM-dd'
);
const
date
=
this
.
datePipe
.
transform
(
new
Date
(),
'yyyy-MM-dd'
);
this
.
getApply
(
date
);
this
.
getApply
(
date
);
this
.
myApply
();
}
}
//获取预定日程
getApply
(
date
)
{
getApply
(
date
)
{
const
data
=
{
'dateStr'
:
date
}
const
data
=
{
'dateStr'
:
date
}
;
this
.
serveSer
.
queryMeetingRoomByDate
(
data
).
subscribe
(
this
.
serveSer
.
queryMeetingRoomByDate
(
data
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
this
.
room
=
res
.
data
;
this
.
room
=
res
.
data
;
...
@@ -44,18 +56,51 @@ export class UseCarPage {
...
@@ -44,18 +56,51 @@ export class UseCarPage {
)
)
}
}
addMeet
()
{
//我的预定
this
.
navCtrl
.
push
(
RoomApplyPage
);
myApply
()
{
const
data
=
{
P_pageNumber
:
this
.
pageNumber
,
P_pageSize
:
this
.
pageSize
,
}
this
.
serveSer
.
queryMyApply
(
data
).
subscribe
(
(
res
)
=>
{
this
.
isLoad
=
false
;
this
.
applyList
=
res
.
list
;
this
.
total
=
res
.
total
;
}
)
}
//取消预定
removeItem
(
item
)
{
this
.
serveSer
.
cancelApply
(
item
.
id
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errcode
==
1000
)
{
this
.
commonSer
.
toast
(
'取消预定成功'
);
this
.
myApply
();
}
else
{
this
.
commonSer
.
toast
(
res
.
errmsg
);
}
}
)
}
//新增预定
addApply
()
{
this
.
navCtrl
.
push
(
CarApplyPage
);
}
}
//改变
change
(
type
)
{
change
(
type
)
{
this
.
changeType
=
type
;
this
.
changeType
=
type
;
}
}
//编辑申请
goApplyEdit
(
item
)
{
goApplyEdit
(
item
)
{
this
.
navCtrl
.
push
(
RoomApplyPage
,
{
id
:
item
.
applyId
});
this
.
navCtrl
.
push
(
RoomApplyPage
,
{
id
:
item
.
applyId
});
}
}
//新增申请
goApply
()
{
goApply
()
{
this
.
navCtrl
.
push
(
RoomApplyPage
);
this
.
navCtrl
.
push
(
RoomApplyPage
);
}
}
...
...
src/pages/tabs/discover/discover.html
View file @
9d4ae409
...
@@ -88,7 +88,7 @@
...
@@ -88,7 +88,7 @@
</div>
</div>
</div>
</div>
<ion-slides
#
contentSlides
>
<ion-slides
(
ionSlideDidChange
)="
slideChanged
()"
[
loop
]="
false
"
>
<ng-container
*
ngFor=
"let new of slideArr;let i = index;"
>
<ng-container
*
ngFor=
"let new of slideArr;let i = index;"
>
<ion-slide>
<ion-slide>
<ion-content>
<ion-content>
...
...
src/pages/tabs/discover/discover.scss
View file @
9d4ae409
...
@@ -75,7 +75,7 @@ page-discover {
...
@@ -75,7 +75,7 @@ page-discover {
//新闻区
//新闻区
.search-content
{
.search-content
{
padding
:
0
1rem
5rem
1rem
;
padding
:
0
1rem
0
1rem
;
.search-item
{
.search-item
{
padding
:
.8rem
0
;
padding
:
.8rem
0
;
...
...
src/pages/tabs/discover/discover.ts
View file @
9d4ae409
...
@@ -200,7 +200,7 @@ export class DiscoverPage {
...
@@ -200,7 +200,7 @@ export class DiscoverPage {
toIndex
;
toIndex
;
//分页
//分页
page
Count
=
AppGlobal
.
pageCount
;
page
Size
=
AppGlobal
.
pageCount
;
pageNum
=
1
;
pageNum
=
1
;
totalNum
;
//总条数
totalNum
;
//总条数
...
@@ -268,6 +268,7 @@ export class DiscoverPage {
...
@@ -268,6 +268,7 @@ export class DiscoverPage {
const
height
=
this
.
topHeight
.
nativeElement
.
offsetHeight
;
const
height
=
this
.
topHeight
.
nativeElement
.
offsetHeight
;
this
.
content
.
ionScroll
.
subscribe
((
$event
)
=>
{
this
.
content
.
ionScroll
.
subscribe
((
$event
)
=>
{
this
.
zone
.
run
(()
=>
{
this
.
zone
.
run
(()
=>
{
if
(
this
.
content
.
scrollTop
>
height
)
{
if
(
this
.
content
.
scrollTop
>
height
)
{
this
.
renderer
.
addClass
(
this
.
fixedTab
.
nativeElement
,
'tabs-fixed-scroll'
)
this
.
renderer
.
addClass
(
this
.
fixedTab
.
nativeElement
,
'tabs-fixed-scroll'
)
}
else
{
}
else
{
...
@@ -346,6 +347,13 @@ export class DiscoverPage {
...
@@ -346,6 +347,13 @@ export class DiscoverPage {
)
)
}
}
slideChanged
()
{
const
index
=
this
.
slides
.
realIndex
;
const
distance
=
index
*
this
.
itemWidth
/
2
;
//滑动的长度
this
.
newContentParent
.
nativeElement
.
scrollLeft
=
distance
;
this
.
changeParent
(
this
.
tabsList
[
index
]);
}
//父级选择
//父级选择
changeParent
(
item
)
{
changeParent
(
item
)
{
this
.
newsContent
.
nativeElement
.
scrollLeft
=
0
;
//二级菜单滑动重置
this
.
newsContent
.
nativeElement
.
scrollLeft
=
0
;
//二级菜单滑动重置
...
@@ -372,8 +380,8 @@ export class DiscoverPage {
...
@@ -372,8 +380,8 @@ export class DiscoverPage {
// 自身div的一半 - 滑块的一半
// 自身div的一半 - 滑块的一半
this
.
tips
.
nativeElement
.
style
.
left
=
this
.
itemWidth
*
(
this
.
indexParent
)
+
(
this
.
itemWidth
-
this
.
spanWidth
)
/
2
+
'px'
;
this
.
tips
.
nativeElement
.
style
.
left
=
this
.
itemWidth
*
(
this
.
indexParent
)
+
(
this
.
itemWidth
-
this
.
spanWidth
)
/
2
+
'px'
;
const
data
=
{
const
data
=
{
page
Size
:
1
,
page
Num
:
1
,
page
Count
:
this
.
pageCount
,
page
Size
:
this
.
pageSize
,
isRecent
:
this
.
isRecent
,
isRecent
:
this
.
isRecent
,
obj
:
{
obj
:
{
'plateType'
:
this
.
obj
.
plateType
,
'plateType'
:
this
.
obj
.
plateType
,
...
@@ -424,8 +432,8 @@ export class DiscoverPage {
...
@@ -424,8 +432,8 @@ export class DiscoverPage {
}
}
const
data
=
{
const
data
=
{
page
Size
:
1
,
page
Num
:
1
,
page
Count
:
this
.
pageCount
,
page
Size
:
this
.
pageSize
,
isRecent
:
this
.
isRecent
,
isRecent
:
this
.
isRecent
,
obj
:
{
obj
:
{
'plateType'
:
this
.
obj
.
plateType
,
'plateType'
:
this
.
obj
.
plateType
,
...
@@ -443,34 +451,6 @@ export class DiscoverPage {
...
@@ -443,34 +451,6 @@ export class DiscoverPage {
}
}
});
});
this
.
slideList
[
this
.
indexParent
]
=
this
.
newList
;
this
.
slideList
[
this
.
indexParent
]
=
this
.
newList
;
this
.
getMore
(
res
);
}
)
}
getMore
(
res
)
{
const
totalNum
:
number
=
res
.
data
.
total
;
if
(
totalNum
<
this
.
pageCount
)
return
false
;
const
data
=
{
pageNum
:
1
,
pageCount
:
totalNum
,
isRecent
:
this
.
isRecent
,
obj
:
{
'plateType'
:
this
.
obj
.
plateType
,
'resourceType'
:
this
.
resourceType
,
"relatePlateType"
:
this
.
relatePlateType
}
};
this
.
tabsSer
.
stuffPage
(
data
).
subscribe
(
(
res
)
=>
{
res
.
data
.
list
.
splice
(
0
,
10
);
res
.
data
.
list
.
forEach
(
e
=>
{
if
(
e
.
attachments
&&
e
.
attachments
.
length
>
0
)
{
e
.
path
=
e
.
attachments
[
0
].
path
;
e
.
resourceType
=
e
.
attachments
[
0
].
resourceType
;
}
this
.
slideList
[
this
.
indexParent
].
push
(
e
);
});
}
}
)
)
}
}
...
@@ -495,7 +475,7 @@ export class DiscoverPage {
...
@@ -495,7 +475,7 @@ export class DiscoverPage {
this
.
getBanner
();
this
.
getBanner
();
const
data
=
{
const
data
=
{
pageNum
:
1
,
pageNum
:
1
,
page
Count
:
this
.
pageCount
,
page
Size
:
this
.
pageSize
,
isRecent
:
this
.
isRecent
,
isRecent
:
this
.
isRecent
,
obj
:
{
obj
:
{
'plateType'
:
this
.
obj
.
plateType
,
'plateType'
:
this
.
obj
.
plateType
,
...
@@ -523,14 +503,15 @@ export class DiscoverPage {
...
@@ -523,14 +503,15 @@ export class DiscoverPage {
//上拉加载更多
//上拉加载更多
doInfinite
(
e
)
{
doInfinite
(
e
)
{
if
(
this
.
totalNum
==
this
.
slideList
[
this
.
indexParent
])
{
console
.
log
(
'doInfinite:'
+
this
.
slideList
[
this
.
indexParent
].
length
);
if
(
this
.
totalNum
==
this
.
slideList
[
this
.
indexParent
].
length
||
this
.
totalNum
<
this
.
slideList
[
this
.
indexParent
].
length
)
{
e
.
complete
();
e
.
complete
();
return
false
;
return
false
;
}
}
this
.
pageNum
++
;
this
.
pageNum
++
;
const
data
=
{
const
data
=
{
pageNum
:
this
.
pageNum
,
pageNum
:
this
.
pageNum
,
pageCount
:
this
.
page
Count
,
pageCount
:
this
.
page
Size
,
isRecent
:
this
.
isRecent
,
isRecent
:
this
.
isRecent
,
obj
:
{
obj
:
{
'plateType'
:
this
.
obj
.
plateType
,
'plateType'
:
this
.
obj
.
plateType
,
...
@@ -626,9 +607,5 @@ export class DiscoverPage {
...
@@ -626,9 +607,5 @@ export class DiscoverPage {
}
}
}
}
slideChanged
()
{
}
}
}
src/pages/tabs/home/home.ts
View file @
9d4ae409
...
@@ -72,7 +72,7 @@ export class HomePage {
...
@@ -72,7 +72,7 @@ export class HomePage {
pageNum
=
1
;
pageNum
=
1
;
page
Count
=
AppGlobal
.
pageCount
;
page
Size
=
AppGlobal
.
pageCount
;
mineInfo
;
mineInfo
;
username
;
username
;
...
@@ -209,7 +209,7 @@ export class HomePage {
...
@@ -209,7 +209,7 @@ export class HomePage {
this
.
plateType
=
item
.
type
;
this
.
plateType
=
item
.
type
;
const
data
=
{
const
data
=
{
pageNum
:
this
.
pageNum
,
pageNum
:
this
.
pageNum
,
page
Count
:
this
.
pageCount
,
page
Size
:
this
.
pageSize
,
obj
:
{
obj
:
{
'plateType'
:
this
.
plateType
,
'plateType'
:
this
.
plateType
,
'resourceType'
:
1
'resourceType'
:
1
...
@@ -235,7 +235,7 @@ export class HomePage {
...
@@ -235,7 +235,7 @@ export class HomePage {
//加载更多
//加载更多
getMore
(
res
)
{
getMore
(
res
)
{
const
totalNum
:
number
=
res
.
data
.
total
;
const
totalNum
:
number
=
res
.
data
.
total
;
if
(
totalNum
<
this
.
page
Count
)
return
false
;
if
(
totalNum
<
this
.
page
Size
)
return
false
;
const
data
=
{
const
data
=
{
pageNum
:
1
,
pageNum
:
1
,
pageCount
:
totalNum
,
pageCount
:
totalNum
,
...
@@ -390,7 +390,7 @@ export class HomePage {
...
@@ -390,7 +390,7 @@ export class HomePage {
this
.
getBanner
();
this
.
getBanner
();
const
data
=
{
const
data
=
{
pageNum
:
1
,
pageNum
:
1
,
page
Count
:
this
.
pageCount
,
page
Size
:
this
.
pageSize
,
obj
:
{
obj
:
{
'plateType'
:
this
.
plateType
,
'plateType'
:
this
.
plateType
,
'resourceType'
:
1
'resourceType'
:
1
...
...
src/pages/tabs/key/key.html
View file @
9d4ae409
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
</div>
</div>
</div>
</div>
<div
(
click
)="
goTo
('
LearningList
Page
')"
>
<div
(
click
)="
goTo
('
UseCar
Page
')"
>
<div
class=
"card"
>
<div
class=
"card"
>
<img
src=
"./assets/imgs/home/icon-ycsq.png"
>
<img
src=
"./assets/imgs/home/icon-ycsq.png"
>
<label
class=
"label2-2 more2-2"
>
用车申请
</label>
<label
class=
"label2-2 more2-2"
>
用车申请
</label>
...
...
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