|
...
|
...
|
@@ -27,27 +27,7 @@ Component({ |
|
|
|
},
|
|
|
|
|
|
|
|
attached(){
|
|
|
|
let disBack = false;
|
|
|
|
let disHome = false;
|
|
|
|
let pages = getCurrentPages();
|
|
|
|
console.log('pages.length',pages[0]);
|
|
|
|
if (pages.length > 1) {
|
|
|
|
disBack = true;
|
|
|
|
} else {
|
|
|
|
//if (getApp().shareTicket && this.data.hasHome) {
|
|
|
|
if (this.data.hasHome && pages[0].route!="pages/customer/list") {
|
|
|
|
disHome = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
let wxBarHeight=68;
|
|
|
|
let statusBarHeight=getApp().system.statusBarHeight*getApp().system.pixelRatio;
|
|
|
|
this.setData({
|
|
|
|
statusBarHeight: statusBarHeight,
|
|
|
|
disHome: disHome,
|
|
|
|
disBack: disBack,
|
|
|
|
statusBarHeightFull:wxBarHeight + statusBarHeight,
|
|
|
|
})
|
|
|
|
console.log('this.setData',this.data);
|
|
|
|
this.init();
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
* 组件的方法列表
|
|
...
|
...
|
@@ -61,6 +41,33 @@ Component({ |
|
|
|
wx.reLaunch({
|
|
|
|
url:'/pages/customer/index'
|
|
|
|
})
|
|
|
|
}
|
|
|
|
},
|
|
|
|
init(){
|
|
|
|
let wxBarHeight=68;
|
|
|
|
let disBack = false;
|
|
|
|
let disHome = false;
|
|
|
|
let pages = getCurrentPages();
|
|
|
|
console.log('pages.length',pages[0]);
|
|
|
|
if (pages.length > 1) {
|
|
|
|
disBack = true;
|
|
|
|
} else {
|
|
|
|
//if (getApp().shareTicket && this.data.hasHome) {
|
|
|
|
if (this.data.hasHome && pages[0].route!="pages/customer/list") {
|
|
|
|
disHome = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
let statusBarHeight=40;
|
|
|
|
if(getApp().system.system){
|
|
|
|
statusBarHeight=getApp().system.statusBarHeight
|
|
|
|
*(getApp().system.system.toLowerCase().indexOf('ios')>-1?2:getApp().system.pixelRatio);
|
|
|
|
}
|
|
|
|
this.setData({
|
|
|
|
statusBarHeight: statusBarHeight,
|
|
|
|
disHome: disHome,
|
|
|
|
disBack: disBack,
|
|
|
|
statusBarHeightFull:wxBarHeight + statusBarHeight,
|
|
|
|
})
|
|
|
|
console.log('this.setData',this.data);
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}) |
...
|
...
|
|