"use strict"; Component({ data: { visible: false, showCloseBtn: false, buttonMsg: '', rediType: '', btnsList: [] }, properties: { completeInfoDialogVisible: Boolean, showCloseButton: { type: Boolean, value: false, observer: function (value) { this.setData({ showCloseBtn: !this.data.showCloseBtn }); } }, naviToPage: { type: String, value: '' }, btns: { type: Array, value: [], observer: function (value) { this.setData({ btnsList: value }); } }, redirectType: { type: String, value: '', observer: function (value) { this.setData({ rediType: value }); } }, buttonMassage: { type: String, value: '', observer: function (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: function () { this.setData({ completeInfoDialogVisible: false }); }, catchmove: function () { } } });