From 27afef09e4fcae06c8220ed7bd3765117efd2038 Mon Sep 17 00:00:00 2001
From: Tomas <tomasysh@gmail.com>
Date: 星期五, 11 三月 2022 14:32:39 +0800
Subject: [PATCH] fix#134619: [ 顧問管理流程 ] 進入結案預約單明細,畫面往下拉重新整理後 , 畫面顯示 Not Found - 前端調整

---
 PAMapp/middleware/getUrlQuery.ts |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/PAMapp/middleware/getUrlQuery.ts b/PAMapp/middleware/getUrlQuery.ts
index e6ff3ee..5fb2841 100644
--- a/PAMapp/middleware/getUrlQuery.ts
+++ b/PAMapp/middleware/getUrlQuery.ts
@@ -3,10 +3,24 @@
 const getUrlQuery: Middleware = (context) => {
   const currentRouteName = context.route.name;
   const satisfactionIdFromMsg = context.route.query.appointmentId;
+  const queryNotContactAppointmentId = context.route.query.notContactAppointmentId;
+  const isUserLogin = context.store.getters['localStorage/isUserLogin'];
+
+  if (currentRouteName === 'index' && queryNotContactAppointmentId) {
+    context.store.commit('localStorage/storageNotContactAppointmentIdFromMsg', queryNotContactAppointmentId);
+    if (!isUserLogin) {
+      context.redirect('/login');
+    }
+  }
 
   if (currentRouteName === 'index' && satisfactionIdFromMsg) {
     context.store.commit('localStorage/storageSatisfactionIdFromMsg', satisfactionIdFromMsg);
+    if (!isUserLogin) {
+      context.redirect('/login');
+    }
   }
+
+
 }
 
-export default getUrlQuery
\ No newline at end of file
+export default getUrlQuery

--
Gitblit v1.9.3