|
|
@@ -3,14 +3,23 @@ import "./indexBasicInfo.css";
|
|
|
import { Typography, Table, Button } from "antd";
|
|
|
|
|
|
const { Text, Title, Link } = Typography;
|
|
|
-
|
|
|
+function hasClass(para) {
|
|
|
+ let flag = false;
|
|
|
+ para.forEach((item) => {
|
|
|
+ if (item.children) {
|
|
|
+ flag = true;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return flag;
|
|
|
+}
|
|
|
class indexBasicInfo extends React.Component {
|
|
|
constructor(props) {
|
|
|
super(props);
|
|
|
// this.title = title[props.location.pathname];
|
|
|
}
|
|
|
render() {
|
|
|
- const apiUrl = this.props.location.state.apiurl;
|
|
|
+ const sdkurl = this.props.location.state.sdk_url;
|
|
|
+ const apiurl = this.props.location.state.apiurl;
|
|
|
const inputPara = this.props.location.state.inputpara.map((item, index) => {
|
|
|
return <Text key={index}>{item}</Text>;
|
|
|
});
|
|
|
@@ -32,6 +41,7 @@ class indexBasicInfo extends React.Component {
|
|
|
输出结果:
|
|
|
</Title>
|
|
|
<Table
|
|
|
+ className={{ "no-tab": hasClass(outPutList), "first-table": true }}
|
|
|
columns={columns}
|
|
|
dataSource={outPutList}
|
|
|
pagination={false}
|
|
|
@@ -39,7 +49,7 @@ class indexBasicInfo extends React.Component {
|
|
|
/>
|
|
|
</div>
|
|
|
<div>
|
|
|
- <Title className="stocks-title" level={5}>
|
|
|
+ <Title className={"stocks-title"} level={5}>
|
|
|
输出结果异常:
|
|
|
</Title>
|
|
|
<Table
|
|
|
@@ -55,7 +65,7 @@ class indexBasicInfo extends React.Component {
|
|
|
测试地址:
|
|
|
</Title>
|
|
|
<Button type="primary" className="stocks-button">
|
|
|
- <a href={apiUrl} target="_blank">
|
|
|
+ <a href={apiurl} target="_blank">
|
|
|
API测试工具
|
|
|
</a>
|
|
|
</Button>
|
|
|
@@ -64,7 +74,7 @@ class indexBasicInfo extends React.Component {
|
|
|
<Title className="stocks-title" level={5}>
|
|
|
SDK包:
|
|
|
</Title>
|
|
|
- <Link href="http://boniu.xazhima.com/sdk/index_any_day.sdk">php程序包下载</Link>
|
|
|
+ <Link href={sdkurl}>php程序包下载</Link>
|
|
|
</div>
|
|
|
</div>
|
|
|
);
|