mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-24 02:02:53 +08:00
[FIX]修改AI权限获取逻辑
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user