chore: 修复可选链操作符和DNS管理插件问题

修复多处可选链操作符访问问题,避免潜在的空指针异常
优化DNS管理插件,移除重复的id字段并修正域名匹配逻辑
添加getDomainListPage方法以支持分页查询域名列表
This commit is contained in:
xiaojunnuo
2026-04-03 00:32:00 +08:00
parent 0fcd3c09fd
commit 6b29972399
5 changed files with 21 additions and 8 deletions
@@ -78,10 +78,10 @@ export default defineComponent({
async function emitValue(value) {
const userId = userStore.userInfo.id;
const isEnterprice = projectStore.isEnterprise;
if (pipeline.value) {
if (pipeline?.value) {
if (isEnterprice) {
const projectId = projectStore.currentProjectId;
if (pipeline.value.projectId !== projectId) {
if (pipeline?.value?.projectId !== projectId) {
message.error(`对不起,您不能修改其他项目流水线的授权`);
return;
}
@@ -136,7 +136,7 @@ async function emitValue(value: any) {
const isEnterprice = projectStore.isEnterprise;
if (isEnterprice) {
const projectId = projectStore.currentProjectId;
if (pipeline.value.projectId !== projectId) {
if (pipeline?.value?.projectId !== projectId) {
message.error(`对不起,您不能修改其他项目流水线的${props.addonType}设置`);
return;
}
@@ -136,12 +136,12 @@ async function emitValue(value: any) {
if (isEnterprice) {
const projectId = projectStore.currentProjectId;
if (pipeline.value.projectId !== projectId) {
if (pipeline?.value?.projectId !== projectId) {
message.error("对不起,您不能修改其他项目流水线的通知");
return;
}
} else {
if (pipeline.value.userId !== userId) {
if (pipeline?.value?.userId !== userId) {
message.error("对不起,您不能修改他人流水线的通知");
return;
}