فهرست منبع

修改文件路径

zhb 6 ماه پیش
والد
کامیت
b400a7b5de
1فایلهای تغییر یافته به همراه6 افزوده شده و 6 حذف شده
  1. 6 6
      next/src/app/[locale]/card-guide/item.tsx

+ 6 - 6
next/src/app/[locale]/card-guide/item.tsx

@@ -38,8 +38,8 @@ type NewsItem = {
 };
 };
 export function VideoPlayer({ locale }: Props) {
 export function VideoPlayer({ locale }: Props) {
   const t = useTranslations('CardGuide');
   const t = useTranslations('CardGuide');
-  const { Host00, Host05 } = getHosts()
-  // const Host00 = fetchUrl
+  const { Host05 } = getHosts()
+  // const Host05 = fetchUrl
   const [fileData, setFileData] = useState<NewsItem>({
   const [fileData, setFileData] = useState<NewsItem>({
     id: 0,
     id: 0,
     title: '',
     title: '',
@@ -70,7 +70,7 @@ export function VideoPlayer({ locale }: Props) {
               const d = s.d || '';
               const d = s.d || '';
               let img = s.img || '';
               let img = s.img || '';
               if (type === '1' && img) {
               if (type === '1' && img) {
-                img = img.startsWith('http') ? img : Host00 + img;
+                img = img.startsWith('http') ? img : Host05 + img;
               }
               }
               return { step, type, d, img };
               return { step, type, d, img };
             })
             })
@@ -84,7 +84,7 @@ export function VideoPlayer({ locale }: Props) {
             const d = v.d || '';
             const d = v.d || '';
             if (type === '1' && fileUrl) {
             if (type === '1' && fileUrl) {
               if (!fileUrl.startsWith('http')) {
               if (!fileUrl.startsWith('http')) {
-                fileUrl = Host00 + fileUrl;
+                fileUrl = Host05 + fileUrl;
               }
               }
             }
             }
             return { type, fileUrl, d };
             return { type, fileUrl, d };
@@ -105,7 +105,7 @@ export function VideoPlayer({ locale }: Props) {
   }, [getData]);
   }, [getData]);
 
 
   const handleDownload = async () => {
   const handleDownload = async () => {
-    const url = Host00 + fileData.pdfPath;
+    const url = Host05 + fileData.pdfPath;
     const res = await fetch(url);
     const res = await fetch(url);
     const blob = await res.blob();
     const blob = await res.blob();
     const a = document.createElement("a");
     const a = document.createElement("a");
@@ -284,7 +284,7 @@ export function VideoPlayer({ locale }: Props) {
       </div>
       </div>
 
 
       <PdfPreview
       <PdfPreview
-        url={Host00 + fileData.pdfPath}
+        url={Host05 + fileData.pdfPath}
         password={fileData.pdfPassword}
         password={fileData.pdfPassword}
         isOpen={show}
         isOpen={show}
         onClose={() => setShow(false)}
         onClose={() => setShow(false)}