diff --git a/common/js/golbalConfig.js b/common/js/golbalConfig.js index 02b4b18..6890626 100644 --- a/common/js/golbalConfig.js +++ b/common/js/golbalConfig.js @@ -1,3 +1,5 @@ +import { Platform } from './platform.js'; + // 内部 helper:获取当前页面实例 const _getCurrentPage = () => { const pages = getCurrentPages(); @@ -186,6 +188,13 @@ export default { } }, methods: { + /** + * 当前平台类型(多端翻译隔离) + * 复用 Platform.getAppType(),与服务端 /api/BaseApi 的 $app_type 对齐 + */ + getAppType() { + try { return Platform.getAppType() || '*'; } catch (e) { return '*'; } + }, // 颜色变浅(>0)、变深函数(<0) lightenDarkenColor(color, amount) { diff --git a/pages_tool/member/index.vue b/pages_tool/member/index.vue index bf3bd46..039c6ba 100644 --- a/pages_tool/member/index.vue +++ b/pages_tool/member/index.vue @@ -28,9 +28,9 @@ - {{ $lang('cancellation', '账号注销') }} - {{ $lang('logout', '退出登录') }} @@ -95,6 +95,12 @@ export default { backgroundColor: this.bgColor, minHeight: this.openBottomNav ? 'calc(100vh - 55px)' : '' }; + }, + isShowCancelButton() { + return this.diyData?.global?.isShowCancelButton[`${this.getAppType()}`] !== 0 + }, + isShowLogoutButton() { + return this.diyData?.global?.isShowLogoutButton[`${this.getAppType()}`] !== 0 } }, onLoad() {