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() { } } })