Skip to content
This repository has been archived by the owner on Jul 18, 2019. It is now read-only.

Commit

Permalink
避免多次取值操作
Browse files Browse the repository at this point in the history
  • Loading branch information
Alvin-Liu committed Mar 1, 2019
1 parent af248c3 commit 862e115
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/plugins/axios.js
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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})
})
Expand Down

0 comments on commit 862e115

Please sign in to comment.