diff --git a/components/custom/check-action.vue b/components/custom/check-action.vue index fce9ad8..58e44b1 100644 --- a/components/custom/check-action.vue +++ b/components/custom/check-action.vue @@ -55,10 +55,19 @@ // beforeCreate() KO // beforeMount() mounted() OK created() { - //wyw 没有驳回接口 - // this.isBtnRefuseDisable = (this.__page__.options.refuseApi == null || this.__page__.options.refuseApi == - // undefined || this.__page__.options.refuseApi == 'undefined') ? true : false - this.localIsBtnRefuseDisable = (this.$route.query.refuseApi == null || this.$route.query.refuseApi == undefined || this.$route.query.refuseApi == 'undefined') ? true : false + if (this.refuseApi) { + this.localIsBtnRefuseDisable = false + } else { + const pages = getCurrentPages() + const currentPage = pages[pages.length - 1] + const query = currentPage.options || {} + this.localIsBtnRefuseDisable = !(query.refuseApi && query.refuseApi !== 'undefined') + } + }, + mounted() { + if (this.$route && this.$route.query) { + this.localIsBtnRefuseDisable = !(this.$route.query.refuseApi && this.$route.query.refuseApi !== 'undefined') + } }, watch: { isBtnRefuseDisable(newValue) {