mirror of
https://github.com/YMFE/yapi.git
synced 2025-03-07 14:16:52 +08:00
feat: 测试集合页面布局调整
This commit is contained in:
parent
bb9d313639
commit
5d697ce7ff
@ -127,9 +127,9 @@ class InterfaceColContent extends Component {
|
|||||||
status = 'ok';
|
status = 'ok';
|
||||||
} else if (result.code === 1) {
|
} else if (result.code === 1) {
|
||||||
status = 'invalid'
|
status = 'invalid'
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
status = 'error';
|
status = 'error';
|
||||||
result = e;
|
result = e;
|
||||||
}
|
}
|
||||||
this.reports[curitem._id] = result;
|
this.reports[curitem._id] = result;
|
||||||
@ -177,7 +177,7 @@ class InterfaceColContent extends Component {
|
|||||||
headers: that.getHeadersObj(interfaceData.req_headers),
|
headers: that.getHeadersObj(interfaceData.req_headers),
|
||||||
data: interfaceData.req_body_type === 'form' ? that.arrToObj(interfaceData.req_body_form) : interfaceData.req_body_other,
|
data: interfaceData.req_body_type === 'form' ? that.arrToObj(interfaceData.req_body_form) : interfaceData.req_body_other,
|
||||||
success: (res, header) => {
|
success: (res, header) => {
|
||||||
res = json_parse(res);
|
res = json_parse(res);
|
||||||
result.res_header = header;
|
result.res_header = header;
|
||||||
result.res_body = res;
|
result.res_body = res;
|
||||||
if (res && typeof res === 'object') {
|
if (res && typeof res === 'object') {
|
||||||
@ -206,7 +206,7 @@ class InterfaceColContent extends Component {
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
}
|
}
|
||||||
|
|
||||||
err = err || '请求异常';
|
err = err || '请求异常';
|
||||||
result.code = 400;
|
result.code = 400;
|
||||||
result.res_header = header;
|
result.res_header = header;
|
||||||
@ -442,7 +442,7 @@ class InterfaceColContent extends Component {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="interface-col">
|
<div className="interface-col">
|
||||||
<h2 style={{ marginBottom: '10px', display: 'inline-block' }}>测试集合 <a target="_blank" rel="noopener noreferrer" href="https://yapi.ymfe.org/case.html" >
|
<h2 className="interface-title" style={{ display: 'inline-block', margin: 0, marginBottom: '16px' }}>测试集合 <a target="_blank" rel="noopener noreferrer" href="https://yapi.ymfe.org/case.html" >
|
||||||
<Tooltip title="点击查看文档"><Icon type="question-circle-o" /></Tooltip>
|
<Tooltip title="点击查看文档"><Icon type="question-circle-o" /></Tooltip>
|
||||||
</a></h2>
|
</a></h2>
|
||||||
<Button type="primary" style={{ float: 'right' }} onClick={this.executeTests}>开始测试</Button>
|
<Button type="primary" style={{ float: 'right' }} onClick={this.executeTests}>开始测试</Button>
|
||||||
@ -478,4 +478,4 @@ class InterfaceColContent extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default InterfaceColContent
|
export default InterfaceColContent
|
||||||
|
@ -89,12 +89,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.interface-col{
|
.interface-col{
|
||||||
padding: 16px;
|
padding: 24px;
|
||||||
.interface-col-table-header{
|
.interface-col-table-header{
|
||||||
background-color: rgb(238, 238, 238);
|
background-color: rgb(238, 238, 238);
|
||||||
height: 50px;
|
height: 50px;
|
||||||
line-height: 50px;
|
line-height: 50px;
|
||||||
font-size:14px;
|
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user