保誠-保戶業務員媒合平台
fixed: TODO#132493 客戶端-收到簡訊後進行滿意度評分, 未登入時導至登入畫面
修改1個檔案
4 ■■■■ 已變更過的檔案
PAMapp/middleware/getUrlQuery.ts 4 ●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
PAMapp/middleware/getUrlQuery.ts
@@ -3,9 +3,13 @@
const getUrlQuery: Middleware = (context) => {
  const currentRouteName = context.route.name;
  const satisfactionIdFromMsg = context.route.query.appointmentId;
  const isUserLogin = context.store.getters['localStorage/isUserLogin'];
  if (currentRouteName === 'index' && satisfactionIdFromMsg) {
    context.store.commit('localStorage/storageSatisfactionIdFromMsg', satisfactionIdFromMsg);
    if (!isUserLogin) {
      context.redirect('/login');
    }
  }
}