|
- const app = getApp()
-
- Component({
-
- properties: {
- background: {
- type: String,
- value: '#F4F5F9'
- },
- color: {
- type: String,
- value: '#000'
- },
- text: {
- type: String,
- value: 'Wechat'
- },
- back: {
- type: Boolean,
- value: false
- },
- home: {
- type: Boolean,
- value: false
- }
- },
-
- data: {
- statusBarHeight: app.statusBarHeight + 'px',
- navigationBarHeight: (app.statusBarHeight + 44) + 'px'
- },
- ready(){
- let pages = getCurrentPages();
- if (pages&&pages.length>0){
- this.setData({
- back:false
- })
- }
- },
- methods: {
- backHome: function () {
- wx.switchTab({
- url: '/pages/main/index',
- })
- },
- back: function () {
- wx.navigateBack({
- delta: 1
- })
- }
- }
- })
|