新增查看护照图片页面
parent
741f5eef07
commit
1a97245ee6
@ -0,0 +1,37 @@
|
|||||||
|
import React, { useState, useEffect } from 'react';
|
||||||
|
import { Input, Button, Card, Typography, Space, Alert } from 'antd';
|
||||||
|
import { useParams } from 'react-router-dom';
|
||||||
|
import ImageUploader from '@/components/ImageUploader';
|
||||||
|
|
||||||
|
const { Title, Text } = Typography;
|
||||||
|
|
||||||
|
const ImageViewer = () => {
|
||||||
|
const { GRI_SN, GRI_No } = useParams();
|
||||||
|
const [ossKey, setOssKey] = useState('');
|
||||||
|
const [showUploader, setShowUploader] = useState(false);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (GRI_SN && GRI_No) {
|
||||||
|
const key = `ghh/${GRI_SN}-${GRI_No}/passport_image`;
|
||||||
|
setOssKey(key);
|
||||||
|
setShowUploader(true);
|
||||||
|
}
|
||||||
|
}, [GRI_SN, GRI_No]);
|
||||||
|
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div style={{ padding: '20px' }}>
|
||||||
|
<Title level={2}>{GRI_SN}-{GRI_No}</Title>
|
||||||
|
|
||||||
|
{showUploader && (
|
||||||
|
<ImageUploader osskey={ossKey} />
|
||||||
|
)}
|
||||||
|
|
||||||
|
{!showUploader && (
|
||||||
|
<Text>无法从URL中提取订单信息</Text>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default ImageViewer;
|
Loading…
Reference in New Issue