2 Commits 132ba51ee9 ... b83329964d

Autor SHA1 Mensagem Data
  JERRY\15194 b83329964d liguoqing 4 anos atrás
  JERRY\15194 d202608e3b liguoqing 4 anos atrás

Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
boniu/.eslintcache


+ 5 - 1
boniu/src/components/Navbar/navbar.jsx

@@ -22,6 +22,9 @@ class NavBar extends Component {
       userInfo: {}
     };
   }
+  navDeFault = (info) => {
+    this.props.history.push({pathname: info.url, state: info})
+  }
   render() {
     // let { match } = this.props;
     const pathNames = this.props.history.location.pathname;
@@ -43,7 +46,8 @@ class NavBar extends Component {
               <Menu.Item key="overview" icon={<UserOutlined />}>
                 <Link to="/overview">总体说明</Link>
               </Menu.Item>
-              <SubMenu key="stocks" icon={<LaptopOutlined />} title="股票接口">
+              <SubMenu key="stocks" icon={<LaptopOutlined />} title="股票接口"
+                onTitleClick={ () => this.navDeFault(stocksApiList[0]) }>
                 {stocksApiList.map((item) => {
                   return (
                     <Menu.Item key={item.key}>

+ 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;
+}

Diferenças do arquivo suprimidas por serem muito extensas
+ 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>
     );