Procházet zdrojové kódy

修改认领显示逻辑

master
王饶冀 před 3 roky
rodič
revize
b0a9f72c90

+ 13
- 8
digital-park-web/digital-park/src/views/park-enterprises/Detail.vue Zobrazit soubor

</template> </template>
<span <span
class="pointer" class="pointer"
v-if="
!canEdit &&
companyInfo.claimState.text === '未认领' &&
!(currentAccount && currentAccount.claimCompany)
"
v-if="isShowSetClaim()"
@click="setClaimDialog" @click="setClaimDialog"
> >
<img src="@assets/image/company/icon_claim.png" alt="认领" /> <img src="@assets/image/company/icon_claim.png" alt="认领" />
}); });
// location.href = `#content${this.activeTab}`; // location.href = `#content${this.activeTab}`;
}, },

// 是否显示认领按钮
isShowSetClaim(){
// 默认不显示
let flag = false;
// console.log(this.currentAccount, "this.currentAccount");
if(this.companyInfo && this.companyInfo.claimState && this.companyInfo.claimState.text == '未认领'){
flag = true;
}
return flag;
},
getData() { getData() {
let params = { let params = {
companyId: this.companyId, companyId: this.companyId,
}, },
setClaimDialog() { setClaimDialog() {
// 是否登录 // 是否登录
console.log(this.currentAccount, "this.currentAccount");
// console.log(this.currentAccount, "this.currentAccount");
if (!this.currentAccount) { if (!this.currentAccount) {
this.$router.push("/login"); this.$router.push("/login");
} }
}, },
//生命周期 - 挂载完成(可以访问DOM元素) //生命周期 - 挂载完成(可以访问DOM元素)
mounted() { mounted() {
console.log(this.currentAccount, "this.currentAccount");
// console.log(this.currentAccount, "this.currentAccount");
}, },
}; };
</script> </script>

Načítá se…
Zrušit
Uložit