Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
vue-flow-editor
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2023-12-04 10:20:55 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
7e6621a68f8d6999ed3faa4060c7a655210d23c4
7e6621a6
1 parent
77c7878b
fix 请求权限失效后处理优化
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
doc/App.vue
doc/axios.js
doc/App.vue
View file @
7e6621a
...
...
@@ -634,6 +634,8 @@ export default {
getVersionList(); // 刷新版本列表显示
}
}
} else {
state.reloadLoading = false;
}
}
getVersionList();
...
...
@@ -643,8 +645,8 @@ export default {
const getFlowData = async (flow_id: any) => {
flowData.value = null;
const { code, data } = await flowNodesAPI({ flow_id });
state.reloadLoading = false;
if (code) {
state.reloadLoading = false;
let { nodes, edges } = data;
// 没有流程图数据
if (!nodes.length && !edges.length) {
...
...
@@ -652,6 +654,8 @@ export default {
} else {
flowData.value = data; // 获取已存在的数据
}
} else {
state.reloadLoading = false;
}
}
...
...
doc/axios.js
View file @
7e6621a
/*
* @Date: 2023-10-27 11:12:24
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2023-12-0
3 18:13:32
* @LastEditTime: 2023-12-0
4 10:19:45
* @FilePath: /vue-flow-editor/doc/axios.js
* @Description: 文件描述
*/
...
...
@@ -58,7 +58,7 @@ axios.interceptors.response.use(
// 默认显示错误提示
// response.data.show = true;
if
(
response
.
data
.
msg
===
'登录失效'
)
{
// 某个请求的响应满足特定条件的情况下,取消【其他正在进行的请求】
//
TAG:
某个请求的响应满足特定条件的情况下,取消【其他正在进行的请求】
source
.
cancel
();
//
ElMessageBox
.
alert
(
'登录失效!将跳转到登录页面。'
,
'温馨提示'
,
{
...
...
@@ -78,7 +78,11 @@ axios.interceptors.response.use(
return
response
;
},
error
=>
{
if
(
axios
.
isCancel
(
error
))
{
// 取消请求的情况下,终端Promise调用链
return
new
Promise
(()
=>
{});
}
else
{
return
Promise
.
reject
(
error
);
}
});
export
default
axios
;
...
...
Please
register
or
login
to post a comment