From 1c47975ea2258a04773d4502c970fb03ef63ac51 Mon Sep 17 00:00:00 2001
From: al
Date: Fri, 25 Oct 2024 19:19:41 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/my/createProfile/page.jsx | 16 +-
app/my/editprofile/editHome/page.jsx | 10 +-
app/my/editprofile/page.jsx | 104 ++++++++++++-
.../completeStreamerInformation/page.jsx | 6 +-
app/space/createImagePost/page.jsx | 28 ++--
app/space/editSpacePost/page.jsx | 140 +++++++++++-------
app/space/setting/page.js | 21 ++-
.../setting/spacePaymentSetting/page.jsx | 14 +-
app/streamerPosts/[id]/page.jsx | 4 +-
components/OwnInput/index.js | 2 +
components/PostItem/index.js | 10 +-
components/UploadImgs/index.js | 3 -
utils/requireAPI.js | 2 +-
13 files changed, 246 insertions(+), 114 deletions(-)
diff --git a/app/my/createProfile/page.jsx b/app/my/createProfile/page.jsx
index 18e0d7c..b5abc6c 100644
--- a/app/my/createProfile/page.jsx
+++ b/app/my/createProfile/page.jsx
@@ -146,11 +146,13 @@ export default function CreateProfile() {
});
return;
}
+ let isPrice = false;
if (openSuper) {
Object.values(superSingle).forEach((it) => {
if (it.enable) {
const superFanPrice = it.price;
if (!superFanPrice) {
+ isPrice = true;
Toast.show({
icon: "fail",
content: "请填写超粉价格",
@@ -164,6 +166,7 @@ export default function CreateProfile() {
_superFanPrice < 100 ||
_superFanPrice > 388800)
) {
+ isPrice = true;
Toast.show({
icon: "fail",
content: "请输入有效的超粉价格",
@@ -172,6 +175,7 @@ export default function CreateProfile() {
return;
}
if (openSuper && _superFanPrice <= _ironFanPrice) {
+ isPrice = true;
Toast.show({
icon: "fail",
content: "请输入大于铁粉价格的超粉价格",
@@ -280,6 +284,7 @@ export default function CreateProfile() {
¥
- setSpacePriceAble(true)}
>
点击编辑
-
+
@@ -310,6 +316,7 @@ export default function CreateProfile() {
¥
-
setTiefenPriceAble(true)}
>
点击编辑
-
+
diff --git a/app/my/editprofile/editHome/page.jsx b/app/my/editprofile/editHome/page.jsx
index 9c68e84..b7ab9ac 100644
--- a/app/my/editprofile/editHome/page.jsx
+++ b/app/my/editprofile/editHome/page.jsx
@@ -121,7 +121,7 @@ export default function EditHome() {
}));
setFieldNamesOptions(tagNamesOptions);
setFormData({
- wechatPrice: data?.streamer?.wechat_coin_price,
+ wechatPrice: data?.streamer?.wechat_coin_price / 10,
gender: [`${data?.streamer?.gender}`],
age: [`${data?.streamer?.age}`],
height: [`${data?.streamer?.height}`],
@@ -199,8 +199,6 @@ export default function EditHome() {
const account = await get("account");
if (
!values.gender ||
- !values.wechatAddWay ||
- !values.wechatPrice ||
!values.info ||
!values.age ||
!values.height ||
@@ -624,6 +622,7 @@ export default function EditHome() {
¥
-
setSpacePriceAble(true)}
>
点击编辑
-
+
diff --git a/app/my/editprofile/page.jsx b/app/my/editprofile/page.jsx
index ee2c09d..1d337a2 100644
--- a/app/my/editprofile/page.jsx
+++ b/app/my/editprofile/page.jsx
@@ -36,11 +36,71 @@ export default function Editprofile() {
router.push("editprofile/editHome");
}}
>
-
+ /> */}
+
编辑主页
@@ -66,11 +126,39 @@ export default function Editprofile() {
router.push("/space/setting/spaceIntroSetting/editStreamerMedia");
}}
>
-
+
照片墙
diff --git a/app/my/streamerVerification/completeStreamerInformation/page.jsx b/app/my/streamerVerification/completeStreamerInformation/page.jsx
index cdd46a2..6d0f6bd 100644
--- a/app/my/streamerVerification/completeStreamerInformation/page.jsx
+++ b/app/my/streamerVerification/completeStreamerInformation/page.jsx
@@ -898,6 +898,7 @@ export default function CompleteStreamerInformation() {
¥
- setSpacePriceAble(true)}
>
点击编辑
-
+
diff --git a/app/space/createImagePost/page.jsx b/app/space/createImagePost/page.jsx
index 1f57751..3f3ea04 100644
--- a/app/space/createImagePost/page.jsx
+++ b/app/space/createImagePost/page.jsx
@@ -196,17 +196,17 @@ export default function CreateImagePost() {
为了空间良性发展,请保持免费/付费比例为1/1
-
+
已发布免费动态:{postCount?.free_count || 0}条
-
+
已发布付费动态:{postCount?.paid_count || 0}条
-
+
可发布付费动态:
{postCount?.paid_limit || 0}条
-
+
审核未通过动态:
{postCount?.rejected_count || 0}条
@@ -221,7 +221,7 @@ export default function CreateImagePost() {
setFormData((old) => ({ ...old, content: value }))
}
style={{ "--font-size": "14px" }}
- className="h-32 bg-[#FFFFFF1A] text-white rounded-2xl mt-2 mb-4 p-2"
+ className="h-32 bg-[#FFFFFF1A] rounded-2xl mt-2 mb-4 p-2"
/>
{formData.isCreatingPaidText && formData.price > 0 && (
<>
@@ -233,7 +233,7 @@ export default function CreateImagePost() {
}
value={formData.paidText}
style={{ "--font-size": "14px" }}
- className="h-32 bg-[#FFFFFF1A] text-white rounded-2xl mt-2 mb-4 p-2"
+ className="h-32 bg-[#FFFFFF1A] rounded-2xl mt-2 mb-4 p-2"
/>
>
)}
@@ -275,7 +275,7 @@ export default function CreateImagePost() {
className="flex flex-col py-2"
>
-
+
价格:¥
@@ -288,7 +288,7 @@ export default function CreateImagePost() {
setPriceEditData((old) => ({ ...old, price: value }))
}
value={priceEditData.price}
- className="flex-1 bg-transparent text-white rounded-2xl h-8 mx-2"
+ className="flex-1 bg-transparent rounded-2xl h-8 mx-2"
/>
-
+
可预览图片:
- 前
+ 前
- 张
+ 张
@@ -337,7 +337,7 @@ export default function CreateImagePost() {
-
+
添加付费文案:
-
+
铁粉免费查看:
0 ? 1 : 0,
paid_text: isCreatingPaidText && price > 0 ? paidText : null,
};
+
const _data = await requireAPI("POST", "/api/zone_moment/update", {
body,
});
@@ -166,6 +170,31 @@ export default function EditSpacePost() {
setIsSubmitting(false);
}
};
+ const getExistImgs = useMemo(() => {
+ if (data) {
+ const list =
+ data?.m_type === 1
+ ? data.media_component.images
+ : data.media_component.videos;
+ const imgs = list.map((it, index) =>
+ data?.m_type === 1
+ ? {
+ url: it.urls[0],
+ id: data.media_component.image_ids[index],
+ }
+ : {
+ url: it.cover_urls[0],
+ id: data.media_component.video_ids[index],
+ }
+ );
+ return imgs;
+ }
+
+ return [];
+ }, [data]);
+ useEffect(() => {
+ setFormData((old) => ({ ...old, imageAssets: getExistImgs }));
+ }, [getExistImgs]);
return (
{/* 头部标题 */}
@@ -191,33 +220,36 @@ export default function EditSpacePost() {
{/* 内容 */}
- {data?.status === 3 && (
-
-
- 违规详情
-
-
- {data.text_audit_opinion && (
-
- 文案违规原因:
- {data.text_audit_opinion}
-
- )}
- {data.image_audit_opinion && (
-
- 图片/视频违规原因:
- {data.image_audit_opinion}
-
- )}
- {data.manually_review_opinion && (
-
- 运营追加:
- {data.manually_review_opinion}
-
- )}
+ {data?.status === 3 &&
+ (data.text_audit_opinion ||
+ data.image_audit_opinion ||
+ data.manually_review_opinion) && (
+
+
+ 违规详情
+
+
+ {data.text_audit_opinion && (
+
+ 文案违规原因:
+ {data.text_audit_opinion}
+
+ )}
+ {data.image_audit_opinion && (
+
+ 图片/视频违规原因:
+ {data.image_audit_opinion}
+
+ )}
+ {data.manually_review_opinion && (
+
+ 运营追加:
+ {data.manually_review_opinion}
+
+ )}
+
-
- )}
+ )}