Commit 49f08228 authored by wangqinghua's avatar wangqinghua

初始化参数

parent c30415d5
...@@ -46,10 +46,13 @@ export class HairCutPage { ...@@ -46,10 +46,13 @@ export class HairCutPage {
private commonSer: CommonService, private appMainSer: AppMainService) { private commonSer: CommonService, private appMainSer: AppMainService) {
} }
ionViewDidEnter() {
this.myApply();
}
ionViewDidLoad() { ionViewDidLoad() {
this.selectDate = this.datePipe.transform(new Date(), 'yyyy-MM-dd'); this.selectDate = this.datePipe.transform(new Date(), 'yyyy-MM-dd');
this.getApply(); this.getApply();
this.myApply();
//获取权限 //获取权限
this.appMainSer.role.subscribe(value => { this.appMainSer.role.subscribe(value => {
...@@ -107,11 +110,11 @@ export class HairCutPage { ...@@ -107,11 +110,11 @@ export class HairCutPage {
//改变 //改变
change(type) { change(type) {
this.changeType = type; this.changeType = type;
if(this.changeType == 1) this.myApply(); if (this.changeType == 1) this.myApply();
if(this.changeType == 2) this.getApply(); if (this.changeType == 2) this.getApply();
} }
getDate(e){ getDate(e) {
this.selectDate = e; this.selectDate = e;
this.getApply(); this.getApply();
} }
...@@ -125,13 +128,13 @@ export class HairCutPage { ...@@ -125,13 +128,13 @@ export class HairCutPage {
//新增申请 //新增申请
goApply(item) { goApply(item) {
let data; let data;
if(item){ if (item) {
data = { data = {
date:this.selectDate, date: this.selectDate,
startEnd:item.startEnd startEnd: item.startEnd
} }
} }
this.navCtrl.push(HairApplyPage,{data:data}); this.navCtrl.push(HairApplyPage, {data: data});
} }
} }
...@@ -44,10 +44,13 @@ export class MeetRoomPage { ...@@ -44,10 +44,13 @@ export class MeetRoomPage {
private commonSer: CommonService, private appMainSer: AppMainService) { private commonSer: CommonService, private appMainSer: AppMainService) {
} }
ionViewDidEnter(){
this.myApply();
}
ionViewDidLoad() { ionViewDidLoad() {
this.selectDate = this.datePipe.transform(new Date(), 'yyyy-MM-dd'); this.selectDate = this.datePipe.transform(new Date(), 'yyyy-MM-dd');
this.getApply(); this.getApply();
this.myApply();
//获取权限 //获取权限
this.appMainSer.role.subscribe(value => { this.appMainSer.role.subscribe(value => {
......
...@@ -50,10 +50,13 @@ export class UseCarPage { ...@@ -50,10 +50,13 @@ export class UseCarPage {
private commonSer: CommonService, private appMainSer: AppMainService) { private commonSer: CommonService, private appMainSer: AppMainService) {
} }
ionViewDidEnter(){
this.myApply();
}
ionViewDidLoad() { ionViewDidLoad() {
this.selectDate = this.datePipe.transform(new Date(), 'yyyy-MM-dd'); this.selectDate = this.datePipe.transform(new Date(), 'yyyy-MM-dd');
this.getApply(); this.getApply();
this.myApply();
//获取权限 //获取权限
this.appMainSer.role.subscribe(value => { this.appMainSer.role.subscribe(value => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment