根据您提供的代码片段,我注意到一些问题。首先,在workPlatform
和managePlatform
的定义中,字符串之间应该使用逗号(,
)进行分隔而不是点号(.
)。此外,缺少变量声明的结束分号。以下是修改后的代码:
const workPlatform = [
"MANAGER",
"OS MANAGER",
"AUTO DIALER",
"OS CUSTOMER OUERY",
"OS AUTO DIALER"
];
const managePlatform = [
'ADMIN',
'OS ADMIN'
];
// 内部账号权限控制选中文本复制
const CAN_NOT_COPY_WORK_PLATFORM = !canI('menu and operation clearance:working platform:all page:can copy') && !window.isOuterOperator;
const CAN_NOT_COPY_MANAGE_PLATFORM = !canI('menu and operation clearance:manage platform:all page:can copy') && !window.isOuterOperator;
if (CAN_NOT_COPY_WORK_PLATFORM && workPlatform.includes(window.currentModeCode)) {
ggNamespace.preventCopy();
}
if (CAN_NOT_COPY_MANAGE_PLATFORM && managePlatform.includes(window.currentModeCode)) {
ggNamespace.preventCopy();
}
// V3.7.24.2 新增 外部账户在所有平台都无法复制
if (window.isOuterOperator) {
ggNamespace.preventCopy();
}
请注意,以上代码只是对您提供的代码片段进行了修正,并假设其他函数和变量已被正确定义和引用。如果还有其他问题,请提供更多上下文或完整的代码,以便更好地帮助您。
内容由零声教学AI助手提供,问题来源于学员提问