diff --git a/app/login/page.js b/app/login/page.js
index 3efcd14..5acf906 100644
--- a/app/login/page.js
+++ b/app/login/page.js
@@ -299,7 +299,6 @@ function Login({ handleLogin }) {
查看微信 查看微信
+
{streamerInfo?.is_ironfanship_unlocked === 1
? "已是铁粉"
: "成为铁粉"}
@@ -362,7 +362,7 @@ export default function PersonSpace() {
placeholder=""
/>
-
+
{streamerInfo?.is_superfanship_unlocked === 1
? "尊贵超粉"
: "成为超粉"}
@@ -387,7 +387,7 @@ export default function PersonSpace() {
placeholder=""
/>
- 举报 举报 审核未通过 审核未通过
diff --git a/app/space/setting/spaceIntroSetting/editStreamerMedia/page.jsx b/app/space/setting/spaceIntroSetting/editStreamerMedia/page.jsx
index 9f75d8c..2e65d9f 100644
--- a/app/space/setting/spaceIntroSetting/editStreamerMedia/page.jsx
+++ b/app/space/setting/spaceIntroSetting/editStreamerMedia/page.jsx
@@ -7,6 +7,7 @@ import { faAngleRight, faAngleLeft } from "@fortawesome/free-solid-svg-icons";
import UploadImgs from "@/components/UploadImgs";
import requireAPI from "@/utils/requireAPI";
import { multiUploadImage } from "@/utils/upload";
+import { getVideoBase64 } from "@/utils/tools";
export default function EditStreamerMedia() {
const router = useRouter();
//保存封面图
@@ -92,14 +93,17 @@ export default function EditStreamerMedia() {
},
}));
} else {
- creatVideoCanvas(file);
- setFormData((old) => ({
- ...old,
- displayVideo: {
- url: frameImageUrl,
- file: Array.from(e.target.files),
- },
- }));
+ const url = URL.createObjectURL(file);
+ getVideoBase64(url).then((src) => {
+ setFrameImageUrl(src);
+ setFormData((old) => ({
+ ...old,
+ displayVideo: {
+ url: src,
+ file: Array.from(e.target.files),
+ },
+ }));
+ });
}
setLoading(false);
};
@@ -189,29 +193,6 @@ export default function EditStreamerMedia() {
}
};
- const creatVideoCanvas = (file) => {
- if (typeof window == "undefined") return;
- const videoD = document.getElementById("video_edit_streamer");
- const url = URL.createObjectURL(file);
- videoD.src = url;
- videoD.addEventListener("loadeddata", function () {
- videoD.pause();
- videoD.currentTime = 1;
- });
- videoD.addEventListener("seeked", function () {
- const canvas = document.createElement("canvas");
- canvas.width = videoD.videoWidth;
- canvas.height = videoD.videoHeight;
- canvas
- .getContext("2d")
- .drawImage(videoD, 0, 0, canvas.width, canvas.height);
- const canvasImg = canvas.toDataURL();
- setFrameImageUrl(canvasImg);
-
- // 释放URL对象
- URL.revokeObjectURL(url);
- });
- };
useEffect(() => {
setFormData((old) => ({ ...old, imageAssets: oldPhotos }));
}, [oldPhotos]);
@@ -364,12 +345,6 @@ export default function EditStreamerMedia() {
-
以便随时关注圈子动态
+以便随时关注空间动态