refactor(member page): extract global config getter method

extract repeated diyData.global access into a dedicated globalCfg computed property, simplify button visibility check logic
This commit is contained in:
2026-06-23 11:01:55 +08:00
parent b0dad04b59
commit 638406567d

View File

@@ -96,11 +96,14 @@ export default {
minHeight: this.openBottomNav ? 'calc(100vh - 55px)' : ''
};
},
globalCfg() {
return this.diyData?.global;
},
isShowCancelButton() {
return this.diyData?.global?.isShowCancelButton?.[`${this.getAppType()}`] === 1
return this.globalCfg?.isShowCancelButton?.[`${this.getAppType()}`] === 1
},
isShowLogoutButton() {
return this.diyData?.global?.isShowLogoutButton?.[`${this.getAppType()}`] === 1
return this.globalCfg?.isShowLogoutButton?.[`${this.getAppType()}`] === 1
}
},
onLoad() {