import { THIRD_PARTY_APP_LOGIN_INTERFACE } from '@/config/url-prefix'
import { API_TOKEN, API_TOKEN_KEY } from '@/store/utils/localStorageKeys'

export default {
  name: 'thirdPartyAppsProductList',
  type: 'path',
  match: [THIRD_PARTY_APP_LOGIN_INTERFACE],
  inAppArea: async function(app) {
    app.$store.dispatch('disableRouteCheck', true)
    localStorage.setItem(API_TOKEN_KEY, API_TOKEN)
  },
  outAppArea: function(app) {
    app.$store.dispatch('disableRouteCheck', false)
  },
}
