You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.2 KiB
52 lines
1.2 KiB
const App = getApp();
|
|
Component({
|
|
properties: {
|
|
isBack: {
|
|
type: Boolean,
|
|
default: false
|
|
},
|
|
text: {
|
|
type: String,
|
|
default: ""
|
|
}
|
|
},
|
|
|
|
data: {
|
|
statusHeight: 0,
|
|
navigationHeight: 0,
|
|
agencyName: '',
|
|
leftWidth: 0,
|
|
iconWidth: 0,
|
|
},
|
|
lifetimes: {
|
|
ready: function () {
|
|
this.setData({
|
|
statusHeight: App.globalData.deviceInfo.statusHeight,
|
|
navigationHeight: App.globalData.deviceInfo.navigationHeight,
|
|
agencyName: App.globalData.user.agencyName,
|
|
})
|
|
const menuButton = wx.getMenuButtonBoundingClientRect();
|
|
console.log(menuButton)
|
|
this.setData({
|
|
leftWidth: menuButton.left,
|
|
iconWidth: menuButton.width,
|
|
})
|
|
},
|
|
},
|
|
|
|
methods: {
|
|
back() {
|
|
wx.navigateBack({
|
|
delta: 1
|
|
})
|
|
},
|
|
getNavigationInfo: function () {
|
|
var that = this;
|
|
wx.getSystemInfo({
|
|
success (res) {
|
|
|
|
}
|
|
})
|
|
}
|
|
}
|
|
});
|
|
|