diff --git a/app/profile/[mid]/page.js b/app/profile/[mid]/page.js
index 399c54f..da7ed4d 100644
--- a/app/profile/[mid]/page.js
+++ b/app/profile/[mid]/page.js
@@ -24,7 +24,7 @@ import AddWeChat from "@/components/AddWeChat";
import { handleFollow, checkRelation } from "@/api/public";
import { getStreamerDetailInfo } from "@/api/space";
import { get } from "@/utils/storeInfo";
-import { handleShowVideos } from "@/utils/tools/handleFuns";
+import { handleShowVideo } from "@/utils/tools/handleFuns";
import clipboard from "copy-to-clipboard";
// import * as Clipboard from "expo-clipboard";
export default function PersonSpace() {
@@ -235,7 +235,7 @@ export default function PersonSpace() {
key={index}
onClick={() => {
if (photo.type == "video") {
- handleShowVideos({
+ handleShowVideo({
url: streamerInfo?.streamer_ext?.shorts?.videos[0]
?.cover_urls[0],
mp4: streamerInfo?.streamer_ext?.shorts?.videos[0]
diff --git a/app/space/person_space_introduce/[mid]/page.js b/app/space/person_space_introduce/[mid]/page.js
index 89c6547..1f4df36 100644
--- a/app/space/person_space_introduce/[mid]/page.js
+++ b/app/space/person_space_introduce/[mid]/page.js
@@ -13,7 +13,8 @@ import {
import AddWeChat from "@/components/AddWeChat";
import { getStreamerInfo } from "@/api/space";
import baseRequest from "@/utils/baseRequest";
-import requireAPI from "@/utils/requireAPI"
+import requireAPI from "@/utils/requireAPI";
+import { handleShowVideo } from "@/utils/tools/handleFuns";
export default function PersonSpaceIntroduce() {
const base = baseRequest();
const router = useRouter();
@@ -105,49 +106,6 @@ export default function PersonSpaceIntroduce() {
classNames: { body: "photos-bodyBox" },
});
};
- const handleShowVideo = (video) => {
- Dialog.className = "videoMask";
- Dialog.show({
- title: "",
- content: (
-
-
-
Dialog.clear()}
- >
-
-
-
-
-
-
- {/*
-
-
*/}
-
- ),
- bodyStyle: {
- background: "none",
- maxHeight: "none",
- height: "100%",
- },
- });
- };
//当空间价格为0时,直接加入空间
const handleJoinFreeSpace = async () => {
try {
diff --git a/components/Photos/index.js b/components/Photos/index.js
index 0325d61..1e644e3 100644
--- a/components/Photos/index.js
+++ b/components/Photos/index.js
@@ -6,7 +6,7 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faAngleUp, faClose } from "@fortawesome/free-solid-svg-icons";
import { useRouter } from "next/navigation";
import baseRequest from "@/utils/baseRequest";
-import Player from "next-video/player";
+import { handleShowVideo } from "@/utils/tools/handleFuns";
// import dynamic from 'next/dynamic'
// import ImagesMask from "@/components/ImagesMask";
// const ImagesMask = dynamic(() =>
@@ -166,66 +166,6 @@ export default function Photos({
classNames: { body: "photos-bodyBox" },
});
};
- const handleShowVideo = (video) => {
- Dialog.className = "videoMask";
- Dialog.show({
- title: "",
- content: (
-
-
-
-
Dialog.clear()}
- >
-
-
-
-
- {/*
*/}
- {/*
*/}
-
- {/*
*/}
-
- {/*
saveFile(video.mp4)}
- >
-
-
*/}
-
-
- ),
- bodyStyle: {
- background: "none",
- maxHeight: "none",
- height: "100%",
- },
- });
- };
const handleSeeAllPhotos = (e) => {
e.stopPropagation();
e.preventDefault();
diff --git a/utils/tools/handleFuns.js b/utils/tools/handleFuns.js
index 5463ff7..469b451 100644
--- a/utils/tools/handleFuns.js
+++ b/utils/tools/handleFuns.js
@@ -2,41 +2,104 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faClose} from "@fortawesome/free-solid-svg-icons";
import { Dialog,Toast } from "antd-mobile";
import html2canvas from "html2canvas";
-import {checkRole} from "../auth"
-export const handleShowVideos = (video) => {
+import {checkRole} from "../auth";
+import Player from "next-video/player";
+// export const handleShowVideos = (video) => {
+// Dialog.className = "videoMask";
+// Dialog.show({
+// title: "",
+// closeOnMaskClick: true,
+// content: (
+//
+//
+//
Dialog.clear()}
+// >
+//
+//
+//
+//
+//
+//
+// {/*
+//
+//
*/}
+//
+// ),
+// bodyStyle: {
+// background: "none",
+// maxHeight: "none",
+// height: "100%",
+// },
+// });
+// };
+export const handleShowVideo = (video) => {
Dialog.className = "videoMask";
Dialog.show({
title: "",
content: (
-
-
-
Dialog.clear()}
- >
-
+
+
Dialog.clear()}>
+
+
+
Dialog.clear()}
+ >
+
+
-
-
-
- {/*
*/}
+ {/*
*/}
+
+ {/*
*/}
+
+ {/*
saveFile(video.mp4)}
>
*/}
+
),
bodyStyle: {
@@ -44,9 +107,9 @@ export const handleShowVideos = (video) => {
maxHeight: "none",
height: "100%",
},
+ closeOnMaskClick: true,
});
};
-
//保存div内容为图片
export const saveImage = async (divId) => {
const div = document.getElementById(divId);