解决token过期返回登录页面

This commit is contained in:
red-deng-deng 2021-11-28 17:28:23 +08:00
parent 83c88dd80e
commit 5bd39bab98
1 changed files with 5 additions and 2 deletions

View File

@ -228,7 +228,7 @@
created() { created() {
this.bgcolor = sessionStorage.getItem('bcolor'); this.bgcolor = sessionStorage.getItem('bcolor');
this.topImg = sessionStorage.getItem('top_img'); this.topImg = sessionStorage.getItem('top_img');
// this.layout = sessionStorage.getItem('showTyle'); this.layout = sessionStorage.getItem('showTyle');
this.getGoods(); this.getGoods();
}, },
methods: { methods: {
@ -279,7 +279,10 @@
self.popboxshow = true; self.popboxshow = true;
self.tiptext = res.message; self.tiptext = res.message;
} }
}).catch(err => {}); }).catch(err => {
window.location.href="./index.html";
sessionStorage.clear();
});
}, },
//选择商品点击兑换 //选择商品点击兑换
exchangeBtn(row = this.exchangeCommity) { exchangeBtn(row = this.exchangeCommity) {