mirror of
https://github.com/chillzhuang/Saber.git
synced 2024-12-26 07:35:34 +08:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
61f880780b
7
build.sh
Executable file
7
build.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "打包文件"
|
||||
yarn build
|
||||
echo "传输文件"
|
||||
scp -r ./dist/** pig@139.224.200.249:/data/avue/sword
|
||||
echo "部署成功"
|
@ -9,7 +9,7 @@ export default {
|
||||
lockPage: '/lock',
|
||||
tokenTime: 6000,
|
||||
//http的status默认放行不才用统一处理的,
|
||||
statusWhiteList: [400],
|
||||
statusWhiteList: [],
|
||||
//配置首页不可关闭
|
||||
isFirstPage: false,
|
||||
fistPage: {
|
||||
|
@ -44,9 +44,9 @@ axios.interceptors.request.use(config => {
|
||||
//HTTPresponse拦截
|
||||
axios.interceptors.response.use(res => {
|
||||
NProgress.done();
|
||||
const status = Number(res.status) || 200;
|
||||
const status = res.data.code || 200
|
||||
const statusWhiteList = website.statusWhiteList || [];
|
||||
const message = res.data.message || '未知错误';
|
||||
const message = res.data.msg || '未知错误';
|
||||
//如果在白名单里则自行catch逻辑处理
|
||||
if (statusWhiteList.includes(status)) return Promise.reject(res);
|
||||
//如果是401则跳转到登录页面
|
||||
|
Loading…
Reference in New Issue
Block a user