fix(front): route legacy jihua notifications to daka pages
Avoid dead links after jihua route cleanup by redirecting related notification actions to daka flows with safe fallback behavior. Made-with: Cursor
This commit is contained in:
@@ -119,12 +119,7 @@ const onClick = () => {
|
||||
case NotifyTypes.JihuaCreate:
|
||||
case NotifyTypes.JihuaUpdate:
|
||||
case NotifyTypes.TeacherCommentJihua:
|
||||
router.push(
|
||||
"/student/jihua/detail?id=" +
|
||||
jihua_id +
|
||||
"&from_tongzhi=1" +
|
||||
comment_param
|
||||
);
|
||||
router.push("/daka");
|
||||
break;
|
||||
case NotifyTypes.DakaCreate:
|
||||
case NotifyTypes.DakaUpdate:
|
||||
@@ -138,71 +133,61 @@ const onClick = () => {
|
||||
router.push("/daka");
|
||||
break;
|
||||
case NotifyTypes.TeacherCommentPiyue:
|
||||
if (jihua_id) {
|
||||
router.push(
|
||||
`/student/jihua/piyue?jihua_id=${jihua_id}&lianxi_id=${lianxi_id}${serial_param}${comment_param}&from_tongzhi=1`
|
||||
);
|
||||
} else if (daka_id) {
|
||||
if (daka_id) {
|
||||
router.push(
|
||||
`/daka/piyue?daka_id=${daka_id}&lianxi_id=${lianxi_id}${serial_param}${comment_param}&from_tongzhi=1`
|
||||
);
|
||||
} else {
|
||||
router.push("/daka");
|
||||
}
|
||||
break;
|
||||
case NotifyTypes.JihuaDelete:
|
||||
router.push("/student/jihua");
|
||||
router.push("/daka");
|
||||
break;
|
||||
case NotifyTypes.LianxiCreate:
|
||||
if (jihua_id) {
|
||||
router.push(
|
||||
`/teacher/jihua/piyue?jihua_id=${jihua_id}&lianxi_id=${lianxi_id}&from_tongzhi=1`
|
||||
);
|
||||
} else if (daka_id) {
|
||||
if (daka_id) {
|
||||
router.push(
|
||||
`/daka/piyue?daka_id=${daka_id}&lianxi_id=${lianxi_id}&from_tongzhi=1`
|
||||
);
|
||||
} else {
|
||||
router.push("/daka");
|
||||
}
|
||||
break;
|
||||
case NotifyTypes.LianxiDelete:
|
||||
if (jihua_id) {
|
||||
router.push(`/teacher/jihua/detail?id=${jihua_id}`);
|
||||
} else if (daka_id) {
|
||||
if (daka_id) {
|
||||
router.push(`/daka/detail?id=${daka_id}`);
|
||||
} else {
|
||||
router.push("/daka");
|
||||
}
|
||||
break;
|
||||
case NotifyTypes.StudentCommentJihua:
|
||||
router.push(`/teacher/jihua/detail?id=${jihua_id}${comment_param}`);
|
||||
router.push("/daka");
|
||||
break;
|
||||
case NotifyTypes.PiyueCreate:
|
||||
if (jihua_id) {
|
||||
router.push(
|
||||
`/student/jihua/piyue?jihua_id=${jihua_id}&lianxi_id=${lianxi_id}&from_tongzhi=1`
|
||||
);
|
||||
} else if (daka_id) {
|
||||
if (daka_id) {
|
||||
router.push(
|
||||
`/daka/piyue?daka_id=${daka_id}&lianxi_id=${lianxi_id}&from_tongzhi=1`
|
||||
);
|
||||
} else {
|
||||
router.push("/daka");
|
||||
}
|
||||
break;
|
||||
case NotifyTypes.StudentCommentPiyue:
|
||||
if (jihua_id) {
|
||||
router.push(
|
||||
`/teacher/jihua/piyue?jihua_id=${jihua_id}&lianxi_id=${lianxi_id}${serial_param}${comment_param}&from_tongzhi=1`
|
||||
);
|
||||
} else if (daka_id) {
|
||||
if (daka_id) {
|
||||
router.push(
|
||||
`/daka/piyue?daka_id=${daka_id}&lianxi_id=${lianxi_id}${serial_param}${comment_param}&from_tongzhi=1`
|
||||
);
|
||||
} else {
|
||||
router.push("/daka");
|
||||
}
|
||||
break;
|
||||
case NotifyTypes.ResourceNoteGroupCreate:
|
||||
if (jihua_id) {
|
||||
router.push(
|
||||
`/student/jihua/piyue?jihua_id=${jihua_id}&lianxi_id=${lianxi_id}${ref_param}&from_tongzhi=1`
|
||||
);
|
||||
} else if (daka_id) {
|
||||
if (daka_id) {
|
||||
router.push(
|
||||
`/daka/piyue?daka_id=${daka_id}&lianxi_id=${lianxi_id}${ref_param}&from_tongzhi=1`
|
||||
);
|
||||
} else {
|
||||
router.push("/daka");
|
||||
}
|
||||
break;
|
||||
case NotifyTypes.StudentRegister:
|
||||
@@ -290,12 +275,7 @@ const gotoDetail = () => {
|
||||
case NotifyTypes.JihuaCreate:
|
||||
case NotifyTypes.JihuaUpdate:
|
||||
case NotifyTypes.TeacherCommentJihua:
|
||||
router.push(
|
||||
"/student/jihua/detail?id=" +
|
||||
jihua_id +
|
||||
"&from_tongzhi=1" +
|
||||
comment_param
|
||||
);
|
||||
router.push("/daka");
|
||||
break;
|
||||
case NotifyTypes.DakaCreate:
|
||||
case NotifyTypes.DakaUpdate:
|
||||
@@ -309,71 +289,61 @@ const gotoDetail = () => {
|
||||
router.push("/daka");
|
||||
break;
|
||||
case NotifyTypes.TeacherCommentPiyue:
|
||||
if (jihua_id) {
|
||||
router.push(
|
||||
`/student/jihua/piyue?jihua_id=${jihua_id}&lianxi_id=${lianxi_id}${serial_param}${comment_param}&from_tongzhi=1`
|
||||
);
|
||||
} else if (daka_id) {
|
||||
if (daka_id) {
|
||||
router.push(
|
||||
`/daka/piyue?daka_id=${daka_id}&lianxi_id=${lianxi_id}${serial_param}${comment_param}&from_tongzhi=1`
|
||||
);
|
||||
} else {
|
||||
router.push("/daka");
|
||||
}
|
||||
break;
|
||||
case NotifyTypes.JihuaDelete:
|
||||
router.push("/student/jihua");
|
||||
router.push("/daka");
|
||||
break;
|
||||
case NotifyTypes.LianxiCreate:
|
||||
if (jihua_id) {
|
||||
router.push(
|
||||
`/teacher/jihua/piyue?jihua_id=${jihua_id}&lianxi_id=${lianxi_id}&from_tongzhi=1`
|
||||
);
|
||||
} else if (daka_id) {
|
||||
if (daka_id) {
|
||||
router.push(
|
||||
`/daka/piyue?daka_id=${daka_id}&lianxi_id=${lianxi_id}&from_tongzhi=1`
|
||||
);
|
||||
} else {
|
||||
router.push("/daka");
|
||||
}
|
||||
break;
|
||||
case NotifyTypes.LianxiDelete:
|
||||
if (jihua_id) {
|
||||
router.push(`/teacher/jihua/detail?id=${jihua_id}`);
|
||||
} else if (daka_id) {
|
||||
if (daka_id) {
|
||||
router.push(`/daka/detail?id=${daka_id}`);
|
||||
} else {
|
||||
router.push("/daka");
|
||||
}
|
||||
break;
|
||||
case NotifyTypes.StudentCommentJihua:
|
||||
router.push(`/teacher/jihua/detail?id=${jihua_id}${comment_param}`);
|
||||
router.push("/daka");
|
||||
break;
|
||||
case NotifyTypes.PiyueCreate:
|
||||
if (jihua_id) {
|
||||
router.push(
|
||||
`/student/jihua/piyue?jihua_id=${jihua_id}&lianxi_id=${lianxi_id}&from_tongzhi=1`
|
||||
);
|
||||
} else if (daka_id) {
|
||||
if (daka_id) {
|
||||
router.push(
|
||||
`/daka/piyue?daka_id=${daka_id}&lianxi_id=${lianxi_id}&from_tongzhi=1`
|
||||
);
|
||||
} else {
|
||||
router.push("/daka");
|
||||
}
|
||||
break;
|
||||
case NotifyTypes.StudentCommentPiyue:
|
||||
if (jihua_id) {
|
||||
router.push(
|
||||
`/teacher/jihua/piyue?jihua_id=${jihua_id}&lianxi_id=${lianxi_id}${serial_param}${comment_param}&from_tongzhi=1`
|
||||
);
|
||||
} else if (daka_id) {
|
||||
if (daka_id) {
|
||||
router.push(
|
||||
`/daka/piyue?daka_id=${daka_id}&lianxi_id=${lianxi_id}${serial_param}${comment_param}&from_tongzhi=1`
|
||||
);
|
||||
} else {
|
||||
router.push("/daka");
|
||||
}
|
||||
break;
|
||||
case NotifyTypes.ResourceNoteGroupCreate:
|
||||
if (jihua_id) {
|
||||
router.push(
|
||||
`/student/jihua/piyue?jihua_id=${jihua_id}&lianxi_id=${lianxi_id}${ref_param}&from_tongzhi=1`
|
||||
);
|
||||
} else if (daka_id) {
|
||||
if (daka_id) {
|
||||
router.push(
|
||||
`/daka/piyue?daka_id=${daka_id}&lianxi_id=${lianxi_id}${ref_param}&from_tongzhi=1`
|
||||
);
|
||||
} else {
|
||||
router.push("/daka");
|
||||
}
|
||||
break;
|
||||
case NotifyTypes.StudentRegister:
|
||||
|
||||
+21
-21
@@ -234,7 +234,7 @@ export default defineComponent({
|
||||
case NotifyTypes.JihuaCreate:
|
||||
case NotifyTypes.JihuaUpdate:
|
||||
case NotifyTypes.TeacherCommentJihua:
|
||||
await router.push("/student/jihua/detail?id=" + jihua_id + "&from_tongzhi=1" + comment_param);
|
||||
await router.push("/daka");
|
||||
break;
|
||||
case NotifyTypes.DakaCreate:
|
||||
case NotifyTypes.DakaUpdate:
|
||||
@@ -246,51 +246,51 @@ export default defineComponent({
|
||||
router.push("/daka");
|
||||
break;
|
||||
case NotifyTypes.TeacherCommentPiyue:
|
||||
if (jihua_id) {
|
||||
router.push(`/student/jihua/piyue?jihua_id=${jihua_id}&lianxi_id=${lianxi_id}${serial_param}${comment_param}&from_tongzhi=1`);
|
||||
} else if (daka_id) {
|
||||
if (daka_id) {
|
||||
router.push(`/daka/piyue?daka_id=${daka_id}&lianxi_id=${lianxi_id}${serial_param}${comment_param}&from_tongzhi=1`);
|
||||
} else {
|
||||
router.push("/daka");
|
||||
}
|
||||
break;
|
||||
case NotifyTypes.JihuaDelete:
|
||||
router.push("/student/jihua");
|
||||
router.push("/daka");
|
||||
break;
|
||||
case NotifyTypes.LianxiCreate:
|
||||
if (jihua_id) {
|
||||
router.push(`/teacher/jihua/piyue?jihua_id=${jihua_id}&lianxi_id=${lianxi_id}&from_tongzhi=1`);
|
||||
} else if (daka_id) {
|
||||
if (daka_id) {
|
||||
router.push(`/daka/piyue?daka_id=${daka_id}&lianxi_id=${lianxi_id}&from_tongzhi=1`);
|
||||
} else {
|
||||
router.push("/daka");
|
||||
}
|
||||
break;
|
||||
case NotifyTypes.LianxiDelete:
|
||||
if (jihua_id) {
|
||||
router.push(`/teacher/jihua/detail?id=${jihua_id}`);
|
||||
} else if (daka_id) {
|
||||
if (daka_id) {
|
||||
router.push(`/daka/detail?id=${daka_id}`);
|
||||
} else {
|
||||
router.push("/daka");
|
||||
}
|
||||
break;
|
||||
case NotifyTypes.StudentCommentJihua:
|
||||
router.push(`/teacher/jihua/detail?id=${jihua_id}${comment_param}`);
|
||||
router.push("/daka");
|
||||
break;
|
||||
case NotifyTypes.PiyueCreate:
|
||||
if (jihua_id) {
|
||||
router.push(`/student/jihua/piyue?jihua_id=${jihua_id}&lianxi_id=${lianxi_id}&from_tongzhi=1`);
|
||||
} else if (daka_id) {
|
||||
if (daka_id) {
|
||||
router.push(`/daka/piyue?daka_id=${daka_id}&lianxi_id=${lianxi_id}&from_tongzhi=1`);
|
||||
} else {
|
||||
router.push("/daka");
|
||||
}
|
||||
break;
|
||||
case NotifyTypes.StudentCommentPiyue:
|
||||
if (jihua_id) {
|
||||
router.push(`/teacher/jihua/piyue?jihua_id=${jihua_id}&lianxi_id=${lianxi_id}${serial_param}${comment_param}&from_tongzhi=1`);
|
||||
} else if (daka_id) {
|
||||
if (daka_id) {
|
||||
router.push(`/daka/piyue?daka_id=${daka_id}&lianxi_id=${lianxi_id}${serial_param}${comment_param}&from_tongzhi=1`);
|
||||
} else {
|
||||
router.push("/daka");
|
||||
}
|
||||
break;
|
||||
case NotifyTypes.ResourceNoteGroupCreate:
|
||||
if (jihua_id) {
|
||||
router.push(`/student/jihua/piyue?jihua_id=${jihua_id}&lianxi_id=${lianxi_id}${ref_param}&from_tongzhi=1`);
|
||||
} else if (daka_id) {
|
||||
if (daka_id) {
|
||||
router.push(`/daka/piyue?daka_id=${daka_id}&lianxi_id=${lianxi_id}${ref_param}&from_tongzhi=1`);
|
||||
} else {
|
||||
router.push("/daka");
|
||||
}
|
||||
break;
|
||||
case NotifyTypes.StudentRegister:
|
||||
|
||||
Reference in New Issue
Block a user