Merge pull request '退出登录之后不能导航' (#79) from xbx into master
Reviewed-on: http://git.luyuan.tk/luyuan/beelink/pulls/79
This commit is contained in:
commit
ca9b05cd9b
@ -5,6 +5,7 @@ import { getValue } from '@/utils/common';
|
|||||||
import { message } from 'ant-design-vue';
|
import { message } from 'ant-design-vue';
|
||||||
import router from '@/router';
|
import router from '@/router';
|
||||||
import { MessageType } from 'ant-design-vue/types/message';
|
import { MessageType } from 'ant-design-vue/types/message';
|
||||||
|
import store from '@/store';
|
||||||
|
|
||||||
// 泛型接口
|
// 泛型接口
|
||||||
export interface Get {
|
export interface Get {
|
||||||
@ -21,6 +22,7 @@ axios.interceptors.response.use((response)=>{
|
|||||||
login[0]();
|
login[0]();
|
||||||
login.splice(0,1);
|
login.splice(0,1);
|
||||||
if(response.data.code == 1001){
|
if(response.data.code == 1001){
|
||||||
|
store.commit("login", false)
|
||||||
router.push("/")
|
router.push("/")
|
||||||
}
|
}
|
||||||
return response;
|
return response;
|
||||||
|
@ -255,6 +255,9 @@ export default defineComponent({
|
|||||||
})
|
})
|
||||||
|
|
||||||
function navto(index: number | string){
|
function navto(index: number | string){
|
||||||
|
if(!store.state.islogin){
|
||||||
|
return ;
|
||||||
|
}
|
||||||
if(typeof index == "number"){
|
if(typeof index == "number"){
|
||||||
router.push({
|
router.push({
|
||||||
path: nav[index].route
|
path: nav[index].route
|
||||||
|
@ -270,6 +270,10 @@ export default defineComponent({
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
async function next(e: number) {
|
async function next(e: number) {
|
||||||
|
if(!ifagree.value){
|
||||||
|
message.error("请同意用户协议");
|
||||||
|
return ;
|
||||||
|
}
|
||||||
if (stepnow.value > e) {
|
if (stepnow.value > e) {
|
||||||
stepnow.value = e;
|
stepnow.value = e;
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user