fix redirect url by permission
This commit is contained in:
parent
aad739ce83
commit
5c3f5ebd94
1 changed files with 6 additions and 2 deletions
|
|
@ -86,7 +86,7 @@ async function getName() {
|
|||
* @param sys ระบบที่ต้องการเข้าถึง
|
||||
* @param url ลิงค์ของระบบที่ต้องการเข้าถึง
|
||||
*/
|
||||
async function goPage(sys: string, url: string) {
|
||||
async function goPage(sys: string, url: string, auto: boolean = false) {
|
||||
const token = await getCookie(cookieTokenName);
|
||||
const redirectUrl = (route.query.redirectUrl as string) ?? ""; // new
|
||||
|
||||
|
|
@ -124,6 +124,9 @@ async function goPage(sys: string, url: string) {
|
|||
}
|
||||
} else {
|
||||
// alert("คุณไม่มีสิทธิ์เข้าใช้งานระบบนี้");
|
||||
if (auto) {
|
||||
return (window.location.href = `${window.location.origin}${window.location.pathname}`);
|
||||
}
|
||||
$q.dialog({
|
||||
component: CustomComponent,
|
||||
componentProps: {
|
||||
|
|
@ -236,7 +239,8 @@ onMounted(async () => {
|
|||
? urlMgt
|
||||
: systemkey === "admin"
|
||||
? urlAdmin
|
||||
: ""
|
||||
: "",
|
||||
true
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue