diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..6c8115e6 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,15 @@ +{ + // 使用 IntelliSense 了解相关属性。 + // 悬停以查看现有属性的描述。 + // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "pwa-chrome", + "request": "launch", + "name": "Launch Chrome against localhost", + "url": "http://localhost:8080", + "webRoot": "${workspaceFolder}" + } + ] +} \ No newline at end of file diff --git a/src/AppConfig.js b/src/AppConfig.js index b4107e46..cd3aca3d 100644 --- a/src/AppConfig.js +++ b/src/AppConfig.js @@ -25,7 +25,7 @@ if (isDev) { } debugType = window.location.search.indexOf('debug=t') !== -1 ? 'teacher' : window.location.search.indexOf('debug=s') !== -1 ? 'student' : - window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'admin' + window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'student' } window._debugType = debugType; export function initAxiosInterceptors(props) { diff --git a/src/forge/DevOps/About.jsx b/src/forge/DevOps/About.jsx index 4831f73b..20c4d438 100644 --- a/src/forge/DevOps/About.jsx +++ b/src/forge/DevOps/About.jsx @@ -136,7 +136,7 @@ function About(props, ref) { params:{password:authorityVal} }).then(result=>{ setIsSpining(false); - if(result){ + if(result && result.data.status === 0){ setStep(result.data.step); } }).catch(error=>{setIsSpining(false)}); @@ -149,7 +149,10 @@ function About(props, ref) { axios.post(url).then(result=>{ setIsSpining(false); if(result && result.data.status === 0){ - props.history.push(`/${owner}/${projectsId}/devops`); + props.history.push({ + pathname: `/${owner}/${projectsId}/devops`, + state:{open_devops:true} + }); // 需要将顶部的open_devops修改 let { changeOpenDevops } = props; changeOpenDevops && changeOpenDevops(true); diff --git a/src/forge/DevOps/Index.jsx b/src/forge/DevOps/Index.jsx index 0bad039e..424a23c4 100644 --- a/src/forge/DevOps/Index.jsx +++ b/src/forge/DevOps/Index.jsx @@ -1,4 +1,4 @@ -import React , { useEffect } from 'react'; +import React from 'react'; import { WhiteBack } from '../Component/layout'; import './ops.scss'; diff --git a/src/forge/Server/data.jsx b/src/forge/Server/data.jsx index 5bf540cd..cb4ec497 100644 --- a/src/forge/Server/data.jsx +++ b/src/forge/Server/data.jsx @@ -20,7 +20,7 @@ function Data(props){ function onDetectionOk(){ - props.showNotification("扫描成功!"); + props.showNotification("新建分析成功,可在“检测状态”处查看扫描检测进度"); setDetectionVisible(false); setSpining(true); Init();