diff --git a/README.md b/README.md
new file mode 100644
index 000000000..cc5d75f80
--- /dev/null
+++ b/README.md
@@ -0,0 +1,16 @@
+
前端react环境安装:
+1、 安装node v6.9.x;此安装包含了node和npm。
+2、 安装cnpm(命令行): npm install -g cnpm --registry=https://registry.npm.taobao.org
+3、 安装依赖的js库(public/react目录下<即项目package.json所在目录>,开启命令行): cnpm install
+4、 如果你的ruby服务使用的是3000端口,则需要在package.json中修改"port"参数的值
+5、 启动服务(命令行-目录同3): npm start
+6、 build初始化 npm run build
+
+
+分支信息:
+相关代码提交到对应分支,能上线的代码先提交到develop分支上测试版,测试通过后合并提交到master分支上线正式版
+master:开发环境(正式环境)
+develop:测试环境
+dev_local:本地版本
+dev_chain:含有区块链相关内容的分支
+PS:新增加的需求功能先新建新分支开发,在测试版测试没问题后再分别合并到develop和master分支
\ No newline at end of file
diff --git a/config/webpack.config.prod.js b/config/webpack.config.prod.js
index 5d71d6002..a7b2c9f4e 100644
--- a/config/webpack.config.prod.js
+++ b/config/webpack.config.prod.js
@@ -17,16 +17,7 @@ const OptimizeCSSAssetsPlugin = require("optimize-css-assets-webpack-plugin");
const paths = require("./paths");
const getClientEnvironment = require("./env");
-// Some apps do not use client-side routing with pushState.
-// For these, "homepage" can be set to "." to enable relative asset paths.
let publicPath = "/react/build/";
-// let nodeEnv = process.env.NODE_ENV
-// if (nodeEnv === 'testBuild') {
-// publicPath = 'https://testforgeplus.trustie.net/react/build/';
-// }
-// if (nodeEnv === 'production') {
-// publicPath = 'https://forgeplus.trustie.net/react/build/';
-// }
const publicUrl = publicPath.slice(0, -1);
const shouldUseSourceMap = process.env.GENERATE_SOURCEMAP !== "false";
const env = getClientEnvironment(publicPath);
diff --git a/src/forge/DevOps/About.jsx b/src/forge/DevOps/About.jsx
index ba4c7667a..82bee8e7b 100644
--- a/src/forge/DevOps/About.jsx
+++ b/src/forge/DevOps/About.jsx
@@ -173,8 +173,8 @@ function About(props, ref) {
定义DevOps工作流,帮助您检测bug、发布代码…
{
- CurrentLogin !== AuthorLogin && (step === undefined || (step && step < 1)) &&
- DevOps开启功能暂未对项目创建者以外的角色开放,可以联系项目创建者进行开启,开启后便可查看构建信息。
+ CurrentLogin !== AuthorLogin ?
+ DevOps开启功能暂未对项目创建者以外的角色开放,可以联系项目创建者进行开启,开启后便可查看构建信息。
:""
}
了解什么是DevOps?
diff --git a/src/forge/Main/Detail.js b/src/forge/Main/Detail.js
index baa6169dd..116ef2c35 100644
--- a/src/forge/Main/Detail.js
+++ b/src/forge/Main/Detail.js
@@ -10,17 +10,6 @@ import Loading from '../../Loading';
import axios from 'axios';
-import img_1 from '../Images/1.png';
-import img_2 from '../Images/2.png';
-import img_3 from '../Images/3.png';
-import img_6 from '../Images/6.png';
-import img_7 from '../Images/7.png';
-import img_parise from '../Images/parise.png';
-import img_focus from '../Images/focus.png';
-import img_parised from '../Images/parised.png';
-import img_focused from '../Images/focused.png';
-import img_fork from '../Images/fork.png';
-import img_milepost from '../Images/milepost.png';
const Setting = Loadable({
loader: () => import('../Settings/Index'),
loading: Loading,
@@ -125,9 +114,9 @@ const DevIndex = Loadable({
/**
* permission:Manager:管理员,Reporter:报告人员(只有读取权限),Developer:开发人员(除不能设置仓库信息外)
*/
-function checkPathname(pathname){
+function checkPathname(projectsId,owner,pathname){
let name = "";
- if(pathname){
+ if(pathname && pathname !== `/projects/${owner}/${projectsId}`){
if(pathname.indexOf("/about")>-1){
name="about"
}else if(pathname.indexOf("/issues")>-1 ||pathname.indexOf("Milepost") > 0){
@@ -140,7 +129,7 @@ function checkPathname(pathname){
name="activity"
}else if(pathname.indexOf("/setting")>-1){
name="setting"
- }else if(pathname.indexOf("/devops")>-1){
+ }else if(pathname.indexOf(`/devops`)>-1){
name="devops"
}
}
@@ -377,9 +366,9 @@ class Detail extends Component {
const url = this.props.history.location.pathname;
const urlArr = url.split("/");
const urlFlag = (urlArr.length === 3);
- let pathname = checkPathname(url);
const { projectsId , owner } = this.props.match.params;
+ let pathname = checkPathname(projectsId,owner,url);
const { state } = this.props.history.location;