mirror of
https://github.com/YMFE/yapi.git
synced 2024-12-21 05:19:42 +08:00
fix: postman basepath bug
This commit is contained in:
parent
9eb2feea7f
commit
bbe917ffa5
@ -202,11 +202,16 @@ export default class Run extends Component {
|
||||
pathParam.forEach(item => {
|
||||
path = path.replace(`:${item.name}`, item.value || `:${item.name}`);
|
||||
});
|
||||
if(urlObj.pathname){
|
||||
if(urlObj.pathname[urlObj.pathname.length - 1] !== '/'){
|
||||
urlObj.pathname += '/'
|
||||
}
|
||||
}
|
||||
|
||||
const href = URL.format({
|
||||
protocol: urlObj.protocol || 'http',
|
||||
host: urlObj.host,
|
||||
pathname: urlObj.pathname ? URL.resolve(urlObj.pathname, path) : path,
|
||||
pathname: urlObj.pathname ? URL.resolve(urlObj.pathname, '.' + path) : path,
|
||||
query: this.getQueryObj(query)
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user