|
@@ -27,27 +27,7 @@ Component({ |
|
@@ -27,27 +27,7 @@ Component({ |
|
27
|
},
|
27
|
},
|
|
28
|
|
28
|
|
|
29
|
attached(){
|
29
|
attached(){
|
|
30
|
- let disBack = false;
|
|
|
|
31
|
- let disHome = false;
|
|
|
|
32
|
- let pages = getCurrentPages();
|
|
|
|
33
|
- console.log('pages.length',pages[0]);
|
|
|
|
34
|
- if (pages.length > 1) {
|
|
|
|
35
|
- disBack = true;
|
|
|
|
36
|
- } else {
|
|
|
|
37
|
- //if (getApp().shareTicket && this.data.hasHome) {
|
|
|
|
38
|
- if (this.data.hasHome && pages[0].route!="pages/customer/list") {
|
|
|
|
39
|
- disHome = true;
|
|
|
|
40
|
- }
|
|
|
|
41
|
- }
|
|
|
|
42
|
- let wxBarHeight=68;
|
|
|
|
43
|
- let statusBarHeight=getApp().system.statusBarHeight*getApp().system.pixelRatio;
|
|
|
|
44
|
- this.setData({
|
|
|
|
45
|
- statusBarHeight: statusBarHeight,
|
|
|
|
46
|
- disHome: disHome,
|
|
|
|
47
|
- disBack: disBack,
|
|
|
|
48
|
- statusBarHeightFull:wxBarHeight + statusBarHeight,
|
|
|
|
49
|
- })
|
|
|
|
50
|
- console.log('this.setData',this.data);
|
30
|
+ this.init();
|
|
51
|
},
|
31
|
},
|
|
52
|
/**
|
32
|
/**
|
|
53
|
* 组件的方法列表
|
33
|
* 组件的方法列表
|
|
@@ -61,6 +41,33 @@ Component({ |
|
@@ -61,6 +41,33 @@ Component({ |
|
61
|
wx.reLaunch({
|
41
|
wx.reLaunch({
|
|
62
|
url:'/pages/customer/index'
|
42
|
url:'/pages/customer/index'
|
|
63
|
})
|
43
|
})
|
|
64
|
- }
|
44
|
+ },
|
|
|
|
45
|
+ init(){
|
|
|
|
46
|
+ let wxBarHeight=68;
|
|
|
|
47
|
+ let disBack = false;
|
|
|
|
48
|
+ let disHome = false;
|
|
|
|
49
|
+ let pages = getCurrentPages();
|
|
|
|
50
|
+ console.log('pages.length',pages[0]);
|
|
|
|
51
|
+ if (pages.length > 1) {
|
|
|
|
52
|
+ disBack = true;
|
|
|
|
53
|
+ } else {
|
|
|
|
54
|
+ //if (getApp().shareTicket && this.data.hasHome) {
|
|
|
|
55
|
+ if (this.data.hasHome && pages[0].route!="pages/customer/list") {
|
|
|
|
56
|
+ disHome = true;
|
|
|
|
57
|
+ }
|
|
|
|
58
|
+ }
|
|
|
|
59
|
+ let statusBarHeight=40;
|
|
|
|
60
|
+ if(getApp().system.system){
|
|
|
|
61
|
+ statusBarHeight=getApp().system.statusBarHeight
|
|
|
|
62
|
+ *(getApp().system.system.toLowerCase().indexOf('ios')>-1?2:getApp().system.pixelRatio);
|
|
|
|
63
|
+ }
|
|
|
|
64
|
+ this.setData({
|
|
|
|
65
|
+ statusBarHeight: statusBarHeight,
|
|
|
|
66
|
+ disHome: disHome,
|
|
|
|
67
|
+ disBack: disBack,
|
|
|
|
68
|
+ statusBarHeightFull:wxBarHeight + statusBarHeight,
|
|
|
|
69
|
+ })
|
|
|
|
70
|
+ console.log('this.setData',this.data);
|
|
|
|
71
|
+ },
|
|
65
|
}
|
72
|
}
|
|
66
|
}) |
73
|
}) |