diff --git a/src/plugins/axios.js b/src/plugins/axios.js index e8d9970..6da1e85 100755 --- a/src/plugins/axios.js +++ b/src/plugins/axios.js @@ -2,6 +2,8 @@ import Vue from 'vue' import cookie from 'js-cookie' import cookieKeys from '@/const/cookie-keys' +const path = process.env.COOKIE_PATH + export default function(context) { let {$axios, store, app, redirect} = context @@ -34,7 +36,6 @@ export default function(context) { }) if (resp.status == 401) { - let path = process.env.COOKIE_PATH cookieKeys.forEach(key => { cookie.remove(key, {path}) })