mirror of
https://github.com/YMFE/yapi.git
synced 2024-12-09 05:00:30 +08:00
opti: 可以配置带basepath的环境
This commit is contained in:
parent
18afc492b9
commit
721207d58c
@ -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)
|
||||
});
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user