@@ -241,6 +241,23 @@ export default defineConfig({ | |||
path: '/htmls/API/GroupMeal/DiningPlateOrder/GetWeighOrderByOpenId', | |||
component: './htmls/API/GroupMeal/DiningPlateOrder/GetWeighOrderByOpenId', | |||
}, | |||
{ | |||
path: '/htmls/API/GroupMeal/DiningPlateOrder/GetWeighOrderPageByOrderId', | |||
component: './htmls/API/GroupMeal/DiningPlateOrder/GetWeighOrderPageByOrderId', | |||
}, | |||
{ | |||
path: '/htmls/API/GroupMeal/DiningPlateOrder/UpdateWeighOrderStates', | |||
component: './htmls/API/GroupMeal/DiningPlateOrder/UpdateWeighOrderStates', | |||
}, | |||
//小程序订单 | |||
{ | |||
path: '/htmls/API/GroupMeal/AppletOrder/Add', | |||
component: './htmls/API/GroupMeal/AppletOrder/Add', | |||
}, | |||
{ | |||
path: '/htmls/API/GroupMeal/AppletOrder/GetList', | |||
component: './htmls/API/GroupMeal/AppletOrder/GetList', | |||
}, | |||
], | |||
npmClient: "pnpm", |
@@ -718,6 +718,10 @@ const group= { | |||
title: '新增订单商品', | |||
key: '/htmls/API/GroupMeal/DiningPlateOrder/AddWeighOrderGoods', | |||
}, | |||
{ | |||
title: '新增订单产品餐盘', | |||
key: '/htmls/API/GroupMeal/DiningPlateOrder/AddWeighOrderDiningPlate', | |||
}, | |||
{ | |||
title: '根据芯片码查询订单', | |||
key: '/htmls/API/GroupMeal/DiningPlateOrder/GetWeighOrderByChipCode', | |||
@@ -729,13 +733,36 @@ const group= { | |||
{ | |||
title: '根据订单OpenId查询订单', | |||
key: '/htmls/API/GroupMeal/DiningPlateOrder/GetWeighOrderByOpenId', | |||
}, | |||
{ | |||
title: '根据订单OpenId分页查询订单', | |||
key: '/htmls/API/GroupMeal/DiningPlateOrder/GetWeighOrderPageByOrderId', | |||
}, | |||
{ | |||
title: '修改订单状态', | |||
key: '/htmls/API/GroupMeal/DiningPlateOrder/UpdateWeighOrderStates', | |||
} | |||
], | |||
}, | |||
{ | |||
title: '小程序订单', | |||
key: '/htmls/API/GroupMeal/AppletOrder', | |||
children: [ | |||
{ | |||
title: '查询订单', | |||
key: '/htmls/API/GroupMeal/AppletOrder/GetList', | |||
}, | |||
{ | |||
title: '新增订单', | |||
key: '/htmls/API/GroupMeal/AppletOrder/Add', | |||
}, | |||
], | |||
}, | |||
] | |||
} | |||
@@ -0,0 +1,196 @@ | |||
import React from 'react'; | |||
import { Divider, Typography, Table } from 'antd'; | |||
const { Title, Paragraph, Text, Link } = Typography; | |||
import Field from '@ant-design/pro-field'; | |||
import styles from './index.less'; | |||
import { ProField } from '@ant-design/pro-components'; | |||
import { Descriptions, Radio, Space, Switch } from 'antd'; | |||
import dayjs from 'dayjs'; | |||
import { useState } from 'react'; | |||
const requeststr = '{"storeId":"string","tradeNo":"string","totalAmount":0,"orderCount":0,"subject":0,"orderdetail":[{"goodsNumber":"string","goodsId":"string","goodsName":"string","goodsAttr":[{"goodsId":"string","attributeId":"string","attributeName":"string","count":0,"price":0}],"isCustom":true,"formulaDetail":[{"deviceId":"string","goodsId":"string","technologyId":"string","actionName":"string","actionValue":"string","sort":0}]}]}'; | |||
const returnstr = '{"statusCode":200,"data":true,"succeeded":true,"errors":null,"extras":null,"timestamp":1709783276}'; | |||
const publicrequestData = [ | |||
{ attribute: 'key', type: 'string', isrequired: "是", explicate: '平台秘钥' }, | |||
{ attribute: 'sign', type: 'string', isrequired: "是", explicate: '签名,详见 安全规则=>签名算法' } | |||
]; | |||
const requestData = [ | |||
{ attribute: 'storeId', type: 'string', isrequired: "是", explicate: '场景id' }, | |||
{ attribute: 'tradeNo', type: 'string', isrequired: "是", explicate: '第三方订单号' }, | |||
{ attribute: 'totalAmount', type: 'decimal', isrequired: "是", explicate: '订单总金额' }, | |||
{ attribute: 'orderCount', type: 'int', isrequired: "是", explicate: '订单数量' }, | |||
{ attribute: 'subject', type: 'string', isrequired: "否", explicate: '订单标题' }, | |||
{ attribute: 'orderdetail', type: 'Array[object]', isrequired: "否", explicate: '订单详情' }, | |||
]; | |||
const requestDataditle = [ | |||
{ attribute: 'goodsNumber', type: 'string', isrequired: "是", explicate: '商品编号(第三方商品编号)' }, | |||
{ attribute: 'goodsId', type: 'string', isrequired: "是", explicate: '商品id' }, | |||
{ attribute: 'goodsName', type: 'decimal', isrequired: "是", explicate: '商品名称' }, | |||
{ attribute: 'isCustom', type: 'int', isrequired: "是", explicate: '是否自定义工艺配方' }, | |||
{ attribute: 'goodsAttr', type: 'Array[object]', isrequired: "否", explicate: '商品属性' }, | |||
{ attribute: 'formulaDetail', type: 'Array[object]', isrequired: "否", explicate: '工艺信息' }, | |||
]; | |||
const requestgoodsAttrData = [ | |||
{ attribute: 'goodsId', type: 'string', isrequired: "是", explicate: '商品id' }, | |||
{ attribute: 'attributeId', type: 'string', isrequired: "是", explicate: '属性id集合,多属性组合用,号隔开' }, | |||
{ attribute: 'attributeName', type: 'string', isrequired: "是", explicate: '属性名称,,多属性组合用,号隔开' }, | |||
{ attribute: 'count', type: 'int', isrequired: "是", explicate: '数量' }, | |||
{ attribute: 'price', type: 'decimal', isrequired: "是", explicate: '价格' }, | |||
]; | |||
const requestgoodsformulaDetail = [ | |||
{ attribute: 'deviceId', type: 'string', isrequired: "是", explicate: '设备id' }, | |||
{ attribute: 'goodsId', type: 'string', isrequired: "是", explicate: '属商品id' }, | |||
{ attribute: 'technologyId', type: 'string', isrequired: "是", explicate: '工艺Id' }, | |||
{ attribute: 'actionName', type: 'string', isrequired: "是", explicate: '步骤名称' }, | |||
{ attribute: 'actionValue', type: 'string', isrequired: "是", explicate: '制作步骤,制作步骤以json字符串的形式' }, | |||
{ attribute: 'sort', type: 'int', isrequired: "是", explicate: '排序' }, | |||
]; | |||
const returnData = [ | |||
{ attribute: 'statusCode', type: 'int', isrequired: "是", explicate: '状态码' }, | |||
{ attribute: 'data', type: 'string', isrequired: "否", explicate: '返回操作状态true或false' }, | |||
{ attribute: 'succeeded', type: 'bool', isrequired: "是", explicate: '状态' }, | |||
{ attribute: 'errors', type: 'string', isrequired: "否", explicate: '错误信息' }, | |||
{ attribute: 'extras', type: 'string', isrequired: "否", explicate: '' }, | |||
{ attribute: 'timestamp', type: 'long', isrequired: "是", explicate: '时间戳' }, | |||
]; | |||
const requestColumns = [ | |||
{ | |||
title: '属性', | |||
dataIndex: 'attribute', | |||
key: 'attribute', | |||
}, | |||
{ | |||
title: '类型', | |||
dataIndex: 'type', | |||
key: 'type', | |||
}, | |||
{ | |||
title: '必填', | |||
dataIndex: 'isrequired', | |||
key: 'isrequired', | |||
}, | |||
{ | |||
title: '说明', | |||
dataIndex: 'explicate', | |||
key: 'explicate', | |||
} | |||
]; | |||
const returnColumns = [ | |||
{ | |||
title: '属性', | |||
dataIndex: 'attribute', | |||
key: 'attribute', | |||
}, | |||
{ | |||
title: '类型', | |||
dataIndex: 'type', | |||
key: 'type', | |||
}, | |||
{ | |||
title: '说明', | |||
dataIndex: 'explicate', | |||
key: 'explicate', | |||
} | |||
]; | |||
const App = () => ( | |||
<> | |||
<Title>订单信息-新增</Title> | |||
<Title level={4}>接口说明</Title> | |||
<Paragraph> | |||
创建平台的订单信息 | |||
</Paragraph> | |||
<Title level={4}>接口英文名</Title> | |||
<Paragraph> | |||
<Text strong>CreateOrder</Text> | |||
</Paragraph> | |||
<Title level={4}>功能描述</Title> | |||
<Paragraph> | |||
创建平台的订单信息 | |||
</Paragraph> | |||
<Title level={4}>注意事项</Title> | |||
<Paragraph> | |||
1、该接口仅支持POST调用<br /> | |||
</Paragraph> | |||
<Title level={4}>调用方式</Title> | |||
<Paragraph> | |||
<blockquote>{" POST http://localhost:5005/api/ExternalPlatform/AppletOrder/CreateOrder"}</blockquote> | |||
</Paragraph> | |||
<Title level={4}>公共请求参数</Title> | |||
HTTP头参数 | |||
<Paragraph> | |||
<Table pagination={{ position: ["none"] }} | |||
columns={requestColumns} dataSource={publicrequestData} /> | |||
</Paragraph> | |||
<Title level={4}>请求参数</Title> | |||
Body | |||
<Paragraph> | |||
<Table pagination={{ position: ["none"] }} columns={requestColumns} | |||
expandable={{ | |||
expandedRowRender: (record) => ( | |||
<Table columns={requestColumns} dataSource={requestDataditle} pagination={false} | |||
expandable={{ | |||
expandedRowRender: (record) => ([ <Table style={{display:record.attribute == 'goodsAttr'?'block':"none"}} columns={requestColumns} dataSource={requestgoodsAttrData} pagination={false} />, | |||
<Table style={{display:record.attribute == 'formulaDetail'?'block':"none"}} columns={requestColumns} dataSource={requestgoodsformulaDetail} pagination={false} />] | |||
), rowExpandable: (record) => record.attribute == 'goodsAttr' || record.attribute == 'formulaDetail', | |||
}} | |||
/> | |||
), | |||
rowExpandable: (record) => record.attribute == 'orderdetail', | |||
}} | |||
dataSource={requestData} /> | |||
</Paragraph> | |||
<Title level={4}>返回参数</Title> | |||
<Paragraph> | |||
{/* <pre>{"66666666666666666666666"}</pre> */} | |||
<Table pagination={{ position: ["none"] }} columns={returnColumns} dataSource={returnData} /> | |||
</Paragraph> | |||
<Title level={4}>调用示例</Title> | |||
<Paragraph> | |||
<blockquote>{"示例说明: post请求"}</blockquote> | |||
</Paragraph> | |||
<Title level={4}>公共请求数据示例</Title> | |||
<Paragraph> | |||
<blockquote>{"请求头添加如下信息"}</blockquote> | |||
<pre>{' "key: a92370b8-a633-47e6-9662-7755b8fe9ee4" \r\n "sign: 987DA29D82DE9A65F4DFB986170F5272" '}</pre> | |||
</Paragraph> | |||
<Title level={4}>请求数据示例</Title> | |||
<Paragraph> | |||
<blockquote>{"示例说明: post请求"}</blockquote> | |||
<pre>{JSON.stringify(JSON.parse(requeststr), null, 4)}</pre> | |||
</Paragraph> | |||
<Title level={4}>返回数据示例</Title> | |||
<Paragraph> | |||
<blockquote>{"示例说明: post请求"}</blockquote> | |||
<pre>{JSON.stringify(JSON.parse(returnstr), null, 4)}</pre> | |||
</Paragraph> | |||
</> | |||
); | |||
export default App; |
@@ -0,0 +1,246 @@ | |||
import React from 'react'; | |||
import { Divider, Typography, Table } from 'antd'; | |||
const { Title, Paragraph, Text, Link } = Typography; | |||
import Field from '@ant-design/pro-field'; | |||
import styles from './index.less'; | |||
import { ProField } from '@ant-design/pro-components'; | |||
import { Descriptions, Radio, Space, Switch } from 'antd'; | |||
import dayjs from 'dayjs'; | |||
import { useState } from 'react'; | |||
const requeststr = '{"tradeNo":"string","orderNumber":"string","goodsName":"string"}'; | |||
const returnstr = '{"statusCode":0,"data":[{"id":"string","storeId":"string","orderNumber":"string","tradeNo":"string","orderStatus":0,"totalAmount":0,"orderCount":0,"subject":"string","createdAt":"2024-03-14T07:24:46.856Z","orderdetail":[{"id":"string","orderId":"string","goodsNumber":"string","goodsId":"string","goodsName":"string","goodsAttr":[{"id":"string","goodsId":"string","suborderId":"string","attributeId":"string","attributeName":"string","count":0,"price":0}],"isCustom":true,"formulaDetail":[{"id":"string","suborderId":"string","deviceId":"string","goodsId":"string","technologyId":"string","actionName":"string","actionValue":"string","sort":0}]}]}],"succeeded":true,"errors":"string","extras":"string","timestamp":0}'; | |||
const publicrequestData = [ | |||
{ attribute: 'key', type: 'string', isrequired: "是", explicate: '平台秘钥' }, | |||
{ attribute: 'sign', type: 'string', isrequired: "是", explicate: '签名,详见 安全规则=>签名算法' } | |||
]; | |||
const requestData = [ | |||
{ attribute: 'tradeNo', type: 'int', isrequired: "否", explicate: '交易订单号' }, | |||
{ attribute: 'orderNumber', type: 'int', isrequired: "否", explicate: '平台订单号' }, | |||
{ attribute: 'goodsName', type: 'string', isrequired: "否", explicate: '商品名称' }, | |||
]; | |||
const returnData = [ | |||
{ attribute: 'statusCode', type: 'int', isrequired: "是", explicate: '状态码' }, | |||
{ attribute: 'data', type: 'object', isrequired: "否", explicate: '返回具体数据' }, | |||
{ attribute: 'succeeded', type: 'bool', isrequired: "是", explicate: '状态' }, | |||
{ attribute: 'errors', type: 'string', isrequired: "否", explicate: '错误信息' }, | |||
{ attribute: 'extras', type: 'string', isrequired: "否", explicate: '' }, | |||
{ attribute: 'timestamp', type: 'long', isrequired: "是", explicate: '时间戳' }, | |||
]; | |||
const returnDataInfo = [ | |||
{ attribute: 'id', type: 'string', isrequired: "是", explicate: 'id' }, | |||
{ attribute: 'storeId', type: 'string', isrequired: "是", explicate: '场景id' }, | |||
{ attribute: 'tradeNo', type: 'string', isrequired: "是", explicate: '第三方订单号' }, | |||
{ attribute: 'totalAmount', type: 'decimal', isrequired: "是", explicate: '订单总金额' }, | |||
{ attribute: 'orderCount', type: 'int', isrequired: "是", explicate: '订单数量' }, | |||
{ attribute: 'subject', type: 'string', isrequired: "否", explicate: '订单标题' }, | |||
{ attribute: 'orderdetail', type: 'Array[object]', isrequired: "否", explicate: '订单详情' }, | |||
]; | |||
const returnDataInfoList = [ | |||
{ attribute: 'id', type: 'string', isrequired: "是", explicate: 'id' }, | |||
{ attribute: 'goodsNumber', type: 'string', isrequired: "是", explicate: '商品编号(第三方商品编号)' }, | |||
{ attribute: 'goodsId', type: 'string', isrequired: "是", explicate: '商品id' }, | |||
{ attribute: 'goodsName', type: 'decimal', isrequired: "是", explicate: '商品名称' }, | |||
{ attribute: 'isCustom', type: 'int', isrequired: "是", explicate: '是否自定义工艺配方' }, | |||
{ attribute: 'goodsAttr', type: 'Array[object]', isrequired: "否", explicate: '商品属性' }, | |||
{ attribute: 'formulaDetail', type: 'Array[object]', isrequired: "否", explicate: '工艺信息' }, | |||
]; | |||
const reapondgoodsAttrData = [ | |||
{ attribute: 'id', type: 'string', isrequired: "是", explicate: 'id' }, | |||
{ attribute: 'goodsId', type: 'string', isrequired: "是", explicate: '商品id' }, | |||
{ attribute: 'attributeId', type: 'string', isrequired: "是", explicate: '属性id集合,多属性组合用,号隔开' }, | |||
{ attribute: 'attributeName', type: 'string', isrequired: "是", explicate: '属性名称,,多属性组合用,号隔开' }, | |||
{ attribute: 'count', type: 'int', isrequired: "是", explicate: '数量' }, | |||
{ attribute: 'price', type: 'decimal', isrequired: "是", explicate: '价格' }, | |||
]; | |||
const reapondgoodsformulaDetail = [ | |||
{ attribute: 'id', type: 'string', isrequired: "是", explicate: 'id' }, | |||
{ attribute: 'deviceId', type: 'string', isrequired: "是", explicate: '设备id' }, | |||
{ attribute: 'goodsId', type: 'string', isrequired: "是", explicate: '属商品id' }, | |||
{ attribute: 'technologyId', type: 'string', isrequired: "是", explicate: '工艺Id' }, | |||
{ attribute: 'actionName', type: 'string', isrequired: "是", explicate: '步骤名称' }, | |||
{ attribute: 'actionValue', type: 'string', isrequired: "是", explicate: '制作步骤,制作步骤以json字符串的形式' }, | |||
{ attribute: 'sort', type: 'int', isrequired: "是", explicate: '排序' }, | |||
]; | |||
const requestColumns = [ | |||
{ | |||
title: '属性', | |||
dataIndex: 'attribute', | |||
key: 'attribute', | |||
}, | |||
{ | |||
title: '类型', | |||
dataIndex: 'type', | |||
key: 'type', | |||
}, | |||
{ | |||
title: '必填', | |||
dataIndex: 'isrequired', | |||
key: 'isrequired', | |||
}, | |||
{ | |||
title: '说明', | |||
dataIndex: 'explicate', | |||
key: 'explicate', | |||
} | |||
]; | |||
const returnColumns = [ | |||
{ | |||
title: '属性', | |||
dataIndex: 'attribute', | |||
key: 'attribute', | |||
}, | |||
{ | |||
title: '类型', | |||
dataIndex: 'type', | |||
key: 'type', | |||
}, | |||
{ | |||
title: '说明', | |||
dataIndex: 'explicate', | |||
key: 'explicate', | |||
} | |||
]; | |||
const returnInfoColumns = [ | |||
{ | |||
title: '属性', | |||
dataIndex: 'attribute', | |||
key: 'attribute', | |||
}, | |||
{ | |||
title: '类型', | |||
dataIndex: 'type', | |||
key: 'type', | |||
}, | |||
{ | |||
title: '说明', | |||
dataIndex: 'explicate', | |||
key: 'explicate', | |||
} | |||
]; | |||
const returnInfoListColumns = [ | |||
{ | |||
title: '属性', | |||
dataIndex: 'attribute', | |||
key: 'attribute', | |||
}, | |||
{ | |||
title: '类型', | |||
dataIndex: 'type', | |||
key: 'type', | |||
}, | |||
{ | |||
title: '说明', | |||
dataIndex: 'explicate', | |||
key: 'explicate', | |||
} | |||
]; | |||
const App = () => ( | |||
<> | |||
<Title>订单信息-查询</Title> | |||
<Title level={4}>接口说明</Title> | |||
<Paragraph> | |||
查询平台创建的订单信息 | |||
</Paragraph> | |||
<Title level={4}>接口英文名</Title> | |||
<Paragraph> | |||
<Text strong>GetOrder</Text> | |||
</Paragraph> | |||
<Title level={4}>功能描述</Title> | |||
<Paragraph> | |||
查询平台创建的订单信息 | |||
</Paragraph> | |||
<Title level={4}>注意事项</Title> | |||
<Paragraph> | |||
1、该接口仅支持POST调用<br /> | |||
</Paragraph> | |||
<Title level={4}>调用方式</Title> | |||
<Paragraph> | |||
<blockquote>{" POST http://localhost:5005/api/ExternalPlatform/AppletOrder/GetOrder"}</blockquote> | |||
</Paragraph> | |||
<Title level={4}>公共请求参数</Title> | |||
HTTP头参数 | |||
<Paragraph> | |||
<Table pagination={{ position: ["none"] }} | |||
columns={requestColumns} dataSource={publicrequestData} /> | |||
</Paragraph> | |||
<Title level={4}>请求参数</Title> | |||
Body | |||
<Paragraph> | |||
<Table pagination={{ position: ["none"] }} | |||
columns={requestColumns} dataSource={requestData} /> | |||
</Paragraph> | |||
<Title level={4}>返回参数</Title> | |||
<Paragraph> | |||
{/* <pre>{"66666666666666666666666"}</pre> */} | |||
<Table pagination={{ position: ["none"] }} | |||
expandable={{ | |||
expandedRowRender: (record) => ( | |||
<Table columns={returnInfoColumns} | |||
expandable={{ | |||
expandedRowRender: (record) => ( | |||
<Table columns={returnInfoListColumns} dataSource={returnDataInfoList} pagination={false} | |||
expandable={{ | |||
expandedRowRender: (record) => ( | |||
[<Table style={{display:record.attribute == 'goodsAttr'?'block':"none"}} columns={returnInfoListColumns} dataSource={reapondgoodsAttrData} pagination={false} />, | |||
<Table style={{display:record.attribute == 'formulaDetail'?'block':"none"}} columns={returnInfoListColumns} dataSource={reapondgoodsformulaDetail} pagination={false} />] | |||
), rowExpandable: (record) => record.attribute == 'goodsAttr' || record.attribute == 'formulaDetail', | |||
}} /> | |||
), | |||
rowExpandable: (record) => record.attribute == 'orderdetail' | |||
}} | |||
dataSource={returnDataInfo} pagination={false} /> | |||
), | |||
rowExpandable: (record) => record.attribute == 'data', | |||
}} | |||
columns={returnColumns} dataSource={returnData} /> | |||
</Paragraph> | |||
<Title level={4}>调用示例</Title> | |||
<Paragraph> | |||
<blockquote>{"示例说明: post请求"}</blockquote> | |||
</Paragraph> | |||
<Title level={4}>公共请求数据示例</Title> | |||
<Paragraph> | |||
<blockquote>{"请求头添加如下信息"}</blockquote> | |||
<pre>{' "key: a92370b8-a633-47e6-9662-7755b8fe9ee4" \r\n "sign: 987DA29D82DE9A65F4DFB986170F5272" '}</pre> | |||
</Paragraph> | |||
<Title level={4}>请求数据示例</Title> | |||
<Paragraph> | |||
<blockquote>{"示例说明: post请求"}</blockquote> | |||
<pre>{JSON.stringify(JSON.parse(requeststr), null, 4)}</pre> | |||
</Paragraph> | |||
<Title level={4}>返回数据示例</Title> | |||
<Paragraph> | |||
<blockquote>{"示例说明: post请求"}</blockquote> | |||
<pre>{JSON.stringify(JSON.parse(returnstr), null, 4)}</pre> | |||
</Paragraph> | |||
</> | |||
); | |||
export default App; |
@@ -10,7 +10,7 @@ import dayjs from 'dayjs'; | |||
import { useState } from 'react'; | |||
const requeststr = '{ "createId": "string", "qrCode": "string" }'; | |||
const returnstr = '{ "statusCode": 0, "data": { "id": "string", "groupId": "string", "orderNumber": "string", "totalAmount": 0, "subject": "string", "sceneId": "string", "states": 0, "payStates": 0, "createAt": "2024-03-15T02:23:30.164Z", "createId": "string", "goodsInfo": [ { "id": "string", "groupId": "string", "orderId": "string", "diningPlateId": "string", "goodsId": "string", "goodsName": "string", "totalAmount": 0, "goodsWeight": 0, "goodsAttribute": [ { "attributeId": "string", "attributeName": "string" } ] } ], "diningPlateInfo": [ { "orderId": "string", "diningPlateId": "string", "qrCode": "string", "chipCode": "string", "goodsInfo": [ { "id": "string", "groupId": "string", "orderId": "string", "diningPlateId": "string", "goodsId": "string", "goodsName": "string", "totalAmount": 0, "goodsWeight": 0, "goodsAttribute": [ { "attributeId": "string", "attributeName": "string" } ] } ] } ], "memberInfo": { "isMember": true, "name": "string" } }, "succeeded": true, "errors": "string", "extras": "string", "timestamp": 0 }'; | |||
const returnstr = '{ "statusCode": 0, "data": { "id": "string", "groupId": "string", "orderNumber": "string", "totalAmount": 0, "subject": "string", "sceneId": "string", "states": 0, "payStates": 0, "createAt": "2024-03-22T02:48:36.595Z", "createId": "string", "transactionId": "string", "tradeNo": "string", "goodsInfo": [ { "id": "string", "groupId": "string", "orderId": "string", "diningPlateId": "string", "goodsId": "string", "goodsName": "string", "totalAmount": 0, "price": "string", "goodsWeight": 0, "goodsAttribute": [ { "attributeId": "string", "attributeName": "string" } ] } ], "diningPlateInfo": [ { "orderId": "string", "diningPlateId": "string", "qrCode": "string", "chipCode": "string", "isPay": true, "goodsInfo": [ { "id": "string", "groupId": "string", "orderId": "string", "diningPlateId": "string", "goodsId": "string", "goodsName": "string", "totalAmount": 0, "price": "string", "goodsWeight": 0, "goodsAttribute": [ { "attributeId": "string", "attributeName": "string" } ] } ] } ], "memberInfo": { "isMember": true, "name": "string" }, "isFree": true }, "succeeded": true, "errors": "string", "extras": "string", "timestamp": 0 }'; | |||
const publicrequestData = [ | |||
@@ -24,13 +24,57 @@ const requestData = [ | |||
const returnData = [ | |||
{ attribute: 'statusCode', type: 'int', isrequired: "是", explicate: '状态码' }, | |||
{ attribute: 'data', type: 'string', isrequired: "否", explicate: '订单具体信息' }, | |||
{ attribute: 'data', type: 'obj', isrequired: "否", explicate: '订单具体信息' }, | |||
{ attribute: 'succeeded', type: 'bool', isrequired: "是", explicate: '状态' }, | |||
{ attribute: 'errors', type: 'string', isrequired: "否", explicate: '错误信息' }, | |||
{ attribute: 'extras', type: 'string', isrequired: "否", explicate: '' }, | |||
{ attribute: 'timestamp', type: 'long', isrequired: "是", explicate: '时间戳' }, | |||
]; | |||
const returnData1 = [ | |||
{ attribute: 'id', type: 'string', isrequired: "是", explicate: '订单ID' }, | |||
{ attribute: 'orderNumber', type: 'string', isrequired: "是", explicate: '订单编号' }, | |||
{ attribute: 'totalAmount', type: 'decimal ', isrequired: "是", explicate: '总价' }, | |||
{ attribute: 'subject', type: 'string ', isrequired: "是", explicate: '订单标题' }, | |||
{ attribute: 'sceneId', type: 'string ', isrequired: "是", explicate: '场景ID' }, | |||
{ attribute: 'states', type: '枚举 ', isrequired: "是", explicate: '0:选菜中 1:订单完成' }, | |||
{ attribute: 'payStates', type: '枚举 ', isrequired: "是", explicate: '0:未支付 1:已支付' }, | |||
{ attribute: 'createAt', type: 'string ', isrequired: "是", explicate: '创建时间' }, | |||
{ attribute: 'createId', type: 'string ', isrequired: "是", explicate: 'Openid' }, | |||
{ attribute: 'transactionId', type: 'string ', isrequired: "是", explicate: '交易单号' }, | |||
{ attribute: 'goodsInfo', type: 'array ', isrequired: "是", explicate: '商品信息' }, | |||
{ attribute: 'diningPlateInfo', type: 'array ', isrequired: "是", explicate: '餐盘信息' }, | |||
{ attribute: 'memberInfo', type: 'obj ', isrequired: "是", explicate: '会员信息' }, | |||
]; | |||
//商品信息 | |||
const returnData2 = [ | |||
{ attribute: 'id', type: 'string', isrequired: "是", explicate: '订单ID' }, | |||
{ attribute: 'orderId', type: 'string', isrequired: "是", explicate: '订单id' }, | |||
{ attribute: 'diningPlateId', type: 'string ', isrequired: "是", explicate: '餐盘id' }, | |||
{ attribute: 'goodsId', type: 'string ', isrequired: "是", explicate: '商品id' }, | |||
{ attribute: 'goodsName', type: 'string ', isrequired: "是", explicate: '商品名称' }, | |||
{ attribute: 'totalAmount', type: 'decimal ', isrequired: "是", explicate: '总价' }, | |||
{ attribute: 'price', type: 'decimal ', isrequired: "是", explicate: '单价' }, | |||
{ attribute: 'goodsWeight', type: 'decimal ', isrequired: "是", explicate: '总量' }, | |||
{ attribute: 'goodsAttribute', type: 'array ', isrequired: "是", explicate: '商品属性' }, | |||
]; | |||
//餐盘信息 | |||
const returnData3 = [ | |||
{ attribute: 'id', type: 'string', isrequired: "是", explicate: '订单ID' }, | |||
{ attribute: 'orderId', type: 'string', isrequired: "是", explicate: '订单id' }, | |||
{ attribute: 'diningPlateId', type: 'string ', isrequired: "是", explicate: '餐盘id' }, | |||
{ attribute: 'qrCode', type: 'string ', isrequired: "是", explicate: '二维码' }, | |||
{ attribute: 'chipCode', type: 'string ', isrequired: "是", explicate: '芯片码' }, | |||
{ attribute: 'isPay', type: 'bool ', isrequired: "是", explicate: '是否支付' }, | |||
{ attribute: 'goodsInfo', type: 'obj ', isrequired: "是", explicate: '商品信息' }, | |||
]; | |||
const requestInfoData = [ | |||
]; | |||
const requestColumns = [ | |||
{ | |||
title: '属性', | |||
@@ -89,7 +133,7 @@ const App = () => ( | |||
<Title level={4}>功能描述</Title> | |||
<Paragraph> | |||
创建订单 | |||
创建订单 | |||
</Paragraph> | |||
@@ -110,25 +154,37 @@ const App = () => ( | |||
<Table pagination={{ position: ["none"] }} | |||
columns={requestColumns} dataSource={publicrequestData} /> | |||
</Paragraph> | |||
<Title level={4}>请求参数</Title> | |||
Body | |||
<Paragraph> | |||
<Table pagination={{ position: ["none"] }} columns={requestColumns} | |||
// expandable={{ | |||
// expandedRowRender: (record) => ( | |||
// <Table columns={requestColumns} dataSource={requestInfoData} pagination={false} /> | |||
// ), | |||
// rowExpandable: (record) => record.attribute == 'dataInfo', | |||
// }} | |||
dataSource={requestData} /> | |||
expandable={{ | |||
// expandedRowRender: (record) => ( | |||
// <Table columns={requestColumns} dataSource={requestInfoData} pagination={false} /> | |||
// ), | |||
rowExpandable: (record) => record.attribute == 'dataInfo', | |||
}} | |||
dataSource={requestData} /> | |||
</Paragraph> | |||
<Title level={4}>返回参数</Title> | |||
<Paragraph> | |||
{/* <pre>{"66666666666666666666666"}</pre> */} | |||
<Table pagination={{ position: ["none"] }} columns={returnColumns} dataSource={returnData} /> | |||
<Table pagination={{ position: ["none"] }} | |||
expandable={{ | |||
expandedRowRender: (record) => ( | |||
<Table columns={requestColumns} dataSource={returnData1} pagination={false} /> | |||
), | |||
rowExpandable: (record) => record.attribute == 'data', | |||
}} | |||
columns={returnColumns} dataSource={returnData} /> | |||
<blockquote>{"商品"}</blockquote> | |||
<Table pagination={{ position: ["none"] }} columns={returnColumns} dataSource={returnData1} /> | |||
<blockquote>{"餐盘"}</blockquote> | |||
<Table pagination={{ position: ["none"] }} columns={returnColumns} dataSource={returnData2} /> | |||
</Paragraph> | |||
<Title level={4}>调用示例</Title> | |||
@@ -155,9 +211,5 @@ const App = () => ( | |||
<pre>{JSON.stringify(JSON.parse(returnstr), null, 4)}</pre> | |||
</Paragraph> | |||
</> | |||
); | |||
export default App; |
@@ -9,8 +9,8 @@ import { Descriptions, Radio, Space, Switch } from 'antd'; | |||
import dayjs from 'dayjs'; | |||
import { useState } from 'react'; | |||
const requeststr = '{ "orderId": "string" }'; | |||
const returnstr = '{ "statusCode": 0, "data": { "id": "string", "groupId": "string", "orderNumber": "string", "totalAmount": 0, "subject": "string", "sceneId": "string", "states": 0, "payStates": 0, "createAt": "2024-03-15T02:23:30.164Z", "createId": "string", "goodsInfo": [ { "id": "string", "groupId": "string", "orderId": "string", "diningPlateId": "string", "goodsId": "string", "goodsName": "string", "totalAmount": 0, "goodsWeight": 0, "goodsAttribute": [ { "attributeId": "string", "attributeName": "string" } ] } ], "diningPlateInfo": [ { "orderId": "string", "diningPlateId": "string", "qrCode": "string", "chipCode": "string", "goodsInfo": [ { "id": "string", "groupId": "string", "orderId": "string", "diningPlateId": "string", "goodsId": "string", "goodsName": "string", "totalAmount": 0, "goodsWeight": 0, "goodsAttribute": [ { "attributeId": "string", "attributeName": "string" } ] } ] } ], "memberInfo": { "isMember": true, "name": "string" } }, "succeeded": true, "errors": "string", "extras": "string", "timestamp": 0 }'; | |||
const requeststr = '{ "qrCode": "string" }'; | |||
const returnstr = '{ "statusCode": 0, "data": { "id": "string", "groupId": "string", "orderNumber": "string", "totalAmount": 0, "subject": "string", "sceneId": "string", "states": 0, "payStates": 0, "createAt": "2024-03-22T02:48:36.595Z", "createId": "string", "transactionId": "string", "tradeNo": "string", "goodsInfo": [ { "id": "string", "groupId": "string", "orderId": "string", "diningPlateId": "string", "goodsId": "string", "goodsName": "string", "totalAmount": 0, "price": "string", "goodsWeight": 0, "goodsAttribute": [ { "attributeId": "string", "attributeName": "string" } ] } ], "diningPlateInfo": [ { "orderId": "string", "diningPlateId": "string", "qrCode": "string", "chipCode": "string", "isPay": true, "goodsInfo": [ { "id": "string", "groupId": "string", "orderId": "string", "diningPlateId": "string", "goodsId": "string", "goodsName": "string", "totalAmount": 0, "price": "string", "goodsWeight": 0, "goodsAttribute": [ { "attributeId": "string", "attributeName": "string" } ] } ] } ], "memberInfo": { "isMember": true, "name": "string" }, "isFree": true }, "succeeded": true, "errors": "string", "extras": "string", "timestamp": 0 }'; | |||
const publicrequestData = [ | |||
@@ -18,19 +18,62 @@ const publicrequestData = [ | |||
]; | |||
const requestData = [ | |||
{ attribute: 'createId', type: 'string', isrequired: "是", explicate: '创建人' }, | |||
{ attribute: 'qrCode', type: 'string', isrequired: "是", explicate: '二维码' }, | |||
]; | |||
const returnData = [ | |||
{ attribute: 'statusCode', type: 'int', isrequired: "是", explicate: '状态码' }, | |||
{ attribute: 'data', type: 'string', isrequired: "否", explicate: '订单具体信息' }, | |||
{ attribute: 'data', type: 'obj', isrequired: "否", explicate: '订单具体信息' }, | |||
{ attribute: 'succeeded', type: 'bool', isrequired: "是", explicate: '状态' }, | |||
{ attribute: 'errors', type: 'string', isrequired: "否", explicate: '错误信息' }, | |||
{ attribute: 'extras', type: 'string', isrequired: "否", explicate: '' }, | |||
{ attribute: 'timestamp', type: 'long', isrequired: "是", explicate: '时间戳' }, | |||
]; | |||
const returnData1 = [ | |||
{ attribute: 'id', type: 'string', isrequired: "是", explicate: '订单ID' }, | |||
{ attribute: 'orderNumber', type: 'string', isrequired: "是", explicate: '订单编号' }, | |||
{ attribute: 'totalAmount', type: 'decimal ', isrequired: "是", explicate: '总价' }, | |||
{ attribute: 'subject', type: 'string ', isrequired: "是", explicate: '订单标题' }, | |||
{ attribute: 'sceneId', type: 'string ', isrequired: "是", explicate: '场景ID' }, | |||
{ attribute: 'states', type: '枚举 ', isrequired: "是", explicate: '0:选菜中 1:订单完成' }, | |||
{ attribute: 'payStates', type: '枚举 ', isrequired: "是", explicate: '0:未支付 1:已支付' }, | |||
{ attribute: 'createAt', type: 'string ', isrequired: "是", explicate: '创建时间' }, | |||
{ attribute: 'createId', type: 'string ', isrequired: "是", explicate: 'Openid' }, | |||
{ attribute: 'transactionId', type: 'string ', isrequired: "是", explicate: '交易单号' }, | |||
{ attribute: 'goodsInfo', type: 'array ', isrequired: "是", explicate: '商品信息' }, | |||
{ attribute: 'diningPlateInfo', type: 'array ', isrequired: "是", explicate: '餐盘信息' }, | |||
{ attribute: 'memberInfo', type: 'obj ', isrequired: "是", explicate: '会员信息' }, | |||
]; | |||
//商品信息 | |||
const returnData2 = [ | |||
{ attribute: 'id', type: 'string', isrequired: "是", explicate: '订单ID' }, | |||
{ attribute: 'orderId', type: 'string', isrequired: "是", explicate: '订单id' }, | |||
{ attribute: 'diningPlateId', type: 'string ', isrequired: "是", explicate: '餐盘id' }, | |||
{ attribute: 'goodsId', type: 'string ', isrequired: "是", explicate: '商品id' }, | |||
{ attribute: 'goodsName', type: 'string ', isrequired: "是", explicate: '商品名称' }, | |||
{ attribute: 'totalAmount', type: 'decimal ', isrequired: "是", explicate: '总价' }, | |||
{ attribute: 'price', type: 'decimal ', isrequired: "是", explicate: '单价' }, | |||
{ attribute: 'goodsWeight', type: 'decimal ', isrequired: "是", explicate: '总量' }, | |||
{ attribute: 'goodsAttribute', type: 'array ', isrequired: "是", explicate: '商品属性' }, | |||
]; | |||
//餐盘信息 | |||
const returnData3 = [ | |||
{ attribute: 'id', type: 'string', isrequired: "是", explicate: '订单ID' }, | |||
{ attribute: 'orderId', type: 'string', isrequired: "是", explicate: '订单id' }, | |||
{ attribute: 'diningPlateId', type: 'string ', isrequired: "是", explicate: '餐盘id' }, | |||
{ attribute: 'qrCode', type: 'string ', isrequired: "是", explicate: '二维码' }, | |||
{ attribute: 'chipCode', type: 'string ', isrequired: "是", explicate: '芯片码' }, | |||
{ attribute: 'isPay', type: 'bool ', isrequired: "是", explicate: '是否支付' }, | |||
{ attribute: 'goodsInfo', type: 'obj ', isrequired: "是", explicate: '商品信息' }, | |||
]; | |||
const requestInfoData = [ | |||
]; | |||
const requestColumns = [ | |||
{ | |||
title: '属性', | |||
@@ -74,11 +117,11 @@ const returnColumns = [ | |||
const App = () => ( | |||
<> | |||
<Title>称重订单-根据订单芯片码获取订单信息</Title> | |||
<Title>称重订单-创建</Title> | |||
<Title level={4}>接口说明</Title> | |||
<Paragraph> | |||
根据订单芯片码获取订单信息 | |||
创建订单 | |||
</Paragraph> | |||
@@ -89,7 +132,7 @@ const App = () => ( | |||
<Title level={4}>功能描述</Title> | |||
<Paragraph> | |||
根据订单芯片码获取订单信息 | |||
创建订单 | |||
</Paragraph> | |||
@@ -101,7 +144,7 @@ const App = () => ( | |||
<Title level={4}>调用方式</Title> | |||
<Paragraph> | |||
<blockquote>{" POST http://localhost:5003/api/ExternalPlatform/WeighOrder/GetWeighOrderByChipCode"}</blockquote> | |||
<blockquote>{" POST api/ExternalPlatform/WeighOrder/GetWeighOrderByChipCode"}</blockquote> | |||
</Paragraph> | |||
<Title level={4}>公共请求参数</Title> | |||
@@ -110,25 +153,37 @@ const App = () => ( | |||
<Table pagination={{ position: ["none"] }} | |||
columns={requestColumns} dataSource={publicrequestData} /> | |||
</Paragraph> | |||
<Title level={4}>请求参数</Title> | |||
Body | |||
<Paragraph> | |||
<Table pagination={{ position: ["none"] }} columns={requestColumns} | |||
// expandable={{ | |||
// expandedRowRender: (record) => ( | |||
// <Table columns={requestColumns} dataSource={requestInfoData} pagination={false} /> | |||
// ), | |||
// rowExpandable: (record) => record.attribute == 'dataInfo', | |||
// }} | |||
dataSource={requestData} /> | |||
expandable={{ | |||
// expandedRowRender: (record) => ( | |||
// <Table columns={requestColumns} dataSource={requestInfoData} pagination={false} /> | |||
// ), | |||
rowExpandable: (record) => record.attribute == 'dataInfo', | |||
}} | |||
dataSource={requestData} /> | |||
</Paragraph> | |||
<Title level={4}>返回参数</Title> | |||
<Paragraph> | |||
{/* <pre>{"66666666666666666666666"}</pre> */} | |||
<Table pagination={{ position: ["none"] }} columns={returnColumns} dataSource={returnData} /> | |||
<Table pagination={{ position: ["none"] }} | |||
expandable={{ | |||
expandedRowRender: (record) => ( | |||
<Table columns={requestColumns} dataSource={returnData1} pagination={false} /> | |||
), | |||
rowExpandable: (record) => record.attribute == 'data', | |||
}} | |||
columns={returnColumns} dataSource={returnData} /> | |||
<blockquote>{"商品"}</blockquote> | |||
<Table pagination={{ position: ["none"] }} columns={returnColumns} dataSource={returnData1} /> | |||
<blockquote>{"餐盘"}</blockquote> | |||
<Table pagination={{ position: ["none"] }} columns={returnColumns} dataSource={returnData2} /> | |||
</Paragraph> | |||
<Title level={4}>调用示例</Title> | |||
@@ -155,9 +210,5 @@ const App = () => ( | |||
<pre>{JSON.stringify(JSON.parse(returnstr), null, 4)}</pre> | |||
</Paragraph> | |||
</> | |||
); | |||
export default App; |
@@ -9,8 +9,8 @@ import { Descriptions, Radio, Space, Switch } from 'antd'; | |||
import dayjs from 'dayjs'; | |||
import { useState } from 'react'; | |||
const requeststr = '{ "openId": "string" }'; | |||
const returnstr = '{ "statusCode": 0, "data": { "id": "string", "groupId": "string", "orderNumber": "string", "totalAmount": 0, "subject": "string", "sceneId": "string", "states": 0, "payStates": 0, "createAt": "2024-03-15T02:23:30.164Z", "createId": "string", "goodsInfo": [ { "id": "string", "groupId": "string", "orderId": "string", "diningPlateId": "string", "goodsId": "string", "goodsName": "string", "totalAmount": 0, "goodsWeight": 0, "goodsAttribute": [ { "attributeId": "string", "attributeName": "string" } ] } ], "diningPlateInfo": [ { "orderId": "string", "diningPlateId": "string", "qrCode": "string", "chipCode": "string", "goodsInfo": [ { "id": "string", "groupId": "string", "orderId": "string", "diningPlateId": "string", "goodsId": "string", "goodsName": "string", "totalAmount": 0, "goodsWeight": 0, "goodsAttribute": [ { "attributeId": "string", "attributeName": "string" } ] } ] } ], "memberInfo": { "isMember": true, "name": "string" } }, "succeeded": true, "errors": "string", "extras": "string", "timestamp": 0 }'; | |||
const requeststr = '{ "orderId": "string" }'; | |||
const returnstr = '{ "statusCode": 0, "data": { "id": "string", "groupId": "string", "orderNumber": "string", "totalAmount": 0, "subject": "string", "sceneId": "string", "states": 0, "payStates": 0, "createAt": "2024-03-22T02:48:36.595Z", "createId": "string", "transactionId": "string", "tradeNo": "string", "goodsInfo": [ { "id": "string", "groupId": "string", "orderId": "string", "diningPlateId": "string", "goodsId": "string", "goodsName": "string", "totalAmount": 0, "price": "string", "goodsWeight": 0, "goodsAttribute": [ { "attributeId": "string", "attributeName": "string" } ] } ], "diningPlateInfo": [ { "orderId": "string", "diningPlateId": "string", "qrCode": "string", "chipCode": "string", "isPay": true, "goodsInfo": [ { "id": "string", "groupId": "string", "orderId": "string", "diningPlateId": "string", "goodsId": "string", "goodsName": "string", "totalAmount": 0, "price": "string", "goodsWeight": 0, "goodsAttribute": [ { "attributeId": "string", "attributeName": "string" } ] } ] } ], "memberInfo": { "isMember": true, "name": "string" }, "isFree": true }, "succeeded": true, "errors": "string", "extras": "string", "timestamp": 0 }'; | |||
const publicrequestData = [ | |||
@@ -18,19 +18,62 @@ const publicrequestData = [ | |||
]; | |||
const requestData = [ | |||
{ attribute: 'createId', type: 'string', isrequired: "是", explicate: '创建人' }, | |||
{ attribute: 'qrCode', type: 'string', isrequired: "是", explicate: '二维码' }, | |||
{ attribute: 'openId', type: 'string', isrequired: "是", explicate: '订单ID' }, | |||
]; | |||
const returnData = [ | |||
{ attribute: 'statusCode', type: 'int', isrequired: "是", explicate: '状态码' }, | |||
{ attribute: 'data', type: 'string', isrequired: "否", explicate: '订单具体信息' }, | |||
{ attribute: 'data', type: 'obj', isrequired: "否", explicate: '订单具体信息' }, | |||
{ attribute: 'succeeded', type: 'bool', isrequired: "是", explicate: '状态' }, | |||
{ attribute: 'errors', type: 'string', isrequired: "否", explicate: '错误信息' }, | |||
{ attribute: 'extras', type: 'string', isrequired: "否", explicate: '' }, | |||
{ attribute: 'timestamp', type: 'long', isrequired: "是", explicate: '时间戳' }, | |||
]; | |||
const returnData1 = [ | |||
{ attribute: 'id', type: 'string', isrequired: "是", explicate: '订单ID' }, | |||
{ attribute: 'orderNumber', type: 'string', isrequired: "是", explicate: '订单编号' }, | |||
{ attribute: 'totalAmount', type: 'decimal ', isrequired: "是", explicate: '总价' }, | |||
{ attribute: 'subject', type: 'string ', isrequired: "是", explicate: '订单标题' }, | |||
{ attribute: 'sceneId', type: 'string ', isrequired: "是", explicate: '场景ID' }, | |||
{ attribute: 'states', type: '枚举 ', isrequired: "是", explicate: '0:选菜中 1:订单完成' }, | |||
{ attribute: 'payStates', type: '枚举 ', isrequired: "是", explicate: '0:未支付 1:已支付' }, | |||
{ attribute: 'createAt', type: 'string ', isrequired: "是", explicate: '创建时间' }, | |||
{ attribute: 'createId', type: 'string ', isrequired: "是", explicate: 'Openid' }, | |||
{ attribute: 'transactionId', type: 'string ', isrequired: "是", explicate: '交易单号' }, | |||
{ attribute: 'goodsInfo', type: 'array ', isrequired: "是", explicate: '商品信息' }, | |||
{ attribute: 'diningPlateInfo', type: 'array ', isrequired: "是", explicate: '餐盘信息' }, | |||
{ attribute: 'memberInfo', type: 'obj ', isrequired: "是", explicate: '会员信息' }, | |||
]; | |||
//商品信息 | |||
const returnData2 = [ | |||
{ attribute: 'id', type: 'string', isrequired: "是", explicate: '订单ID' }, | |||
{ attribute: 'orderId', type: 'string', isrequired: "是", explicate: '订单id' }, | |||
{ attribute: 'diningPlateId', type: 'string ', isrequired: "是", explicate: '餐盘id' }, | |||
{ attribute: 'goodsId', type: 'string ', isrequired: "是", explicate: '商品id' }, | |||
{ attribute: 'goodsName', type: 'string ', isrequired: "是", explicate: '商品名称' }, | |||
{ attribute: 'totalAmount', type: 'decimal ', isrequired: "是", explicate: '总价' }, | |||
{ attribute: 'price', type: 'decimal ', isrequired: "是", explicate: '单价' }, | |||
{ attribute: 'goodsWeight', type: 'decimal ', isrequired: "是", explicate: '总量' }, | |||
{ attribute: 'goodsAttribute', type: 'array ', isrequired: "是", explicate: '商品属性' }, | |||
]; | |||
//餐盘信息 | |||
const returnData3 = [ | |||
{ attribute: 'id', type: 'string', isrequired: "是", explicate: '订单ID' }, | |||
{ attribute: 'orderId', type: 'string', isrequired: "是", explicate: '订单id' }, | |||
{ attribute: 'diningPlateId', type: 'string ', isrequired: "是", explicate: '餐盘id' }, | |||
{ attribute: 'qrCode', type: 'string ', isrequired: "是", explicate: '二维码' }, | |||
{ attribute: 'chipCode', type: 'string ', isrequired: "是", explicate: '芯片码' }, | |||
{ attribute: 'isPay', type: 'bool ', isrequired: "是", explicate: '是否支付' }, | |||
{ attribute: 'goodsInfo', type: 'obj ', isrequired: "是", explicate: '商品信息' }, | |||
]; | |||
const requestInfoData = [ | |||
]; | |||
const requestColumns = [ | |||
{ | |||
title: '属性', | |||
@@ -74,22 +117,22 @@ const returnColumns = [ | |||
const App = () => ( | |||
<> | |||
<Title>称重订单-根据订单openId获取订单信息</Title> | |||
<Title>称重订单-创建</Title> | |||
<Title level={4}>接口说明</Title> | |||
<Paragraph> | |||
根据订单openId获取订单信息 | |||
创建订单 | |||
</Paragraph> | |||
<Title level={4}>接口英文名</Title> | |||
<Paragraph> | |||
<Text strong>GetWeighOrderByOpenId</Text> | |||
<Text strong>GetWeighOrderByOrderId</Text> | |||
</Paragraph> | |||
<Title level={4}>功能描述</Title> | |||
<Paragraph> | |||
根据订单ID获取订单信息 | |||
创建订单 | |||
</Paragraph> | |||
@@ -101,7 +144,7 @@ const App = () => ( | |||
<Title level={4}>调用方式</Title> | |||
<Paragraph> | |||
<blockquote>{" POST http://localhost:5003/api/ExternalPlatform/WeighOrder/GetWeighOrderByOpenId"}</blockquote> | |||
<blockquote>{" POST api/ExternalPlatform/WeighOrder/GetWeighOrderByOrderId"}</blockquote> | |||
</Paragraph> | |||
<Title level={4}>公共请求参数</Title> | |||
@@ -110,25 +153,37 @@ const App = () => ( | |||
<Table pagination={{ position: ["none"] }} | |||
columns={requestColumns} dataSource={publicrequestData} /> | |||
</Paragraph> | |||
<Title level={4}>请求参数</Title> | |||
Body | |||
<Paragraph> | |||
<Table pagination={{ position: ["none"] }} columns={requestColumns} | |||
// expandable={{ | |||
// expandedRowRender: (record) => ( | |||
// <Table columns={requestColumns} dataSource={requestInfoData} pagination={false} /> | |||
// ), | |||
// rowExpandable: (record) => record.attribute == 'dataInfo', | |||
// }} | |||
dataSource={requestData} /> | |||
expandable={{ | |||
// expandedRowRender: (record) => ( | |||
// <Table columns={requestColumns} dataSource={requestInfoData} pagination={false} /> | |||
// ), | |||
rowExpandable: (record) => record.attribute == 'dataInfo', | |||
}} | |||
dataSource={requestData} /> | |||
</Paragraph> | |||
<Title level={4}>返回参数</Title> | |||
<Paragraph> | |||
{/* <pre>{"66666666666666666666666"}</pre> */} | |||
<Table pagination={{ position: ["none"] }} columns={returnColumns} dataSource={returnData} /> | |||
<Table pagination={{ position: ["none"] }} | |||
expandable={{ | |||
expandedRowRender: (record) => ( | |||
<Table columns={requestColumns} dataSource={returnData1} pagination={false} /> | |||
), | |||
rowExpandable: (record) => record.attribute == 'data', | |||
}} | |||
columns={returnColumns} dataSource={returnData} /> | |||
<blockquote>{"商品"}</blockquote> | |||
<Table pagination={{ position: ["none"] }} columns={returnColumns} dataSource={returnData1} /> | |||
<blockquote>{"餐盘"}</blockquote> | |||
<Table pagination={{ position: ["none"] }} columns={returnColumns} dataSource={returnData2} /> | |||
</Paragraph> | |||
<Title level={4}>调用示例</Title> | |||
@@ -155,9 +210,5 @@ const App = () => ( | |||
<pre>{JSON.stringify(JSON.parse(returnstr), null, 4)}</pre> | |||
</Paragraph> | |||
</> | |||
); | |||
export default App; |
@@ -9,8 +9,8 @@ import { Descriptions, Radio, Space, Switch } from 'antd'; | |||
import dayjs from 'dayjs'; | |||
import { useState } from 'react'; | |||
const requeststr = '{ "orderId": "string" }'; | |||
const returnstr = '{ "statusCode": 0, "data": { "id": "string", "groupId": "string", "orderNumber": "string", "totalAmount": 0, "subject": "string", "sceneId": "string", "states": 0, "payStates": 0, "createAt": "2024-03-15T02:23:30.164Z", "createId": "string", "goodsInfo": [ { "id": "string", "groupId": "string", "orderId": "string", "diningPlateId": "string", "goodsId": "string", "goodsName": "string", "totalAmount": 0, "goodsWeight": 0, "goodsAttribute": [ { "attributeId": "string", "attributeName": "string" } ] } ], "diningPlateInfo": [ { "orderId": "string", "diningPlateId": "string", "qrCode": "string", "chipCode": "string", "goodsInfo": [ { "id": "string", "groupId": "string", "orderId": "string", "diningPlateId": "string", "goodsId": "string", "goodsName": "string", "totalAmount": 0, "goodsWeight": 0, "goodsAttribute": [ { "attributeId": "string", "attributeName": "string" } ] } ] } ], "memberInfo": { "isMember": true, "name": "string" } }, "succeeded": true, "errors": "string", "extras": "string", "timestamp": 0 }'; | |||
const requeststr = '{ "openId": "string" }'; | |||
const returnstr = '{ "statusCode": 0, "data": { "id": "string", "groupId": "string", "orderNumber": "string", "totalAmount": 0, "subject": "string", "sceneId": "string", "states": 0, "payStates": 0, "createAt": "2024-03-22T02:48:36.595Z", "createId": "string", "transactionId": "string", "tradeNo": "string", "goodsInfo": [ { "id": "string", "groupId": "string", "orderId": "string", "diningPlateId": "string", "goodsId": "string", "goodsName": "string", "totalAmount": 0, "price": "string", "goodsWeight": 0, "goodsAttribute": [ { "attributeId": "string", "attributeName": "string" } ] } ], "diningPlateInfo": [ { "orderId": "string", "diningPlateId": "string", "qrCode": "string", "chipCode": "string", "isPay": true, "goodsInfo": [ { "id": "string", "groupId": "string", "orderId": "string", "diningPlateId": "string", "goodsId": "string", "goodsName": "string", "totalAmount": 0, "price": "string", "goodsWeight": 0, "goodsAttribute": [ { "attributeId": "string", "attributeName": "string" } ] } ] } ], "memberInfo": { "isMember": true, "name": "string" }, "isFree": true }, "succeeded": true, "errors": "string", "extras": "string", "timestamp": 0 }'; | |||
const publicrequestData = [ | |||
@@ -18,19 +18,62 @@ const publicrequestData = [ | |||
]; | |||
const requestData = [ | |||
{ attribute: 'createId', type: 'string', isrequired: "是", explicate: '创建人' }, | |||
{ attribute: 'qrCode', type: 'string', isrequired: "是", explicate: '二维码' }, | |||
{ attribute: 'openId', type: 'string', isrequired: "是", explicate: 'openId' }, | |||
]; | |||
const returnData = [ | |||
{ attribute: 'statusCode', type: 'int', isrequired: "是", explicate: '状态码' }, | |||
{ attribute: 'data', type: 'string', isrequired: "否", explicate: '订单具体信息' }, | |||
{ attribute: 'data', type: 'obj', isrequired: "否", explicate: '订单具体信息' }, | |||
{ attribute: 'succeeded', type: 'bool', isrequired: "是", explicate: '状态' }, | |||
{ attribute: 'errors', type: 'string', isrequired: "否", explicate: '错误信息' }, | |||
{ attribute: 'extras', type: 'string', isrequired: "否", explicate: '' }, | |||
{ attribute: 'timestamp', type: 'long', isrequired: "是", explicate: '时间戳' }, | |||
]; | |||
const returnData1 = [ | |||
{ attribute: 'id', type: 'string', isrequired: "是", explicate: '订单ID' }, | |||
{ attribute: 'orderNumber', type: 'string', isrequired: "是", explicate: '订单编号' }, | |||
{ attribute: 'totalAmount', type: 'decimal ', isrequired: "是", explicate: '总价' }, | |||
{ attribute: 'subject', type: 'string ', isrequired: "是", explicate: '订单标题' }, | |||
{ attribute: 'sceneId', type: 'string ', isrequired: "是", explicate: '场景ID' }, | |||
{ attribute: 'states', type: '枚举 ', isrequired: "是", explicate: '0:选菜中 1:订单完成' }, | |||
{ attribute: 'payStates', type: '枚举 ', isrequired: "是", explicate: '0:未支付 1:已支付' }, | |||
{ attribute: 'createAt', type: 'string ', isrequired: "是", explicate: '创建时间' }, | |||
{ attribute: 'createId', type: 'string ', isrequired: "是", explicate: 'Openid' }, | |||
{ attribute: 'transactionId', type: 'string ', isrequired: "是", explicate: '交易单号' }, | |||
{ attribute: 'goodsInfo', type: 'array ', isrequired: "是", explicate: '商品信息' }, | |||
{ attribute: 'diningPlateInfo', type: 'array ', isrequired: "是", explicate: '餐盘信息' }, | |||
{ attribute: 'memberInfo', type: 'obj ', isrequired: "是", explicate: '会员信息' }, | |||
]; | |||
//商品信息 | |||
const returnData2 = [ | |||
{ attribute: 'id', type: 'string', isrequired: "是", explicate: '订单ID' }, | |||
{ attribute: 'orderId', type: 'string', isrequired: "是", explicate: '订单id' }, | |||
{ attribute: 'diningPlateId', type: 'string ', isrequired: "是", explicate: '餐盘id' }, | |||
{ attribute: 'goodsId', type: 'string ', isrequired: "是", explicate: '商品id' }, | |||
{ attribute: 'goodsName', type: 'string ', isrequired: "是", explicate: '商品名称' }, | |||
{ attribute: 'totalAmount', type: 'decimal ', isrequired: "是", explicate: '总价' }, | |||
{ attribute: 'price', type: 'decimal ', isrequired: "是", explicate: '单价' }, | |||
{ attribute: 'goodsWeight', type: 'decimal ', isrequired: "是", explicate: '总量' }, | |||
{ attribute: 'goodsAttribute', type: 'array ', isrequired: "是", explicate: '商品属性' }, | |||
]; | |||
//餐盘信息 | |||
const returnData3 = [ | |||
{ attribute: 'id', type: 'string', isrequired: "是", explicate: '订单ID' }, | |||
{ attribute: 'orderId', type: 'string', isrequired: "是", explicate: '订单id' }, | |||
{ attribute: 'diningPlateId', type: 'string ', isrequired: "是", explicate: '餐盘id' }, | |||
{ attribute: 'qrCode', type: 'string ', isrequired: "是", explicate: '二维码' }, | |||
{ attribute: 'chipCode', type: 'string ', isrequired: "是", explicate: '芯片码' }, | |||
{ attribute: 'isPay', type: 'bool ', isrequired: "是", explicate: '是否支付' }, | |||
{ attribute: 'goodsInfo', type: 'obj ', isrequired: "是", explicate: '商品信息' }, | |||
]; | |||
const requestInfoData = [ | |||
]; | |||
const requestColumns = [ | |||
{ | |||
title: '属性', | |||
@@ -74,22 +117,22 @@ const returnColumns = [ | |||
const App = () => ( | |||
<> | |||
<Title>称重订单-根据订单ID获取订单信息</Title> | |||
<Title>称重订单-创建</Title> | |||
<Title level={4}>接口说明</Title> | |||
<Paragraph> | |||
根据订单ID获取订单信息 | |||
创建订单 | |||
</Paragraph> | |||
<Title level={4}>接口英文名</Title> | |||
<Paragraph> | |||
<Text strong>GetWeighOrderByOrderId</Text> | |||
<Text strong>GetWeighOrderPageByOpenId</Text> | |||
</Paragraph> | |||
<Title level={4}>功能描述</Title> | |||
<Paragraph> | |||
根据订单ID获取订单信息 | |||
创建订单 | |||
</Paragraph> | |||
@@ -101,7 +144,7 @@ const App = () => ( | |||
<Title level={4}>调用方式</Title> | |||
<Paragraph> | |||
<blockquote>{" POST http://localhost:5003/api/ExternalPlatform/WeighOrder/GetWeighOrderByOrderId"}</blockquote> | |||
<blockquote>{" POST api/ExternalPlatform/WeighOrder/GetWeighOrderPageByOpenId"}</blockquote> | |||
</Paragraph> | |||
<Title level={4}>公共请求参数</Title> | |||
@@ -110,25 +153,37 @@ const App = () => ( | |||
<Table pagination={{ position: ["none"] }} | |||
columns={requestColumns} dataSource={publicrequestData} /> | |||
</Paragraph> | |||
<Title level={4}>请求参数</Title> | |||
Body | |||
<Paragraph> | |||
<Table pagination={{ position: ["none"] }} columns={requestColumns} | |||
// expandable={{ | |||
// expandedRowRender: (record) => ( | |||
// <Table columns={requestColumns} dataSource={requestInfoData} pagination={false} /> | |||
// ), | |||
// rowExpandable: (record) => record.attribute == 'dataInfo', | |||
// }} | |||
dataSource={requestData} /> | |||
expandable={{ | |||
// expandedRowRender: (record) => ( | |||
// <Table columns={requestColumns} dataSource={requestInfoData} pagination={false} /> | |||
// ), | |||
rowExpandable: (record) => record.attribute == 'dataInfo', | |||
}} | |||
dataSource={requestData} /> | |||
</Paragraph> | |||
<Title level={4}>返回参数</Title> | |||
<Paragraph> | |||
{/* <pre>{"66666666666666666666666"}</pre> */} | |||
<Table pagination={{ position: ["none"] }} columns={returnColumns} dataSource={returnData} /> | |||
<Table pagination={{ position: ["none"] }} | |||
expandable={{ | |||
expandedRowRender: (record) => ( | |||
<Table columns={requestColumns} dataSource={returnData1} pagination={false} /> | |||
), | |||
rowExpandable: (record) => record.attribute == 'data', | |||
}} | |||
columns={returnColumns} dataSource={returnData} /> | |||
<blockquote>{"商品"}</blockquote> | |||
<Table pagination={{ position: ["none"] }} columns={returnColumns} dataSource={returnData1} /> | |||
<blockquote>{"餐盘"}</blockquote> | |||
<Table pagination={{ position: ["none"] }} columns={returnColumns} dataSource={returnData2} /> | |||
</Paragraph> | |||
<Title level={4}>调用示例</Title> | |||
@@ -155,9 +210,5 @@ const App = () => ( | |||
<pre>{JSON.stringify(JSON.parse(returnstr), null, 4)}</pre> | |||
</Paragraph> | |||
</> | |||
); | |||
export default App; |
@@ -0,0 +1,217 @@ | |||
import React from 'react'; | |||
import { Divider, Typography, Table } from 'antd'; | |||
const { Title, Paragraph, Text, Link } = Typography; | |||
import Field from '@ant-design/pro-field'; | |||
import styles from './index.less'; | |||
import { ProField } from '@ant-design/pro-components'; | |||
import { Descriptions, Radio, Space, Switch } from 'antd'; | |||
import dayjs from 'dayjs'; | |||
import { useState } from 'react'; | |||
const requeststr = '{ "current": 0, "pageSize": 0, "openId": "string", "states": 0 }'; | |||
const returnstr = '{ "statusCode": 0, "data": { "id": "string", "groupId": "string", "orderNumber": "string", "totalAmount": 0, "subject": "string", "sceneId": "string", "states": 0, "payStates": 0, "createAt": "2024-03-22T02:48:36.595Z", "createId": "string", "transactionId": "string", "tradeNo": "string", "goodsInfo": [ { "id": "string", "groupId": "string", "orderId": "string", "diningPlateId": "string", "goodsId": "string", "goodsName": "string", "totalAmount": 0, "price": "string", "goodsWeight": 0, "goodsAttribute": [ { "attributeId": "string", "attributeName": "string" } ] } ], "diningPlateInfo": [ { "orderId": "string", "diningPlateId": "string", "qrCode": "string", "chipCode": "string", "isPay": true, "goodsInfo": [ { "id": "string", "groupId": "string", "orderId": "string", "diningPlateId": "string", "goodsId": "string", "goodsName": "string", "totalAmount": 0, "price": "string", "goodsWeight": 0, "goodsAttribute": [ { "attributeId": "string", "attributeName": "string" } ] } ] } ], "memberInfo": { "isMember": true, "name": "string" }, "isFree": true }, "succeeded": true, "errors": "string", "extras": "string", "timestamp": 0 }'; | |||
const publicrequestData = [ | |||
{ attribute: 'key', type: 'string', isrequired: "是", explicate: '平台秘钥' } | |||
]; | |||
const requestData = [ | |||
{ attribute: 'current', type: 'int', isrequired: "是", explicate: '当前页' }, | |||
{ attribute: 'pageSize', type: 'int', isrequired: "是", explicate: '页容量' }, | |||
{ attribute: 'openId', type: 'string', isrequired: "是", explicate: 'openId' }, | |||
{ attribute: 'states', type: 'string', isrequired: "是", explicate: '0:选菜中 1:完成' }, | |||
]; | |||
const returnData = [ | |||
{ attribute: 'statusCode', type: 'int', isrequired: "是", explicate: '状态码' }, | |||
{ attribute: 'data', type: 'obj', isrequired: "否", explicate: '订单具体信息' }, | |||
{ attribute: 'succeeded', type: 'bool', isrequired: "是", explicate: '状态' }, | |||
{ attribute: 'errors', type: 'string', isrequired: "否", explicate: '错误信息' }, | |||
{ attribute: 'extras', type: 'string', isrequired: "否", explicate: '' }, | |||
{ attribute: 'timestamp', type: 'long', isrequired: "是", explicate: '时间戳' }, | |||
]; | |||
const returnData1 = [ | |||
{ attribute: 'id', type: 'string', isrequired: "是", explicate: '订单ID' }, | |||
{ attribute: 'orderNumber', type: 'string', isrequired: "是", explicate: '订单编号' }, | |||
{ attribute: 'totalAmount', type: 'decimal ', isrequired: "是", explicate: '总价' }, | |||
{ attribute: 'subject', type: 'string ', isrequired: "是", explicate: '订单标题' }, | |||
{ attribute: 'sceneId', type: 'string ', isrequired: "是", explicate: '场景ID' }, | |||
{ attribute: 'states', type: '枚举 ', isrequired: "是", explicate: '0:选菜中 1:订单完成' }, | |||
{ attribute: 'payStates', type: '枚举 ', isrequired: "是", explicate: '0:未支付 1:已支付' }, | |||
{ attribute: 'createAt', type: 'string ', isrequired: "是", explicate: '创建时间' }, | |||
{ attribute: 'createId', type: 'string ', isrequired: "是", explicate: 'Openid' }, | |||
{ attribute: 'transactionId', type: 'string ', isrequired: "是", explicate: '交易单号' }, | |||
{ attribute: 'goodsInfo', type: 'array ', isrequired: "是", explicate: '商品信息' }, | |||
{ attribute: 'diningPlateInfo', type: 'array ', isrequired: "是", explicate: '餐盘信息' }, | |||
{ attribute: 'memberInfo', type: 'obj ', isrequired: "是", explicate: '会员信息' }, | |||
]; | |||
//商品信息 | |||
const returnData2 = [ | |||
{ attribute: 'id', type: 'string', isrequired: "是", explicate: '订单ID' }, | |||
{ attribute: 'orderId', type: 'string', isrequired: "是", explicate: '订单id' }, | |||
{ attribute: 'diningPlateId', type: 'string ', isrequired: "是", explicate: '餐盘id' }, | |||
{ attribute: 'goodsId', type: 'string ', isrequired: "是", explicate: '商品id' }, | |||
{ attribute: 'goodsName', type: 'string ', isrequired: "是", explicate: '商品名称' }, | |||
{ attribute: 'totalAmount', type: 'decimal ', isrequired: "是", explicate: '总价' }, | |||
{ attribute: 'price', type: 'decimal ', isrequired: "是", explicate: '单价' }, | |||
{ attribute: 'goodsWeight', type: 'decimal ', isrequired: "是", explicate: '总量' }, | |||
{ attribute: 'goodsAttribute', type: 'array ', isrequired: "是", explicate: '商品属性' }, | |||
]; | |||
//餐盘信息 | |||
const returnData3 = [ | |||
{ attribute: 'id', type: 'string', isrequired: "是", explicate: '订单ID' }, | |||
{ attribute: 'orderId', type: 'string', isrequired: "是", explicate: '订单id' }, | |||
{ attribute: 'diningPlateId', type: 'string ', isrequired: "是", explicate: '餐盘id' }, | |||
{ attribute: 'qrCode', type: 'string ', isrequired: "是", explicate: '二维码' }, | |||
{ attribute: 'chipCode', type: 'string ', isrequired: "是", explicate: '芯片码' }, | |||
{ attribute: 'isPay', type: 'bool ', isrequired: "是", explicate: '是否支付' }, | |||
{ attribute: 'goodsInfo', type: 'obj ', isrequired: "是", explicate: '商品信息' }, | |||
]; | |||
const requestInfoData = [ | |||
]; | |||
const requestColumns = [ | |||
{ | |||
title: '属性', | |||
dataIndex: 'attribute', | |||
key: 'attribute', | |||
}, | |||
{ | |||
title: '类型', | |||
dataIndex: 'type', | |||
key: 'type', | |||
}, | |||
{ | |||
title: '必填', | |||
dataIndex: 'isrequired', | |||
key: 'isrequired', | |||
}, | |||
{ | |||
title: '说明', | |||
dataIndex: 'explicate', | |||
key: 'explicate', | |||
} | |||
]; | |||
const returnColumns = [ | |||
{ | |||
title: '属性', | |||
dataIndex: 'attribute', | |||
key: 'attribute', | |||
}, | |||
{ | |||
title: '类型', | |||
dataIndex: 'type', | |||
key: 'type', | |||
}, | |||
{ | |||
title: '说明', | |||
dataIndex: 'explicate', | |||
key: 'explicate', | |||
} | |||
]; | |||
const App = () => ( | |||
<> | |||
<Title>称重订单-创建</Title> | |||
<Title level={4}>接口说明</Title> | |||
<Paragraph> | |||
创建订单 | |||
</Paragraph> | |||
<Title level={4}>接口英文名</Title> | |||
<Paragraph> | |||
<Text strong>GetWeighOrderPageByOpenId</Text> | |||
</Paragraph> | |||
<Title level={4}>功能描述</Title> | |||
<Paragraph> | |||
创建订单 | |||
</Paragraph> | |||
<Title level={4}>注意事项</Title> | |||
<Paragraph> | |||
1、该接口仅支持POST调用<br /> | |||
</Paragraph> | |||
<Title level={4}>调用方式</Title> | |||
<Paragraph> | |||
<blockquote>{" POST api/ExternalPlatform/WeighOrder/GetWeighOrderPageByOpenId"}</blockquote> | |||
</Paragraph> | |||
<Title level={4}>公共请求参数</Title> | |||
HTTP头参数 | |||
<Paragraph> | |||
<Table pagination={{ position: ["none"] }} | |||
columns={requestColumns} dataSource={publicrequestData} /> | |||
</Paragraph> | |||
<Title level={4}>请求参数</Title> | |||
Body | |||
<Paragraph> | |||
<Table pagination={{ position: ["none"] }} columns={requestColumns} | |||
expandable={{ | |||
// expandedRowRender: (record) => ( | |||
// <Table columns={requestColumns} dataSource={requestInfoData} pagination={false} /> | |||
// ), | |||
rowExpandable: (record) => record.attribute == 'dataInfo', | |||
}} | |||
dataSource={requestData} /> | |||
</Paragraph> | |||
<Title level={4}>返回参数</Title> | |||
<Paragraph> | |||
{/* <pre>{"66666666666666666666666"}</pre> */} | |||
<Table pagination={{ position: ["none"] }} | |||
expandable={{ | |||
expandedRowRender: (record) => ( | |||
<Table columns={requestColumns} dataSource={returnData1} pagination={false} /> | |||
), | |||
rowExpandable: (record) => record.attribute == 'data', | |||
}} | |||
columns={returnColumns} dataSource={returnData} /> | |||
<blockquote>{"商品"}</blockquote> | |||
<Table pagination={{ position: ["none"] }} columns={returnColumns} dataSource={returnData1} /> | |||
<blockquote>{"餐盘"}</blockquote> | |||
<Table pagination={{ position: ["none"] }} columns={returnColumns} dataSource={returnData2} /> | |||
</Paragraph> | |||
<Title level={4}>调用示例</Title> | |||
<Paragraph> | |||
<blockquote>{"示例说明: post请求"}</blockquote> | |||
</Paragraph> | |||
<Title level={4}>公共请求数据示例</Title> | |||
<Paragraph> | |||
<blockquote>{"请求头添加如下信息"}</blockquote> | |||
<pre>{' "key: a92370b8-a633-47e6-9662-7755b8fe9ee4" '}</pre> | |||
</Paragraph> | |||
<Title level={4}>请求数据示例</Title> | |||
<Paragraph> | |||
<blockquote>{"示例说明: post请求"}</blockquote> | |||
<pre>{JSON.stringify(JSON.parse(requeststr), null, 4)}</pre> | |||
</Paragraph> | |||
<Title level={4}>返回数据示例</Title> | |||
<Paragraph> | |||
<blockquote>{"示例说明: post请求"}</blockquote> | |||
<pre>{JSON.stringify(JSON.parse(returnstr), null, 4)}</pre> | |||
</Paragraph> | |||
</> | |||
); | |||
export default App; |
@@ -0,0 +1,160 @@ | |||
import React from 'react'; | |||
import { Divider, Typography, Table } from 'antd'; | |||
const { Title, Paragraph, Text, Link } = Typography; | |||
import Field from '@ant-design/pro-field'; | |||
import styles from './index.less'; | |||
import { ProField } from '@ant-design/pro-components'; | |||
import { Descriptions, Radio, Space, Switch } from 'antd'; | |||
import dayjs from 'dayjs'; | |||
import { useState } from 'react'; | |||
const requeststr = '{ "orderId": "string", "payStates": 0, "states": 0 }'; | |||
const returnstr = '{ "statusCode": 0, "data": true, "succeeded": true, "errors": "string", "extras": "string", "timestamp": 0 }'; | |||
const publicrequestData = [ | |||
{ attribute: 'key', type: 'string', isrequired: "是", explicate: '平台秘钥' } | |||
]; | |||
const requestData = [ | |||
{ attribute: 'orderId', type: 'string', isrequired: "是", explicate: '订单号' }, | |||
{ attribute: 'payStates', type: 'int', isrequired: "是", explicate: '0:未付款 1:已付款' }, | |||
{ attribute: 'states', type: 'int', isrequired: "是", explicate: '0:选菜中 1:已完成' } | |||
]; | |||
const returnData = [ | |||
{ attribute: 'statusCode', type: 'int', isrequired: "是", explicate: '状态码' }, | |||
{ attribute: 'data', type: 'string', isrequired: "否", explicate: 'bool值 是否成功' }, | |||
{ attribute: 'succeeded', type: 'bool', isrequired: "是", explicate: '状态' }, | |||
{ attribute: 'errors', type: 'string', isrequired: "否", explicate: '错误信息' }, | |||
{ attribute: 'extras', type: 'string', isrequired: "否", explicate: '' }, | |||
{ attribute: 'timestamp', type: 'long', isrequired: "是", explicate: '时间戳' }, | |||
]; | |||
const requestColumns = [ | |||
{ | |||
title: '属性', | |||
dataIndex: 'attribute', | |||
key: 'attribute', | |||
}, | |||
{ | |||
title: '类型', | |||
dataIndex: 'type', | |||
key: 'type', | |||
}, | |||
{ | |||
title: '必填', | |||
dataIndex: 'isrequired', | |||
key: 'isrequired', | |||
}, | |||
{ | |||
title: '说明', | |||
dataIndex: 'explicate', | |||
key: 'explicate', | |||
} | |||
]; | |||
const returnColumns = [ | |||
{ | |||
title: '属性', | |||
dataIndex: 'attribute', | |||
key: 'attribute', | |||
}, | |||
{ | |||
title: '类型', | |||
dataIndex: 'type', | |||
key: 'type', | |||
}, | |||
{ | |||
title: '说明', | |||
dataIndex: 'explicate', | |||
key: 'explicate', | |||
} | |||
]; | |||
const App = () => ( | |||
<> | |||
<Title>称重订单-新增商品</Title> | |||
<Title level={4}>接口说明</Title> | |||
<Paragraph> | |||
新增商品 | |||
</Paragraph> | |||
<Title level={4}>接口英文名</Title> | |||
<Paragraph> | |||
<Text strong>UpdateWeighOrderStates</Text> | |||
</Paragraph> | |||
<Title level={4}>功能描述</Title> | |||
<Paragraph> | |||
新增商品 | |||
</Paragraph> | |||
<Title level={4}>注意事项</Title> | |||
<Paragraph> | |||
1、该接口仅支持POST调用<br /> | |||
</Paragraph> | |||
<Title level={4}>调用方式</Title> | |||
<Paragraph> | |||
<blockquote>{" POST /api/ExternalPlatform/WeighOrder/UpdateWeighOrderStates"}</blockquote> | |||
</Paragraph> | |||
<Title level={4}>公共请求参数</Title> | |||
HTTP头参数 | |||
<Paragraph> | |||
<Table pagination={{ position: ["none"] }} | |||
columns={requestColumns} dataSource={publicrequestData} /> | |||
</Paragraph> | |||
<Title level={4}>请求参数</Title> | |||
Body | |||
<Paragraph> | |||
<Table pagination={{ position: ["none"] }} columns={requestColumns} | |||
// expandable={{ | |||
// expandedRowRender: (record) => ( | |||
// <Table columns={requestColumns} dataSource={requestInfoData} pagination={false} /> | |||
// ), | |||
// rowExpandable: (record) => record.attribute == 'dataInfo', | |||
// }} | |||
dataSource={requestData} /> | |||
</Paragraph> | |||
<Title level={4}>返回参数</Title> | |||
<Paragraph> | |||
{/* <pre>{"66666666666666666666666"}</pre> */} | |||
<Table pagination={{ position: ["none"] }} columns={returnColumns} dataSource={returnData} /> | |||
</Paragraph> | |||
<Title level={4}>调用示例</Title> | |||
<Paragraph> | |||
<blockquote>{"示例说明: post请求"}</blockquote> | |||
</Paragraph> | |||
<Title level={4}>公共请求数据示例</Title> | |||
<Paragraph> | |||
<blockquote>{"请求头添加如下信息"}</blockquote> | |||
<pre>{' "key: a92370b8-a633-47e6-9662-7755b8fe9ee4" '}</pre> | |||
</Paragraph> | |||
<Title level={4}>请求数据示例</Title> | |||
<Paragraph> | |||
<blockquote>{"示例说明: post请求"}</blockquote> | |||
<pre>{JSON.stringify(JSON.parse(requeststr), null, 4)}</pre> | |||
</Paragraph> | |||
<Title level={4}>返回数据示例</Title> | |||
<Paragraph> | |||
<blockquote>{"示例说明: post请求"}</blockquote> | |||
<pre>{JSON.stringify(JSON.parse(returnstr), null, 4)}</pre> | |||
</Paragraph> | |||
</> | |||
); | |||
export default App; |