diff --git a/app/my/createProfile/page.jsx b/app/my/createProfile/page.jsx index 866d87e..344b584 100644 --- a/app/my/createProfile/page.jsx +++ b/app/my/createProfile/page.jsx @@ -286,51 +286,49 @@ export default function CreateProfile() { } } } - if (isPrice) return; - if (isSubmitting) return; - const superfan_price_list = superSingle.map((it, index) => ({ - period: index, - enable: it.enable ? 1 : 0, - price: parseInt(it.price * 100, 10), - is_superfanship_give_wechat: it.wechatFree ? 1 : 0, - })); - setIsSubmitting(true); - - try { - const body = { - profile: spaceIntro, - admission_price: parseInt(spacePrice * 100, 10), - ironfanship_price: parseInt(ironFanPrice * 100, 10), - is_superfanship_enabled: openSuper ? 1 : 0, - superfan_price_list, - }; - const _data = await requireAPI( - "POST", - "/api/zone/create", - { - body, - }, - true - ); - if (_data.ret === -1) { - Toast.show({ - icon: "fail", - content: _data.msg, - position: "top", - }); - return; - } + } + if (isPrice) return; + const superfan_price_list = superSingle.map((it, index) => ({ + period: index, + enable: it.enable ? 1 : 0, + price: parseInt(it.price * 100, 10), + is_superfanship_give_wechat: it.wechatFree ? 1 : 0, + })); + setIsSubmitting(true); + try { + const body = { + profile: spaceIntro, + admission_price: parseInt(spacePrice * 100, 10), + ironfanship_price: parseInt(ironFanPrice * 100, 10), + is_superfanship_enabled: openSuper ? 1 : 0, + superfan_price_list, + }; + const _data = await requireAPI( + "POST", + "/api/zone/create", + { + body, + }, + true + ); + if (_data.ret === -1) { Toast.show({ - icon: "success", - content: "开通空间成功!空间简介将在审核完成后生效。", + icon: "fail", + content: _data.msg, position: "top", }); - router.back(); - } catch (error) { - console.error(error); - } finally { - setIsSubmitting(false); + return; } + Toast.show({ + icon: "success", + content: "开通空间成功!空间简介将在审核完成后生效。", + position: "top", + }); + router.back(); + } catch (error) { + console.error(error); + } finally { + setIsSubmitting(false); } }; return ( diff --git a/app/my/streamerVerification/completeStreamerInformation/page.jsx b/app/my/streamerVerification/completeStreamerInformation/page.jsx index 25bd814..e9bbc91 100644 --- a/app/my/streamerVerification/completeStreamerInformation/page.jsx +++ b/app/my/streamerVerification/completeStreamerInformation/page.jsx @@ -494,10 +494,13 @@ export default function CompleteStreamerInformation() { }; const creatVideoCanvas = (file) => { if (typeof window == "undefined") return; - const videoD = document.getElementById("videoD"); + const videoD = document.getElementById("video_complete"); const url = URL.createObjectURL(file); videoD.src = url; videoD.addEventListener("loadeddata", function () { + videoD.currentTime = 1; + }); + videoD.addEventListener("seeked", function () { const canvas = document.createElement("canvas"); canvas.width = videoD.videoWidth; canvas.height = videoD.videoHeight; @@ -1127,6 +1130,12 @@ export default function CompleteStreamerInformation() { +
+ +
); } diff --git a/app/space/setting/spaceIntroSetting/editStreamerMedia/page.jsx b/app/space/setting/spaceIntroSetting/editStreamerMedia/page.jsx index 7680597..357bacb 100644 --- a/app/space/setting/spaceIntroSetting/editStreamerMedia/page.jsx +++ b/app/space/setting/spaceIntroSetting/editStreamerMedia/page.jsx @@ -191,10 +191,13 @@ export default function EditStreamerMedia() { const creatVideoCanvas = (file) => { if (typeof window == "undefined") return; - const videoD = document.getElementById("videoD"); + const videoD = document.getElementById("video_edit_streamer"); const url = URL.createObjectURL(file); videoD.src = url; videoD.addEventListener("loadeddata", function () { + videoD.currentTime = 1; + }); + videoD.addEventListener("seeked", function () { const canvas = document.createElement("canvas"); canvas.width = videoD.videoWidth; canvas.height = videoD.videoHeight; @@ -361,7 +364,7 @@ export default function EditStreamerMedia() {
-