[FIX]修改AI权限获取逻辑

This commit is contained in:
huweihang
2025-12-23 18:01:18 +08:00
parent 3dc0bf3949
commit ce00a46869

View File

@@ -2259,15 +2259,13 @@ export default {
},
getAiPermission() {
apiCourse.listByUser({}).then(res => {
if (res && res.code === 200 && Array.isArray(res.data)) {
const index = res.data.findIndex(item => item.permissionCode === 'KjbAiSetCode');
console.log('res', res);
if(res.code === 200){
let index = res.data.findIndex(item => item.permissionCode === 'KjbAiSetCode');
this.aiPermission = index !== -1;
} else {
this.aiPermission = false;
console.log('index', index, this.aiPermission);
}
}).catch(() => {
this.aiPermission = false;
});
})
}
}
};
@@ -2669,12 +2667,6 @@ export default {
color: #000000;
}
.action-buttons {
display: flex;
gap: 10px;
margin-left: auto;
}
.tips {
color: #f56c6c;
font-size: 12px;