Explorar el Código

url -> videoId

visuddhinanda hace 2 años
padre
commit
684a5d6de1
Se han modificado 1 ficheros con 4 adiciones y 4 borrados
  1. 4 4
      dashboard/src/components/template/Wbw/WbwPali.tsx

+ 4 - 4
dashboard/src/components/template/Wbw/WbwPali.tsx

@@ -107,15 +107,15 @@ const WbwPaliWidget = ({ data, display, onSave }: IWidget) => {
 
 
   //生成视频播放按钮
   //生成视频播放按钮
   const videoList = data.attachments?.filter((item) =>
   const videoList = data.attachments?.filter((item) =>
-    item.type?.includes("video")
+    item.content_type?.includes("video")
   );
   );
   const videoIcon = videoList ? (
   const videoIcon = videoList ? (
     <WbwVideoButton
     <WbwVideoButton
       video={videoList?.map((item) => {
       video={videoList?.map((item) => {
         return {
         return {
-          url: item.url ? item.url : "",
-          type: item.type,
-          title: item.name,
+          videoId: item.id,
+          type: item.content_type,
+          title: item.title,
         };
         };
       })}
       })}
     />
     />