import React from "react"; import "./indexBasicInfo.css"; import { Typography, Table, Button } from "antd"; const { Text, Title, Link } = Typography; class indexBasicInfo extends React.Component { constructor(props) { super(props); // this.title = title[props.location.pathname]; } render() { console.log(this.props.location.state); const outPutList = this.props.location.state.outputResult; const errorList = this.props.location.state.errorResult; return (
{title[this.props.location.pathname]}
输入参数: method=stock_info&code=股票代码×tamp=时间戳&sign=签名值
输出结果:
输出结果异常:
测试地址:
SDK包: php程序包下载
); } } export default indexBasicInfo; var title = { "/indexBasicInfo": "指数基本信息", "/indexNow": "指数当天信息", "/indexBefore": "指数回溯" }; const columns = [ { title: "名称", dataIndex: "name", key: "name", render: (text) => {text} }, { title: "说明", dataIndex: "desc", key: "desc" } ]; // var data = [ // { // key: "1", // name: "message_code", // desc: 200 // }, // { // key: "2", // name: "message", // desc: "success" // }, // { // key: "3", // name: "code", // desc: "指数代码" // }, // { // key: "4", // name: "name", // desc: "指数名称" // }, // { // key: "5", // name: "sector", // desc: "交易板块" // }, // { // key: "6", // name: "sector", // desc: "所属市场" // } // ]; const errColumns = [ { title: "错误类型", dataIndex: "type", key: "type", render: (text) => {text} }, { title: "message_code", dataIndex: "code", key: "code" }, { title: "message", dataIndex: "message", key: "message" } ]; // var errdata = [ // { // key: "1", // type: "股票代码错误", // code: 301, // message: "股票代码不存在/错误" // }, // { // key: "3", // type: "签名错误", // code: 304, // message: "非法签名" // }, // { // key: "4", // type: "返回数据为空", // code: 401, // message: "股票数据为空" // }, // { // key: "5", // type: "服务器错误", // code: 501, // message: "服务器错误" // } // ];