osskey设置
parent
a6cde1f8fb
commit
2a6c5ecf9f
@ -1,47 +1,31 @@
|
|||||||
import React, { useState, useEffect } from 'react';
|
import { useState, useEffect } from "react";
|
||||||
import { Input, Button, Card, Typography, Space, Alert } from 'antd';
|
import { Alert } from "antd";
|
||||||
import { useParams } from 'react-router-dom';
|
import { useParams } from "react-router-dom";
|
||||||
import {ImageViewer} from '@/components/ImageUploader';
|
import { ImageViewer } from "@/components/ImageUploader";
|
||||||
|
|
||||||
|
|
||||||
const { Title, Text } = Typography;
|
|
||||||
|
|
||||||
const CustomerImageViewer = () => {
|
const CustomerImageViewer = () => {
|
||||||
|
const [ossKey, setOssKey] = useState("");
|
||||||
const [ossKey, setOssKey] = useState('');
|
const [showUploader, setShowUploader] = useState(false);
|
||||||
const [showUploader, setShowUploader] = useState(false);
|
const { key } = useParams();
|
||||||
const { key } = useParams();
|
|
||||||
|
useEffect(() => {
|
||||||
useEffect(() => {
|
setOssKey(key);
|
||||||
console.log(key);
|
setShowUploader(true);
|
||||||
// const key = `temp/tour-guide/2025-6/31278`;
|
}, []);
|
||||||
setOssKey(key);
|
|
||||||
setShowUploader(true);
|
return (
|
||||||
}, []);
|
<>
|
||||||
|
{showUploader ? (
|
||||||
return (
|
<>
|
||||||
<div>
|
<Alert message="Information" description="You can view all travel-related Photos on this page, provided by your tour guides." type="info" showIcon />
|
||||||
<Alert
|
<br />
|
||||||
message="信息提示"
|
<ImageViewer osskey={ossKey} overlist={true} />
|
||||||
description="您可以在此页面查看与旅行相关的所有图片,支持点击放大等操作。"
|
</>
|
||||||
type="info"
|
) : (
|
||||||
showIcon
|
<Alert message="Error" description="Photos not found" type="error" showIcon />
|
||||||
/>
|
)}
|
||||||
<br/>
|
</>
|
||||||
|
);
|
||||||
{showUploader ? (
|
|
||||||
<div>
|
|
||||||
<ImageViewer osskey={ossKey} type='222' />
|
|
||||||
</div>
|
|
||||||
) : (
|
|
||||||
<div>
|
|
||||||
<Text style={{ display: 'block', color: '#874d00', fontSize: '16px' }}>
|
|
||||||
无法提取客户信息
|
|
||||||
</Text>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default CustomerImageViewer;
|
export default CustomerImageViewer;
|
||||||
|
Loading…
Reference in New Issue