opti: 可以配置带basepath的环境

This commit is contained in:
suxiaoxin 2017-09-14 13:53:22 +08:00
parent 18afc492b9
commit 721207d58c
2 changed files with 4 additions and 6 deletions

View File

@ -192,7 +192,7 @@ export default class Run extends Component {
const href = URL.format({
protocol: urlObj.protocol || 'http',
host: urlObj.host,
pathname: path,
pathname: urlObj.pathname? urlObj.pathname + path : path,
query: this.getQueryObj(query)
});

View File

@ -231,14 +231,14 @@ class ProjectMessage extends Component {
validator(rule, value, callback) {
if (value) {
if (value.length === 0) {
callback('请输入环境名');
callback('请输入环境');
} else if (!/\S/.test(value)) {
callback('请输入环境名');
callback('请输入环境');
} else {
return callback();
}
} else {
callback('请输入环境名');
callback('请输入环境');
}
}
}]
@ -266,8 +266,6 @@ class ProjectMessage extends Component {
callback('请输入环境域名!');
} else if (/\s/.test(value)) {
callback('环境域名不允许出现空格!');
} else if (/\//.test(value)) {
callback('环境域名不允许出现‘\/!');
} else {
return callback();
}