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.

65 lines
1.1 KiB

const app = getApp();
Component({
/**
* 组件的一些选项
*/
options: {
addGlobalClass: true,
multipleSlots: true
},
/**
* 组件的对外属性
*/
properties: {
bgColor: {
type: String,
default: ''
},
isCustom: {
type: [Boolean, String],
default: false
},
isBack: {
type: [Boolean, String],
default: false
},
bgImage: {
type: String,
default: ''
},
},
/**
* 组件的初始数据
*/
data: {
StatusBar: app.globalData.StatusBar,
CustomBar: app.globalData.CustomBar,
Custom: app.globalData.Custom
},
/**
* 组件的方法列表
*/
methods: {
BackPage() {
if (getCurrentPages().length == 1) {
this.toHome()
} else {
wx.navigateBack({
delta: 1
});
}
},
toHome() {
wx.reLaunch({
url: '/pages/mall/shops/index',
})
}
},
ready: function () {
this.setData({
StatusBar: app.globalData.StatusBar,
CustomBar: app.globalData.CustomBar,
Custom: app.globalData.Custom
})
}
})