Skip to content
Snippets Groups Projects
Commit 021a7009 authored by Pan's avatar Pan
Browse files

refine

parent 3063d9c8
No related branches found
No related tags found
No related merge requests found
......@@ -38,7 +38,7 @@
# 安装依赖
npm install
# 建议不要用cnpm 安装有各种诡异的bug 可以通过如下操作解决npm速度慢的问题
npm install --registry=https://registry.npm.taobao.org
......@@ -61,7 +61,7 @@
├── build // 构建相关
├── config // 配置相关
├── src // 源代码
│ ├── api // 所请求
│ ├── api // 所请求
│ ├── assets // 主题 字体等静态资源
│ ├── components // 全局公用组件
│ ├── directive // 全局指令
......
......@@ -7,7 +7,7 @@ export default function _fetch(options) {
return new Promise((resolve, reject) => {
const instance = axios.create({
baseURL: process.env.BASE_API,
// timeout: 2000,
// timeout: 2000,
headers: { 'X-Ivanka-Token': store.getters.token }
});
instance(options)
......@@ -20,15 +20,14 @@ export default function _fetch(options) {
type: 'error',
duration: 5 * 1000
});
// 50014:Token 过期了 50012:其他客户端登录了 50008:非法的token
// 50014:Token 过期了 50012:其他客户端登录了 50008:非法的token
if (res.code === 50008 || res.code === 50014 || res.code === 50012) {
Message({
message: res.message,
type: 'error',
duration: 5 * 1000
});
// router.push({path: '/'})
// TODO
// 登出
store.dispatch('FedLogOut').then(() => {
router.push({ path: '/login' })
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment