vue axios token过期 多次弹窗的问题

      if (retCode === '100014') {
        MessageBox.confirm(retDesc, '会话超时', {
          confirmButtonText: '确定',
          type: 'warning',
          showCancelButton: false,
          showClose: false,
          customClass: 'btn-center',
        }).then(() => {
            removeItemAll();
            const url = `${window.location.origin}/#/login`;
            console.log(url);
            window.location.href = url;
        }).catch(() => {
        });
      } else {
        throw new Error(error);
      }

你可能感兴趣的:(vue axios token过期 多次弹窗的问题)