|
|
@@ -1,8 +1,8 @@
|
|
|
-import { Button, Card, Col, Input, Popover, Row } from 'antd';
|
|
|
+import { Card, Col, Row } from 'antd';
|
|
|
import { useEffect, useState } from 'react';
|
|
|
import { service } from '@/pages/system/Platforms';
|
|
|
import Service from '../service';
|
|
|
-import * as moment from 'moment';
|
|
|
+// import * as moment from 'moment';
|
|
|
import ApiPage from '@/pages/system/Platforms/Api/base';
|
|
|
|
|
|
const defaultHeight = 50;
|
|
|
@@ -11,7 +11,7 @@ export default () => {
|
|
|
const api = new Service();
|
|
|
const [clientId, setClientId] = useState('');
|
|
|
const [secureKey, setSecureKey] = useState('');
|
|
|
- const [sdkDetail, setSdkDetail] = useState<any>({});
|
|
|
+ // const [sdkDetail, setSdkDetail] = useState<any>({});
|
|
|
const [loading, setLoading] = useState<boolean>(false);
|
|
|
|
|
|
const getDetail = async (id: string) => {
|
|
|
@@ -25,29 +25,29 @@ export default () => {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
- const getSDKDetail = async () => {
|
|
|
- const resp = await service.getSdk();
|
|
|
- if (resp.status === 200) {
|
|
|
- setSdkDetail(resp.result[0]);
|
|
|
- }
|
|
|
- };
|
|
|
+ // const getSDKDetail = async () => {
|
|
|
+ // const resp = await service.getSdk();
|
|
|
+ // if (resp.status === 200) {
|
|
|
+ // setSdkDetail(resp.result[0]);
|
|
|
+ // }
|
|
|
+ // };
|
|
|
|
|
|
- const downLoad = (url: string) => {
|
|
|
- if (url) {
|
|
|
- const downNode = document.createElement('a');
|
|
|
- downNode.href = url;
|
|
|
- downNode.download = `${moment(new Date()).format('YYYY-MM-DD-HH-mm-ss')}.sdk`;
|
|
|
- downNode.style.display = 'none';
|
|
|
- downNode.setAttribute('target', '_blank');
|
|
|
- document.body.appendChild(downNode);
|
|
|
- downNode.click();
|
|
|
- document.body.removeChild(downNode);
|
|
|
- }
|
|
|
- };
|
|
|
+ // const downLoad = (url: string) => {
|
|
|
+ // if (url) {
|
|
|
+ // const downNode = document.createElement('a');
|
|
|
+ // downNode.href = url;
|
|
|
+ // downNode.download = `${moment(new Date()).format('YYYY-MM-DD-HH-mm-ss')}.sdk`;
|
|
|
+ // downNode.style.display = 'none';
|
|
|
+ // downNode.setAttribute('target', '_blank');
|
|
|
+ // document.body.appendChild(downNode);
|
|
|
+ // downNode.click();
|
|
|
+ // document.body.removeChild(downNode);
|
|
|
+ // }
|
|
|
+ // };
|
|
|
|
|
|
useEffect(() => {
|
|
|
// 请求SDK下载地址
|
|
|
- getSDKDetail();
|
|
|
+ // getSDKDetail();
|
|
|
api.userDetail().then((res) => {
|
|
|
if (res.status === 200) {
|
|
|
api.apiDetail(res.result.id).then((response) => {
|
|
|
@@ -60,28 +60,28 @@ export default () => {
|
|
|
});
|
|
|
}, []);
|
|
|
|
|
|
- const downLoadJDK = (
|
|
|
- <div>
|
|
|
- <div
|
|
|
- style={{
|
|
|
- width: 500,
|
|
|
- borderRadius: 2,
|
|
|
- marginBottom: 12,
|
|
|
- }}
|
|
|
- >
|
|
|
- <Input.TextArea value={sdkDetail?.dependency} rows={6} readOnly />
|
|
|
- </div>
|
|
|
- <Button
|
|
|
- type={'primary'}
|
|
|
- style={{ width: '100%' }}
|
|
|
- onClick={() => {
|
|
|
- downLoad(sdkDetail.sdk);
|
|
|
- }}
|
|
|
- >
|
|
|
- jar下载
|
|
|
- </Button>
|
|
|
- </div>
|
|
|
- );
|
|
|
+ // const downLoadJDK = (
|
|
|
+ // <div>
|
|
|
+ // <div
|
|
|
+ // style={{
|
|
|
+ // width: 500,
|
|
|
+ // borderRadius: 2,
|
|
|
+ // marginBottom: 12,
|
|
|
+ // }}
|
|
|
+ // >
|
|
|
+ // <Input.TextArea value={sdkDetail?.dependency} rows={6} readOnly />
|
|
|
+ // </div>
|
|
|
+ // <Button
|
|
|
+ // type={'primary'}
|
|
|
+ // style={{ width: '100%' }}
|
|
|
+ // onClick={() => {
|
|
|
+ // downLoad(sdkDetail.sdk);
|
|
|
+ // }}
|
|
|
+ // >
|
|
|
+ // jar下载
|
|
|
+ // </Button>
|
|
|
+ // </div>
|
|
|
+ // );
|
|
|
|
|
|
return (
|
|
|
<Row gutter={[16, 16]}>
|
|
|
@@ -101,7 +101,7 @@ export default () => {
|
|
|
</div>
|
|
|
</Card>
|
|
|
</Col>
|
|
|
- <Col span={12}>
|
|
|
+ {/* <Col span={12}>
|
|
|
<Card title="SDK下载">
|
|
|
<div style={{ height: defaultHeight }}>
|
|
|
<Popover trigger="click" title={'POM依赖'} content={downLoadJDK}>
|
|
|
@@ -109,7 +109,7 @@ export default () => {
|
|
|
</Popover>
|
|
|
</div>
|
|
|
</Card>
|
|
|
- </Col>
|
|
|
+ </Col> */}
|
|
|
</Row>
|
|
|
</Col>
|
|
|
<Col span={24}>
|