Browse Source

Merge branch 'master' of http://121.40.40.223:3000/zizhong.wang/boniuApi

cl 4 years ago
parent
commit
d3514c15af

+ 3 - 0
boniu/src/components/Overview/overview.css

@@ -15,3 +15,6 @@
 .margin-top-20 {
     margin-top: 1.2em;
 }
+.err-table .ant-table-cell {
+  padding-left: 0 !important;
+}

File diff suppressed because it is too large
+ 5 - 5
boniu/src/components/Overview/overview.jsx


+ 26 - 0
boniu/src/components/StocksInfo/stocksInfo.css

@@ -12,3 +12,29 @@
   border-radius: 3px;
   background-color: #00c0ff;
 }
+.ant-table-cell {
+  padding-left: 25px !important;
+}
+
+.no-tab .ant-table-cell {
+  padding-left: 0 !important;
+}
+
+.ant-table-thead .ant-table-cell:nth-child(1) {
+  padding-left: 25px !important;
+}
+.first-table tr {
+  display: flex;
+}
+.first-table .ant-table-cell:nth-child(1) {
+  flex: 2;
+}
+.first-table .ant-table-cell:nth-child(2) {
+  flex: 1;
+}
+.second-table tr {
+  display: flex;
+}
+.second-table .ant-table-cell {
+  flex: 1;
+}

+ 15 - 5
boniu/src/components/StocksInfo/stocksInfo.jsx

@@ -12,9 +12,20 @@ const StocksInfo = (props) => {
   const paramsInfo = props.location.state.data.paramsInfo
   const url = props.location.state.data.url
   const download = props.location.state.data.download
+
+  const hasClass = () => {
+    let flag = false
+    outPutList.forEach(item => {
+      if (item.children) {
+        flag = true
+      }
+    })
+    return flag
+  }
+
   return (
     <div>
-      <Title level={4}>{title}</Title>
+      <Title level={3}>{title}</Title>
       <div>
         <Title className="stocks-title" level={5}>
           输入参数:
@@ -34,13 +45,11 @@ const StocksInfo = (props) => {
         </div>
       </div>
       <div>
-        <Title className="stocks-title" level={5}>
-          输出结果:
-        </Title>
+        <Title className="stocks-title" level={5}>输出结果:</Title>
         {/* 这里需要二级表格 */}
         <Table
           columns={columns}
-          // expandable
+          className={{ 'no-tab': hasClass(), 'first-table': true }}
           dataSource={outPutList}
           pagination={false}
           size="small"
@@ -51,6 +60,7 @@ const StocksInfo = (props) => {
           输出结果异常:
         </Title>
         <Table
+          className="second-table"
           columns={errColumns}
           dataSource={errorList}
           pagination={false}

+ 3 - 4
boniu/src/components/indexBasicInfo/indexBasicInfo.jsx

@@ -10,8 +10,7 @@ class indexBasicInfo extends React.Component {
     // this.title = title[props.location.pathname];
   }
   render() {
-    const sdkurl = this.props.location.state.sdk_url;
-    const apiurl = this.props.location.state.apiurl;
+    const apiUrl = this.props.location.state.apiurl;
     const inputPara = this.props.location.state.inputpara.map((item, index) => {
       return <Text key={index}>{item}</Text>;
     });
@@ -56,7 +55,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>
@@ -65,7 +64,7 @@ class indexBasicInfo extends React.Component {
           <Title className="stocks-title" level={5}>
             SDK包:
           </Title>
-          <Link href={sdkurl}>php程序包下载</Link>
+          <Link href="http://boniu.xazhima.com/sdk/index_any_day.sdk">php程序包下载</Link>
         </div>
       </div>
     );