@@ -0,0 +1,9 @@ | |||
/node_modules | |||
/.env.local | |||
/.umirc.local.ts | |||
/config/config.local.ts | |||
/src/.umi | |||
/src/.umi-production | |||
/src/.umi-test | |||
/dist | |||
.swc |
@@ -0,0 +1,2 @@ | |||
registry=https://registry.npmmirror.com/ | |||
@@ -0,0 +1,62 @@ | |||
import { defineConfig } from "umi"; | |||
export default defineConfig({ | |||
routes: [ | |||
{ path: "/", component: "index" }, | |||
{ path: "/docs", component: "docs" }, | |||
{ path: "/products", component: "products" }, | |||
//开发前 | |||
{ | |||
path: '/htmls/BeforeDevelopment/Log', | |||
component: './htmls/BeforeDevelopment/Log', | |||
}, | |||
{ | |||
path: '/htmls/BeforeDevelopment/Index', | |||
component: './htmls/BeforeDevelopment/Index', | |||
}, | |||
//开发后 | |||
{ | |||
path: '/htmls/StartDevelopment/Safety', | |||
component: './htmls/StartDevelopment/Safety', | |||
}, | |||
{ | |||
path: '/htmls/StartDevelopment/ProtocolRules', | |||
component: './htmls/StartDevelopment/ProtocolRules', | |||
}, | |||
//api | |||
//授权码 | |||
{ | |||
path: '/htmls/API/Authorize/Platform', | |||
component: './htmls/API/Authorize/Platform', | |||
}, | |||
{ | |||
path: '/htmls/API/Authorize/Material', | |||
component: './htmls/API/Authorize/Material', | |||
}, | |||
// 物料 | |||
{ | |||
path: '/htmls/API/Material/Add', | |||
component: './htmls/API/Material/Add', | |||
}, | |||
{ | |||
path: '/htmls/API/Material/Del', | |||
component: './htmls/API/Material/Del', | |||
}, | |||
{ | |||
path: '/htmls/API/Material/GetPage', | |||
component: './htmls/API/Material/GetPage', | |||
}, | |||
{ | |||
path: '/htmls/API/Material/Update', | |||
component: './htmls/API/Material/Update', | |||
} | |||
], | |||
npmClient: "pnpm", | |||
}); |
@@ -0,0 +1,7 @@ | |||
{ | |||
"ExpandedNodes": [ | |||
"" | |||
], | |||
"SelectedNode": "\\D:\\Work\\BPA.OpenPlatform", | |||
"PreviewInSolutionExplorer": false | |||
} |
@@ -0,0 +1,19 @@ | |||
// @ts-nocheck | |||
// This file is generated by Umi automatically | |||
// DO NOT CHANGE IT MANUALLY! | |||
import React from 'react'; | |||
export async function getRoutes() { | |||
const routes = {"1":{"path":"/","parentId":"@@/global-layout","id":"1"},"2":{"path":"/docs","parentId":"@@/global-layout","id":"2"},"3":{"path":"/products","parentId":"@@/global-layout","id":"3"},"4":{"path":"./html","parentId":"@@/global-layout","id":"4"},"5":{"name":"商品基础信息","icon":"smile","path":"/html","access":"k7","parentId":"@@/global-layout","id":"5"},"@@/global-layout":{"id":"@@/global-layout","path":"/","isLayout":true}} as const; | |||
return { | |||
routes, | |||
routeComponents: { | |||
'1': React.lazy(() => import(/* webpackChunkName: "p__index" */'@/pages/index.tsx')), | |||
'2': React.lazy(() => import(/* webpackChunkName: "p__docs" */'@/pages/docs.tsx')), | |||
'3': React.lazy(() => import(/* webpackChunkName: "p__products" */'@/pages/products.tsx')), | |||
'4': React.lazy(() => import(/* webpackChunkName: "p__products" */'@/pages/products.tsx')), | |||
'5': React.lazy(() => import(/* webpackChunkName: "p__html__index" */'@/pages/user/login')), | |||
'@@/global-layout': React.lazy(() => import(/* webpackChunkName: "layouts__index" */'D:/Work/BPA.OpenPlatform/myapp/src/layouts/index.tsx')), | |||
}, | |||
}; | |||
} |
@@ -0,0 +1,21 @@ | |||
{ | |||
"private": true, | |||
"author": "gwbvipvip <gwbvipvip@163.com>", | |||
"scripts": { | |||
"dev": "umi dev", | |||
"build": "umi build", | |||
"postinstall": "umi setup", | |||
"setup": "umi setup", | |||
"start": "npm run dev" | |||
}, | |||
"dependencies": { | |||
"@ant-design/pro-components": "^2.6.49", | |||
"@ant-design/pro-layout": "^7.17.19", | |||
"umi": "^4.1.2" | |||
}, | |||
"devDependencies": { | |||
"@types/react": "^18.0.33", | |||
"@types/react-dom": "^18.0.11", | |||
"typescript": "^5.0.3" | |||
} | |||
} |
@@ -0,0 +1,43 @@ | |||
*{ | |||
// padding:0; | |||
// margin:0; | |||
// box-sizing: border-box; | |||
} | |||
.navs { | |||
ul { | |||
//padding: 0; | |||
list-style: none; | |||
} | |||
li { | |||
padding:0px; | |||
margin:0px; | |||
list-style:none; | |||
text-decoration:none; | |||
} | |||
} | |||
.head{ | |||
height: 55px; | |||
background-color: #F7F7F7; | |||
border: 1px #F0F0F0 solid; | |||
} | |||
.headcontent1{ | |||
// margin: auto; | |||
padding: 12px; | |||
float: left; | |||
} | |||
.headcontent2{ | |||
// margin: auto; | |||
padding: 14px; | |||
float: left; | |||
} | |||
a { | |||
text-decoration: none; | |||
} | |||
.router-link-active { | |||
text-decoration: none; | |||
} |
@@ -0,0 +1,152 @@ | |||
import { Link, Outlet, history } from 'umi'; | |||
import React from 'react'; | |||
import { Image, Button, Tree, Timeline } from 'antd'; | |||
import styles from './index.less'; | |||
import logoImag from '../assets/logo.png'; | |||
const { TreeNode } = Tree; | |||
export default function Layout() { | |||
const treeData = [ | |||
{ | |||
title: '开发前必读', | |||
key: '开发前必读', | |||
children: [ | |||
{ | |||
title: '首页', | |||
key: '/htmls/BeforeDevelopment/Index', | |||
}, | |||
{ | |||
title: '更新日志', | |||
key: '/htmls/BeforeDevelopment/Log', | |||
}, | |||
], | |||
}, | |||
{ | |||
title: '开始开发', | |||
key: '开始开发', | |||
children: [ | |||
{ | |||
title: '安全规则', | |||
key: '/htmls/StartDevelopment/Safety', | |||
}, | |||
{ | |||
title: '协议规则', | |||
key: '/htmls/StartDevelopment/ProtocolRules', | |||
}, | |||
], | |||
}, | |||
{ | |||
title: 'API管理', | |||
key: 'API管理', | |||
children: [ | |||
{ | |||
title: '授权码', | |||
key: '/htmls/API/Authorize', | |||
children: [ | |||
{ | |||
title: '平台授权码', | |||
key: '/htmls/API/Authorize/Platform', | |||
}, | |||
{ | |||
title: '店铺授权码', | |||
key: '/htmls/API/Authorize/Material', | |||
} | |||
], | |||
}, | |||
{ | |||
title: '物料', | |||
key: '/htmls/API/Material', | |||
children: [ | |||
{ | |||
title: '查询', | |||
key: '/htmls/API/Material/GetPage', | |||
}, | |||
{ | |||
title: '新增', | |||
key: '/htmls/API/Material/Add', | |||
}, | |||
{ | |||
title: '修改', | |||
key: '/htmls/API/Material/Update', | |||
}, | |||
{ | |||
title: '删除', | |||
key: '/htmls/API/Material/Del', | |||
} | |||
], | |||
} | |||
], | |||
}, | |||
]; | |||
const getTreeNode = (data) => { | |||
if (data && data.length > 0) { | |||
return data.map((item) => { | |||
if (item.children) { | |||
return ( | |||
<TreeNode | |||
key={item.key} title={item.title} style={{ fontSize: "15px", fontWeight: 700, marginTop: "8px" }}> | |||
{getTreeNode(item.children)} | |||
</TreeNode> | |||
); | |||
} | |||
return ( | |||
<TreeNode style={{ fontSize: "15px", fontWeight: 700, marginTop: "8px" }} | |||
key={item.key} | |||
title={item.title} | |||
/> | |||
); | |||
}); | |||
} | |||
return []; | |||
}; | |||
return ( | |||
<> | |||
<div className={styles.head} > | |||
<div className={styles.headcontent1}> | |||
<img width={100} src={logoImag} /> | |||
</div> | |||
<div className={styles.headcontent2}> | |||
<div style={{ float: "left" }}> | |||
<span style={{ fontSize: "18px", marginLeft: "-15px" }}>黑菠萝官方文档 ·</span> | |||
</div> | |||
<div style={{ float: "left" }}> | |||
<select style={{ width: 100, height: "100%", border: "0px", marginLeft: "10px", marginTop: "-2px", fontSize: "17px" }}> | |||
<option value="luo">后厨</option> | |||
<option value="ke">门店</option> | |||
<option value="pang">团餐</option> | |||
</select> | |||
</div> | |||
</div> | |||
</div> | |||
<div className={styles.navs}> | |||
<div style={{ width: "77%", float: "right" }}> | |||
<div style={{marginTop:"15px"}}> | |||
<Outlet /> | |||
</div> | |||
</div> | |||
<div style={{ width: "23%", float: "left" }}> | |||
<Tree | |||
onSelect={(selectedKeys, info) => { | |||
if (!info.node.children) { | |||
history.push(selectedKeys.toString()); | |||
} | |||
}} > | |||
{getTreeNode(treeData)} | |||
</Tree> | |||
</div> | |||
</div> | |||
<div className='footer'> | |||
</div> | |||
</> | |||
); | |||
} |
@@ -0,0 +1,9 @@ | |||
const DocsPage = () => { | |||
return ( | |||
<div> | |||
<p>This is umi docs.</p> | |||
</div> | |||
); | |||
}; | |||
export default DocsPage; |
@@ -0,0 +1,36 @@ | |||
import React from 'react'; | |||
import { Divider, Typography } from 'antd'; | |||
const { Title, Paragraph, Text, Link } = Typography; | |||
import img1 from '../../../../../assets/auth2.png'; | |||
import img2 from '../../../../../assets/auth3.png'; | |||
import img3 from '../../../../../assets/auth4.png'; | |||
const App = () => ( | |||
<Typography> | |||
<Title>店铺(场景)授权码</Title> | |||
<Paragraph> | |||
平台授权秘钥,用户创建工单,订单,BOM单 | |||
</Paragraph> | |||
<Title level={4}>平台获取(设置)</Title> | |||
<Paragraph> | |||
1.登陆平台 <br /> | |||
2.找到菜单 <Text code>授权管理 → 店铺(场景)授权</Text><br /> | |||
3.选择店铺(场景) | |||
4.添加授权码 | |||
</Paragraph> | |||
<Title level={4}>流程</Title> | |||
<Paragraph> | |||
<img src={img1} style={{width:"1000px"}} /><br /> | |||
<img src={img2} style={{width:"1000px"}} /><br /> | |||
<img src={img3} style={{width:"1000px"}} /><br /> | |||
</Paragraph> | |||
<Title level={4}>接口获取(设置)</Title> | |||
</Typography> | |||
); | |||
export default App; |
@@ -0,0 +1,30 @@ | |||
import React from 'react'; | |||
import { Divider, Typography } from 'antd'; | |||
const { Title, Paragraph, Text, Link } = Typography; | |||
import img2 from '../../../../../assets/auth1.png'; | |||
import img1 from '../../../../../assets/auth2.png'; | |||
const App = () => ( | |||
<Typography> | |||
<Title>平台授权码</Title> | |||
<Paragraph> | |||
平台授权秘钥,用户创建物料,商品,店铺等基础信息 | |||
</Paragraph> | |||
<Title level={4}>平台获取(设置)</Title> | |||
<Paragraph> | |||
1.登陆平台 <br /> | |||
2.找到菜单 <Text code>授权管理 → 平台授权</Text><br /> | |||
3.添加授权码 | |||
</Paragraph> | |||
<Title level={4}>流程</Title> | |||
<Paragraph> | |||
<img src={img1} style={{width:"1000px"}} /><br /> | |||
<img src={img2} style={{width:"1000px"}} /><br /> | |||
</Paragraph> | |||
</Typography> | |||
); | |||
export default App; |
@@ -0,0 +1,145 @@ | |||
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 = '{ "sign": "string", "key": "string", "code": "string", "name": "string", "typeName": "string", "uintName": "string" }'; | |||
const returnstr = '{ "statusCode": 0, "data": true, "succeeded": true, "errors": "string", "extras": "string", "timestamp": 0 }'; | |||
const requestData = [ | |||
{ attribute: 'key', type: 'string', isrequired: "是", explicate: '平台秘钥' }, | |||
{ attribute: 'sign', type: 'string', isrequired: "是", explicate: '签名,详见 安全规则=>签名算法' }, | |||
{ attribute: 'code', type: 'string', isrequired: "是", explicate: '物料Code' }, | |||
{ attribute: 'name', type: 'string', isrequired: "是", explicate: '物料名称' }, | |||
{ attribute: 'typeName', type: 'string', isrequired: "是", explicate: '物料类型名称' }, | |||
{ attribute: 'uintName', type: 'string', isrequired: "是", explicate: '物料单位名称' }, | |||
]; | |||
const returnData = [ | |||
{ attribute: 'statusCode', type: 'int', isrequired: "是", explicate: '状态码' }, | |||
{ attribute: 'data', type: 'bool', 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 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>AddMaterial</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:5006/api/ExternalPlatform/Material/AddMaterial"}</blockquote> | |||
</Paragraph> | |||
<Title level={4}>请求参数</Title> | |||
<Paragraph> | |||
<Table pagination={{ position: ["none"] }} | |||
columns={requestColumns} 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>{"示例说明: 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,142 @@ | |||
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 = '{ "sign": "string", "key": "string", "materialId": "string" }'; | |||
const returnstr = '{ "statusCode": 0, "data": true, "succeeded": true, "errors": "string", "extras": "string", "timestamp": 0 }'; | |||
const requestData = [ | |||
{ attribute: 'key', type: 'string', isrequired: "是", explicate: '平台秘钥' }, | |||
{ attribute: 'sign', type: 'string', isrequired: "是", explicate: '签名,详见 安全规则=>签名算法' }, | |||
{ attribute: 'materialId', type: 'string', isrequired: "是", explicate: '物料Id' }, | |||
]; | |||
const returnData = [ | |||
{ attribute: 'statusCode', type: 'int', isrequired: "是", explicate: '状态码' }, | |||
{ attribute: 'data', type: 'bool', 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 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>UpdateMateria</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:5006/api/ExternalPlatform/Material/UpdateMateria"}</blockquote> | |||
</Paragraph> | |||
<Title level={4}>请求参数</Title> | |||
<Paragraph> | |||
<Table pagination={{ position: ["none"] }} | |||
columns={requestColumns} 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>{"示例说明: 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,204 @@ | |||
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 = '{ "sign": "f4f80596-3265-4530-9bfa-4a0613ff810f", "key": "f4f80596-3265-4530-9bfa-4a0613ff810f", "current": 1, "pageSize": 10, "name": "string" }'; | |||
const returnstr = '{ "statusCode": 200, "data": { "data": [ { "id": null, "code": "SCFJ4017", "name": "红油", "typeName": null, "uintName": "g" } ], "total": 1 }, "succeeded": true, "errors": null, "extras": null, "timestamp": 1709174257 }'; | |||
const requestData = [ | |||
{ attribute: 'key', type: 'string', isrequired: "是", explicate: '平台秘钥' }, | |||
{ attribute: 'sign', type: 'string', isrequired: "是", explicate: '签名,详见 安全规则=>签名算法' }, | |||
{ attribute: 'current', type: 'int', isrequired: "是", explicate: '当前页' }, | |||
{ attribute: 'pageSize', type: 'int', isrequired: "是", explicate: '页容量' }, | |||
{ attribute: 'name', 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: 'data', type: 'object', isrequired: "否", explicate: '数据' }, | |||
{ attribute: 'total', type: 'int', isrequired: "是", explicate: '总条数' } | |||
]; | |||
const returnDataInfoList = [ | |||
{ attribute: 'id', type: 'string', isrequired: "是", explicate: '物料Id' }, | |||
{ attribute: 'code', type: 'string', isrequired: "是", explicate: '物料Code' }, | |||
{ attribute: 'name', type: 'string', isrequired: "是", explicate: '物料名称' }, | |||
{ attribute: 'typeName', type: 'string', isrequired: "是", explicate: '物料类型名称' }, | |||
{ attribute: 'uintName', type: 'string', 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>GetMaterialPageList</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:5006/api/ExternalPlatform/Material/GetMaterialPageList"}</blockquote> | |||
</Paragraph> | |||
<Title level={4}>请求参数</Title> | |||
<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} /> | |||
), | |||
rowExpandable: (record) => record.attribute == 'data', | |||
}} | |||
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>{"示例说明: 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,145 @@ | |||
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 = '{ "sign": "string", "key": "string", "code": "string", "name": "string", "typeName": "string", "uintName": "string" }'; | |||
const returnstr = '{ "statusCode": 0, "data": true, "succeeded": true, "errors": "string", "extras": "string", "timestamp": 0 }'; | |||
const requestData = [ | |||
{ attribute: 'key', type: 'string', isrequired: "是", explicate: '平台秘钥' }, | |||
{ attribute: 'sign', type: 'string', isrequired: "是", explicate: '签名,详见 安全规则=>签名算法' }, | |||
{ attribute: 'code', type: 'string', isrequired: "是", explicate: '物料Code' }, | |||
{ attribute: 'name', type: 'string', isrequired: "是", explicate: '物料名称' }, | |||
{ attribute: 'typeName', type: 'string', isrequired: "是", explicate: '物料类型名称' }, | |||
{ attribute: 'uintName', type: 'string', isrequired: "是", explicate: '物料单位名称' }, | |||
]; | |||
const returnData = [ | |||
{ attribute: 'statusCode', type: 'int', isrequired: "是", explicate: '状态码' }, | |||
{ attribute: 'data', type: 'bool', 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 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>UpdateMateria</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:5006/api/ExternalPlatform/Material/UpdateMateria"}</blockquote> | |||
</Paragraph> | |||
<Title level={4}>请求参数</Title> | |||
<Paragraph> | |||
<Table pagination={{ position: ["none"] }} | |||
columns={requestColumns} 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>{"示例说明: 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,99 @@ | |||
import React from 'react'; | |||
import { Divider, Typography } from 'antd'; | |||
const { Title, Paragraph, Text, Link } = Typography; | |||
const blockContent = `AntV 是蚂蚁集团全新一代数据可视化解决方案,致力于提供一套简单方便、专业可靠、不限可能的数据可视化最佳实践。得益于丰富的业务场景和用户需求挑战,AntV 经历多年积累与不断打磨,已支撑整个阿里集团内外 20000+ 业务系统,通过了日均千万级 UV 产品的严苛考验。 | |||
我们正在基础图表,图分析,图编辑,地理空间可视化,智能可视化等各个可视化的领域耕耘,欢迎同路人一起前行。`; | |||
const App = () => ( | |||
<Typography> | |||
<Title>Introduction</Title> | |||
<Paragraph> | |||
In the process of internal desktop applications development, many different design specs and | |||
implementations would be involved, which might cause designers and developers difficulties and | |||
duplication and reduce the efficiency of development. | |||
</Paragraph> | |||
<Paragraph> | |||
After massive project practice and summaries, Ant Design, a design language for background | |||
applications, is refined by Ant UED Team, which aims to{' '} | |||
<Text strong> | |||
uniform the user interface specs for internal background projects, lower the unnecessary | |||
cost of design differences and implementation and liberate the resources of design and | |||
front-end development | |||
</Text> | |||
. | |||
</Paragraph> | |||
<Title level={2}>Guidelines and Resources</Title> | |||
<Paragraph> | |||
We supply a series of design principles, practical patterns and high quality design resources | |||
(<Text code>Sketch</Text> and <Text code>Axure</Text>), to help people create their product | |||
prototypes beautifully and efficiently. | |||
</Paragraph> | |||
<Paragraph> | |||
<ul> | |||
<li> | |||
<Link href="/docs/spec/proximity">Principles</Link> | |||
</li> | |||
<li> | |||
<Link href="/docs/spec/overview">Patterns</Link> | |||
</li> | |||
<li> | |||
<Link href="/docs/resources">Resource Download</Link> | |||
</li> | |||
</ul> | |||
</Paragraph> | |||
<Paragraph> | |||
Press <Text keyboard>Esc</Text> to exit... | |||
</Paragraph> | |||
<Divider /> | |||
<Title>介绍</Title> | |||
<Paragraph> | |||
蚂蚁的企业级产品是一个庞大且复杂的体系。这类产品不仅量级巨大且功能复杂,而且变动和并发频繁,常常需要设计与开发能够快速的做出响应。同时这类产品中有存在很多类似的页面以及组件,可以通过抽象得到一些稳定且高复用性的内容。 | |||
</Paragraph> | |||
<Paragraph> | |||
随着商业化的趋势,越来越多的企业级产品对更好的用户体验有了进一步的要求。带着这样的一个终极目标,我们(蚂蚁集团体验技术部)经过大量的项目实践和总结,逐步打磨出一个服务于企业级产品的设计体系 | |||
Ant Design。基于<Text mark>『确定』和『自然』</Text> | |||
的设计价值观,通过模块化的解决方案,降低冗余的生产成本,让设计者专注于 | |||
<Text strong>更好的用户体验</Text>。 | |||
</Paragraph> | |||
<Title level={2}>设计资源</Title> | |||
<Paragraph> | |||
我们提供完善的设计原则、最佳实践和设计资源文件(<Text code>Sketch</Text> 和 | |||
<Text code>Axure</Text>),来帮助业务快速设计出高质量的产品原型。 | |||
</Paragraph> | |||
<Paragraph> | |||
<ul> | |||
<li> | |||
<Link href="/docs/spec/proximity-cn">设计原则</Link> | |||
</li> | |||
<li> | |||
<Link href="/docs/spec/overview-cn">设计模式</Link> | |||
</li> | |||
<li> | |||
<Link href="/docs/resources-cn">设计资源</Link> | |||
</li> | |||
</ul> | |||
</Paragraph> | |||
<Paragraph> | |||
<blockquote>{blockContent}</blockquote> | |||
<pre>{blockContent}</pre> | |||
</Paragraph> | |||
<Paragraph> | |||
按<Text keyboard>Esc</Text>键退出阅读…… | |||
</Paragraph> | |||
</Typography> | |||
); | |||
export default App; |
@@ -0,0 +1,27 @@ | |||
import React, { useState } from 'react'; | |||
import { Radio, Timeline } from 'antd'; | |||
const App = () => { | |||
return ( | |||
<> | |||
<Timeline | |||
mode={"left"} | |||
style={{float:"left"}} | |||
items={[ | |||
{ | |||
label: '2024-02-27', | |||
children: '授权接入', | |||
}, | |||
{ | |||
label: '2024-02-27', | |||
children: '开放平台建立', | |||
}, | |||
{ | |||
label: '2021-04-18', | |||
children: '公司成立 (四川黑菠萝科技有限公司官网)', | |||
}, | |||
]} | |||
/> | |||
</> | |||
); | |||
}; | |||
export default App; |
@@ -0,0 +1,11 @@ | |||
.td1{ | |||
border: 1px solid #E7E7EB; | |||
} | |||
.td2{ | |||
border: 1px solid #E7E7EB; | |||
} | |||
@@ -0,0 +1,44 @@ | |||
import React from 'react'; | |||
import { Divider, Typography } from 'antd'; | |||
const { Title, Paragraph, Text, Link } = Typography; | |||
import styles from './index.less'; | |||
var html1 = '{ "sign": "string", "key": "string", "code": "string", "name": "string", "typeName": "string", "uintName": "string" }'; | |||
var html2 = 'stringA="Code=string&Key=9A0A8659F005D6984697E2CA0A9CF3B7&Name=string&TypeName=string&UintName=string";'; | |||
var html3 = '\r\nMD5签名方式:\r\n\r\nstringSignTemp=stringA+"&key=192006250b4c09247ec02edce69f6a2d" //注:key为商户平台设置的密钥key\r\n\r\nsign=MD5(stringSignTemp).toUpperCase()="9A0A8659F005D6984697E2CA0A9CF3B7" //注:MD5签名方式\r\n\r\n'; | |||
const App = () => ( | |||
<Typography> | |||
<Title level={4}>协议规则</Title> | |||
<Paragraph> | |||
商户接入,调用API必须遵循以下规则:<br /> | |||
<table style={{border:"1px solid #E7E7EB"}}> | |||
<tbody> | |||
<tr> | |||
<td>传输方式</td> | |||
<td>为保证交易安全性,采用HTTPS/HTTPS传输</td> | |||
</tr> | |||
<tr> | |||
<td>提交方式</td> | |||
<td>采用POST方法提交</td> | |||
</tr> | |||
<tr> | |||
<td>数据格式</td> | |||
<td>提交和返回数据都为JSON格式</td> | |||
</tr> | |||
<tr> | |||
<td>签名算法</td> | |||
<td>请求和接收数据均需要校验签名,详细方法请参考安全规范-签名算法</td> | |||
</tr> | |||
<tr> | |||
<td>签名要求</td> | |||
<td>MD5</td> | |||
</tr> | |||
</tbody> | |||
</table> | |||
</Paragraph> | |||
</Typography> | |||
); | |||
export default App; |
@@ -0,0 +1,23 @@ | |||
.preClass { | |||
/*字体样式*/ | |||
font-family: micsoft yahei; | |||
font-size: 16px; | |||
line-height: 2; | |||
color: #FFF; | |||
/*定义宽度*/ | |||
width: 800px; | |||
margin: auto; | |||
padding: 10px; | |||
/*背景色*/ | |||
background: #000; | |||
/*pre文字自动换行*/ | |||
white-space: pre-wrap; | |||
white-space: -moz-pre-wrap; | |||
white-space: -pre-wrap; | |||
white-space: -o-pre-wrap; | |||
/*长单词换行下一行*/ | |||
word-wrap: break-word; | |||
/*两端对齐,最后一样右对齐*/ | |||
text-align: justify; | |||
text-align-last: right; | |||
} |
@@ -0,0 +1,47 @@ | |||
import React from 'react'; | |||
import { Divider, Typography } from 'antd'; | |||
const { Title, Paragraph, Text, Link } = Typography; | |||
import styles from './index.less'; | |||
var html1= '{ "sign": "string", "key": "string", "code": "string", "name": "string", "typeName": "string", "uintName": "string" }'; | |||
var html2='stringA="Code=string&Key=9A0A8659F005D6984697E2CA0A9CF3B7&Name=string&TypeName=string&UintName=string";'; | |||
var html3='\r\nMD5签名方式:\r\n\r\nstringSignTemp=stringA+"&key=192006250b4c09247ec02edce69f6a2d" //注:key为商户平台设置的密钥key\r\n\r\nsign=MD5(stringSignTemp).toUpperCase()="9A0A8659F005D6984697E2CA0A9CF3B7" //注:MD5签名方式\r\n\r\n'; | |||
const App = () => ( | |||
<Typography> | |||
<Title level={4}>签名算法</Title> | |||
<Paragraph> | |||
签名生成的通用步骤如下:<br /> | |||
<br /> | |||
第一步,设所有发送或者接收到的数据为集合M,将集合M内非空参数值的参数按照参数名ASCII码从小到大排序(字典序),使用URL键值对的格式(即key1=value1&key2=value2…)拼接成字符串stringA。<br /> | |||
<br /> | |||
特别注意以下重要规则:<br /> | |||
◆ 参数名ASCII码从小到大排序(字典序);<br /> | |||
◆ 如果参数的值为空不参与签名;<br /> | |||
◆ 参数名区分大小写;<br /> | |||
◆ 验证调用返回或微信主动通知签名时,传送的sign参数不参与签名,将生成的签名与该sign值作校验。<br /> | |||
<br /> | |||
第二步,在stringA最后拼接上key得到stringSignTemp字符串,并对stringSignTemp进行MD5运算,再将得到的字符串所有字符转换为大写,得到sign值signValue。 注意:密钥的长度为32个字节。<br /> | |||
<br /> | |||
◆平台 key设置路径(平台授权码):系统后台(https://bpa.black-pa.com/)--→授权管理--→平台授权--→添加授权码<br /> | |||
◆店铺 key设置路径(店铺授权码):系统后台(https://bpa.black-pa.com/)--→授权管理--→平台授权--→添加授权码<br /> | |||
</Paragraph> | |||
<Paragraph> | |||
举例:<br /> | |||
假设传送的参数如下:<br /> | |||
<pre className='preClass'>{JSON.stringify(JSON.parse(html1), null, 4)}</pre><br /> | |||
第一步:对参数按照key=value的格式,并按照参数名ASCII字典序排序如下<br /> | |||
<pre className='preClass'>{html2}</pre><br /> | |||
第二步:拼接API密钥:<br /> | |||
<pre className='preClass'>{html3}</pre><br /> | |||
</Paragraph> | |||
<Title level={4}>商户回调API安全</Title> | |||
</Typography> | |||
); | |||
export default App; |
@@ -0,0 +1,15 @@ | |||
import yayJpg from '../assets/yay.jpg'; | |||
export default function HomePage() { | |||
return ( | |||
<div> | |||
<h2>Yay! Welcome to umi!</h2> | |||
<p> | |||
<img src={yayJpg} width="388" /> | |||
</p> | |||
<p> | |||
To get started, edit <code>pages/index.tsx</code> and save to reload. | |||
</p> | |||
</div> | |||
); | |||
} |
@@ -0,0 +1,4 @@ | |||
.title { | |||
background: rgb(121, 242, 142); | |||
} |
@@ -0,0 +1,10 @@ | |||
import React from 'react'; | |||
import styles from './products.less'; | |||
export default function Page() { | |||
return ( | |||
<div> | |||
<h1 className={styles.title}>Page products1111111111</h1> | |||
</div> | |||
); | |||
} |
@@ -0,0 +1,3 @@ | |||
{ | |||
"extends": "./src/.umi/tsconfig.json" | |||
} |
@@ -0,0 +1 @@ | |||
import 'umi/typings'; |