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.
93 lines
1.8 KiB
93 lines
1.8 KiB
Component({
|
|
data: {
|
|
visible: false,
|
|
showCloseBtn: false,
|
|
buttonMsg: '',
|
|
rediType: '',
|
|
btnsList: []
|
|
},
|
|
properties: {
|
|
completeInfoDialogVisible: Boolean,
|
|
// completeInfoDialogVisible: {
|
|
// type: Boolean,
|
|
// value: false,
|
|
// observer(value) {
|
|
// this.setData({
|
|
// visible: value //!this.data.visible
|
|
// })
|
|
// }
|
|
// },
|
|
showCloseButton: {
|
|
type: Boolean,
|
|
value: false,
|
|
observer(value) {
|
|
this.setData({
|
|
showCloseBtn: !this.data.showCloseBtn
|
|
})
|
|
}
|
|
},
|
|
naviToPage: {
|
|
type: String,
|
|
value: ''
|
|
},
|
|
btns: {
|
|
type: Array,
|
|
value: [],
|
|
observer(value) {
|
|
this.setData({
|
|
btnsList: value
|
|
})
|
|
}
|
|
},
|
|
redirectType: {
|
|
type: String,
|
|
value: '',
|
|
observer(value) {
|
|
this.setData({
|
|
rediType: value
|
|
})
|
|
}
|
|
},
|
|
buttonMassage: {
|
|
type: String,
|
|
value: '',
|
|
observer(value) {
|
|
this.setData({
|
|
buttonMsg: value
|
|
})
|
|
}
|
|
}
|
|
},
|
|
lifetimes: {
|
|
attached: function () {
|
|
console.log('lifetimes attached')
|
|
}
|
|
},
|
|
methods: {
|
|
confirm: function (e) {
|
|
console.log(e.currentTarget.dataset.url)
|
|
if(this.data.rediType=='redi'){
|
|
wx.redirectTo({
|
|
url: e.currentTarget.dataset.url
|
|
})
|
|
}else{
|
|
wx.navigateTo({
|
|
url: e.currentTarget.dataset.url
|
|
})
|
|
}
|
|
|
|
this.setData({
|
|
visible: false
|
|
})
|
|
},
|
|
|
|
closeDialog() {
|
|
this.setData({
|
|
completeInfoDialogVisible: false
|
|
})
|
|
},
|
|
catchmove() {
|
|
|
|
}
|
|
}
|
|
})
|