mirror of
https://github.com/YMFE/yapi.git
synced 2025-01-18 13:04:46 +08:00
Merge branch 'dev' of gitlab.corp.qunar.com:mfe/yapi into dev
This commit is contained in:
commit
32f82bea43
@ -90,8 +90,8 @@ export default class Run extends Component {
|
||||
}) : 0;
|
||||
index = index === -1 ? 0 : index
|
||||
|
||||
let req_header = [].concat(this.props.data.req_headers);
|
||||
let header = [].concat(env[index].header);
|
||||
let req_header = [].concat((this.props.data.req_headers || []));
|
||||
let header = [].concat((env[index].header || []));
|
||||
header.forEach(item => {
|
||||
if (!checkNameIsExistInArray(item.name, req_header)) {
|
||||
item = {
|
||||
|
@ -72,7 +72,7 @@ class InterfaceEdit extends Component {
|
||||
//因后端 node 仅支持 ws, 暂不支持 wss
|
||||
let wsProtocol = location.protocol === 'https' ? 'ws' : 'ws';
|
||||
try {
|
||||
s = new WebSocket(wsProtocol + '://' + domain + '/api/interface/solve_conflict?id=' + this.props.match.params.actionId);
|
||||
s = new WebSocket(wsProtocol + '://dd' + domain + '/api/interface/solve_conflict?id=' + this.props.match.params.actionId);
|
||||
s.onopen = () => {
|
||||
this.WebSocket = s;
|
||||
}
|
||||
|
@ -17,13 +17,21 @@ const ContentTypeMap = {
|
||||
|
||||
async function httpRequestByNode(options) {
|
||||
function handleRes(response){
|
||||
if(!response || typeof response !== 'object'){
|
||||
return {
|
||||
res: {
|
||||
header: response.headers,
|
||||
status: response.status,
|
||||
body: response.data
|
||||
status: 500,
|
||||
body: '请求出错' + isNode ? ', 内网服务器自动化测试无法访问到,请检查是否为内网服务器!': ''
|
||||
}
|
||||
}
|
||||
}
|
||||
return {
|
||||
res: {
|
||||
header: response.headers,
|
||||
status: response.status,
|
||||
body: response.data
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function handleData(){
|
||||
|
Loading…
Reference in New Issue
Block a user