mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-24 10:12:52 +08:00
[FIX]修改AI权限获取逻辑
This commit is contained in:
@@ -2259,15 +2259,13 @@ export default {
|
|||||||
},
|
},
|
||||||
getAiPermission() {
|
getAiPermission() {
|
||||||
apiCourse.listByUser({}).then(res => {
|
apiCourse.listByUser({}).then(res => {
|
||||||
if (res && res.code === 200 && Array.isArray(res.data)) {
|
console.log('res', res);
|
||||||
const index = res.data.findIndex(item => item.permissionCode === 'KjbAiSetCode');
|
if(res.code === 200){
|
||||||
|
let index = res.data.findIndex(item => item.permissionCode === 'KjbAiSetCode');
|
||||||
this.aiPermission = index !== -1;
|
this.aiPermission = index !== -1;
|
||||||
} else {
|
console.log('index', index, this.aiPermission);
|
||||||
this.aiPermission = false;
|
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
})
|
||||||
this.aiPermission = false;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -2669,12 +2667,6 @@ export default {
|
|||||||
color: #000000;
|
color: #000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.action-buttons {
|
|
||||||
display: flex;
|
|
||||||
gap: 10px;
|
|
||||||
margin-left: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tips {
|
.tips {
|
||||||
color: #f56c6c;
|
color: #f56c6c;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
|||||||
Reference in New Issue
Block a user