优化token失效重新登录

This commit is contained in:
gaoxs
2020-06-03 20:12:00 +08:00
parent d7e0875381
commit 8267cbc18e
6 changed files with 80 additions and 77 deletions

View File

@ -29,7 +29,7 @@
import {
mapGetters
} from "vuex";
import toLogin from "@/libs/login";
import {handleLoginFailure} from "@/utils";
import {
couponReceiveBatch
} from "@/api/user";
@ -52,7 +52,7 @@
methods: {
checked() {
const isLogin = this.isLogin;
if (!isLogin) return toLogin();
if (!isLogin) return handleLoginFailure();
const ids = this.couponList.reduce((initial, coupon) => {
initial.push(coupon.id);