保誠-保戶業務員媒合平台
Mila
2022-01-11 9c74f31c6e41de2bb2f6175a290f42d91968844e
1
2
3
4
5
6
7
8
9
10
11
12
import { Middleware } from '@nuxt/types';
 
const getUrlQuery: Middleware = (context) => {
  const currentRouteName = context.route.name;
  const satisfactionIdFromMsg = context.route.query.appointmentId;
 
  if (currentRouteName === 'index' && satisfactionIdFromMsg) {
    context.store.commit('localStorage/storageSatisfactionIdFromMsg', satisfactionIdFromMsg);
  }
}
 
export default getUrlQuery