修复问题

This commit is contained in:
al 2024-10-25 19:19:41 +08:00
parent 4da6c9a900
commit 1c47975ea2
13 changed files with 246 additions and 114 deletions

View File

@ -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() {
<div className="flex items-center">
<span className="mr-1 text-[#ffffffae] text-sm">¥</span>
<OwnInput
id="spacePrice"
type="number"
fontSize="22"
value={formData.spacePrice}
@ -288,12 +293,13 @@ export default function CreateProfile() {
}
/>
</div>
<p
<label
htmlFor="spacePrice"
className="text-[#ffffffae] text-xs whitespace-nowrap"
onClick={() => setSpacePriceAble(true)}
>
点击编辑
</p>
</label>
</div>
</div>
<div className="mt-3">
@ -310,6 +316,7 @@ export default function CreateProfile() {
<div className="flex items-center">
<span className="mr-1 text-[#ffffffae] text-sm">¥</span>
<OwnInput
id="ironPrice"
type="number"
fontSize="22"
value={formData.ironFanPrice}
@ -318,12 +325,13 @@ export default function CreateProfile() {
}
/>
</div>
<p
<label
htmlFor="ironPrice"
className="text-[#ffffffae] text-xs whitespace-nowrap"
onClick={() => setTiefenPriceAble(true)}
>
点击编辑
</p>
</label>
</div>
</div>
<div className="mt-3">

View File

@ -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() {
<div className="flex items-center">
<span className="mr-1 text-[#ffffffae] text-sm">¥</span>
<OwnInput
id="addWeChatPrice"
type="number"
fontSize="22"
value={formData.wechatPrice}
@ -632,12 +631,13 @@ export default function EditHome() {
}
/>
</div>
<p
<label
htmlFor="addWeChatPrice"
className="text-[#ffffffae] text-xs whitespace-nowrap"
onClick={() => setSpacePriceAble(true)}
>
点击编辑
</p>
</label>
</div>
</div>

View File

@ -36,11 +36,71 @@ export default function Editprofile() {
router.push("editprofile/editHome");
}}
>
<FontAwesomeIcon
icon={faSpa}
{/* <FontAwesomeIcon
icon={
}
style={{ maxWidth: "34px", height: "40px" }}
size="2xl"
/>
/> */}
<div className="max-w-[34px] h-[34px]">
<svg
t="1729854993572"
class="icon"
viewBox="0 0 1024 1024"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
p-id="14167"
width="34"
height="34"
>
<path
d="M512 0c282.675692 0 512 229.324308 512 512s-229.324308 512-512 512S0 794.675692 0 512 229.324308 0 512 0z m0 78.769231c-239.170462 0-433.230769 194.060308-433.230769 433.230769s194.060308 433.230769 433.230769 433.230769 433.230769-194.060308 433.230769-433.230769S751.170462 78.769231 512 78.769231z"
fill="#ffffff"
p-id="14168"
></path>
<path
d="M768 75.298462c21.752615 0 39.384615 17.632 39.384615 39.384615V610.461538c0 21.752615-17.632 39.384615-39.384615 39.384616s-39.384615-17.632-39.384615-39.384616V114.683077c0-21.752615 17.632-39.384615 39.384615-39.384615z"
fill="#ffffff"
p-id="14169"
></path>
<path
d="M944.777846 377.984c15.382154-15.379692 40.32-15.379692 55.699692 0 15.379692 15.382154 15.379692 40.32 0 55.699692l-362.166153 362.166154c-15.382154 15.379692-40.32 15.379692-55.699693 0-15.379692-15.382154-15.379692-40.32 0-55.699692l362.166154-362.166154z"
fill="#ffffff"
p-id="14170"
></path>
<path
d="M909.316923 728.615385c21.752615 0 39.384615 17.632 39.384615 39.384615s-17.632 39.384615-39.384615 39.384615H413.538462c-21.752615 0-39.384615-17.632-39.384616-39.384615s17.632-39.384615 39.384616-39.384615h495.778461z"
fill="#ffffff"
p-id="14171"
></path>
<path
d="M235.854769 590.316308c15.382154-15.379692 40.32-15.379692 55.699693 0l354.461538 354.461538c15.379692 15.382154 15.379692 40.32 0 55.699692-15.382154 15.379692-40.32 15.379692-55.699692 0l-354.461539-354.461538c-15.379692-15.382154-15.379692-40.32 0-55.699692z"
fill="#ffffff"
p-id="14172"
></path>
<path
d="M256 374.153846c21.752615 0 39.384615 17.632 39.384615 39.384616v492.307692c0 21.752615-17.632 39.384615-39.384615 39.384615s-39.384615-17.632-39.384615-39.384615V413.538462c0-21.752615 17.632-39.384615 39.384615-39.384616z"
fill="#ffffff"
p-id="14173"
></path>
<path
d="M377.984 235.854769c15.382154-15.379692 40.32-15.379692 55.699692 0 15.379692 15.382154 15.379692 40.32 0 55.699693l-354.461538 354.461538c-15.382154 15.379692-40.32 15.379692-55.699692 0-15.379692-15.382154-15.379692-40.32 0-55.699692l354.461538-354.461539z"
fill="#ffffff"
p-id="14174"
></path>
<path
d="M590.769231 216.615385c21.752615 0 39.384615 17.632 39.384615 39.384615s-17.632 39.384615-39.384615 39.384615H114.683077c-21.752615 0-39.384615-17.632-39.384615-39.384615s17.632-39.384615 39.384615-39.384615H590.769231z"
fill="#ffffff"
p-id="14175"
></path>
<path
d="M377.984 23.522462c15.382154-15.379692 40.32-15.379692 55.699692 0l362.166154 362.166153c15.379692 15.382154 15.379692 40.32 0 55.699693-15.382154 15.379692-40.32 15.379692-55.699692 0l-362.166154-362.166154c-15.379692-15.382154-15.379692-40.32 0-55.699692z"
fill="#ffffff"
p-id="14176"
></path>
</svg>
</div>
<span className="text-[#FFFFFF80] font-medium text-sm mt-2">
编辑主页
</span>
@ -66,11 +126,39 @@ export default function Editprofile() {
router.push("/space/setting/spaceIntroSetting/editStreamerMedia");
}}
>
<FontAwesomeIcon
icon={faImages}
style={{ maxWidth: "34px", height: "40px" }}
size="2xl"
/>
<div className="max-w-[34px] h-[34px]">
<svg
t="1729854877748"
class="icon"
viewBox="0 0 1170 1024"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
p-id="6279"
width="34"
height="34"
>
<path
d="M146.285714 0h731.533713C958.454855 0.235429 1023.764569 65.545143 1023.999998 146.285714v36.571428h-73.142857V146.390857C950.742855 105.988571 918.013712 73.259428 877.714284 73.142857H146.390857C105.988571 73.257143 73.259428 105.986285 73.142857 146.285714v585.037713C73.257143 771.725713 105.986285 804.454855 146.285714 804.571427h36.571428v73.142857H146.180571C65.545143 877.478855 0.235429 812.169141 0 731.42857V146.180571C0.235429 65.545143 65.545143 0.235429 146.285714 0z"
fill="#ffffff"
p-id="6280"
></path>
<path
d="M1028.594283 182.857142c78.253714 0 141.691428 63.437714 141.691429 141.691429v557.759998c0 78.253714-63.437714 141.691428-141.691429 141.691429H324.548571C246.294857 1023.999998 182.857142 960.562284 182.857142 882.308569V324.548571C182.857142 246.294857 246.294857 182.857142 324.548571 182.857142h704.045712z m0 73.142857H324.548571c-37.858286 0-68.548571 30.690286-68.548572 68.548572v557.759998c0 37.858286 30.690286 68.548571 68.548572 68.548572h704.045712c37.858286 0 68.548571-30.690286 68.548572-68.548572V324.548571c0-37.858286-30.690286-68.548571-68.548572-68.548572z"
fill="#ffffff"
p-id="6281"
></path>
<path
d="M852.38857 322.491428c58.982857 0 106.902857 47.577143 106.902856 106.4 0 58.822857-47.92 106.4-106.902856 106.399999-58.982857 0-106.902857-47.577143-106.902857-106.399999 0-58.822857 47.92-106.4 106.902857-106.4z m0 73.142857c-18.704 0-33.76 14.948571-33.76 33.257143 0 18.308571 15.056 33.257143 33.76 33.257142s33.76-14.948571 33.759999-33.257142c0-18.308571-15.056-33.257143-33.759999-33.257143zM462.27657 549.855999c42.292571-37.243428 106.194285-35.410286 146.326857 4.24l199.2 197.462856c14.345143 14.217143 14.445714 37.373714 0.228571 51.718857-14.221714 14.345143-37.376 14.445714-51.721143 0.228572l-199.156571-197.421714c-12.754286-12.601143-33.083428-13.184-46.514285-1.357714l-267.017142 235.588571c-15.145143 13.362286-38.253714 11.917714-51.618286-3.227429-13.362286-15.147429-11.917714-38.256 3.227429-51.620571l267.04457-235.611428z"
fill="#ffffff"
p-id="6282"
></path>
<path
d="M851.622855 692.29257c39.168-38.628571 101.188571-41.426286 143.757714-6.413714l161.645714 133.737142c15.563429 12.875429 17.741714 35.929143 4.866286 51.490286-12.875429 15.563429-35.929143 17.741714-51.490286 4.866285l-161.565714-133.668571c-13.558857-11.154286-33.353143-10.262857-45.769142 1.981715l-271.062857 269.097142c-14.331429 14.228571-37.488 14.146286-51.718857-0.189714-14.228571-14.331429-14.146286-37.488 0.189714-51.718857l271.147428-269.181714z"
fill="#ffffff"
p-id="6283"
></path>
</svg>
</div>
<span className="text-[#FFFFFF80] font-medium text-sm mt-2">
照片墙
</span>

View File

@ -898,6 +898,7 @@ export default function CompleteStreamerInformation() {
<div className="flex items-center">
<span className="mr-1 text-[#ffffffae] text-sm">¥</span>
<OwnInput
id="addWeChatPrice"
type="number"
fontSize="22"
value={formData.wechatPrice}
@ -906,12 +907,13 @@ export default function CompleteStreamerInformation() {
}
/>
</div>
<p
<label
htmlFor="addWeChatPrice"
className="text-[#ffffffae] text-xs whitespace-nowrap"
onClick={() => setSpacePriceAble(true)}
>
点击编辑
</p>
</label>
</div>
</div>

View File

@ -196,17 +196,17 @@ export default function CreateImagePost() {
为了空间良性发展请保持免费/付费比例为1/1
</p>
<div className="flex flex-row flex-wrap justify-between p-4 rounded-2xl bg-[#FFFFFF1A]">
<p className="text-xs font-medium text-white basis-1/2">
<p className="text-xs font-medium basis-1/2">
已发布免费动态{postCount?.free_count || 0}
</p>
<p className="text-xs font-medium text-white basis-1/2">
<p className="text-xs font-medium basis-1/2">
已发布付费动态{postCount?.paid_count || 0}
</p>
<p className="text-xs font-medium text-white basis-1/2 mt-1">
<p className="text-xs font-medium basis-1/2 mt-1">
<span className="text-[#27F5B7]">可发布付费动态</span>
{postCount?.paid_limit || 0}
</p>
<p className="text-xs font-medium text-white basis-1/2 mt-1">
<p className="text-xs font-medium basis-1/2 mt-1">
<span className="text-[#F53030]">审核未通过动态</span>
{postCount?.rejected_count || 0}
</p>
@ -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"
>
<div className="flex flex-row items-center">
<span className="text-white text-base font-medium whitespace-nowrap">
<span className="text-base font-medium whitespace-nowrap">
价格¥
</span>
<div className="px-2 mx-1 rounded-full bg-[#ffffff1A]">
@ -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"
/>
</div>
<span
@ -304,10 +304,10 @@ export default function CreateImagePost() {
<>
<div className="flex justify-between items-center my-1">
<div className="flex items-center">
<span className="text-white text-base font-medium mr-2 whitespace-nowrap">
<span className="text-base font-medium mr-2 whitespace-nowrap">
可预览图片
</span>
<span className="text-white text-base font-medium"></span>
<span className="text-base font-medium"></span>
<div className="px-2 mx-1 rounded-full max-w-[60px] bg-[#ffffff1A]">
<OwnInput
placeholder="0~3"
@ -319,10 +319,10 @@ export default function CreateImagePost() {
}))
}
value={priceEditData.imageVisibleRange}
// className="bg-transparent text-white rounded-2xl px-4 mx-2 h-8"
// className="bg-transparent rounded-2xl px-4 mx-2 h-8"
/>
</div>
<span className="text-white text-base font-medium"></span>
<span className="text-base font-medium"></span>
</div>
<span
onClick={() =>
@ -337,7 +337,7 @@ export default function CreateImagePost() {
</span>
</div>
<div className="flex items-center my-1">
<span className="text-white text-base font-medium mr-2">
<span className="text-base font-medium mr-2">
添加付费文案
</span>
<Switch
@ -354,7 +354,7 @@ export default function CreateImagePost() {
/>
</div>
<div className="flex items-center my-1">
<span className="text-white text-base font-medium mr-2">
<span className="text-base font-medium mr-2">
铁粉免费查看
</span>
<Switch

View File

@ -1,5 +1,5 @@
"use client";
import React, { useState, useEffect } from "react";
import React, { useState, useEffect, useMemo, useCallback } from "react";
import { DotLoading, Popup, Toast, TextArea, Switch } from "antd-mobile";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faAngleLeft } from "@fortawesome/free-solid-svg-icons";
@ -42,6 +42,8 @@ export default function EditSpacePost() {
isFreeForIronfan: data?.is_ironfan_visible,
blurCover: data?.is_blurring_cover == 1,
};
// const imgs = getExistImgs(data);
setFormData({
content: data?.paid_text
? data?.text.slice(0, data?.text.length - data?.paid_text.length)
@ -62,7 +64,7 @@ export default function EditSpacePost() {
});
return;
}
if (formData.imageAssets.length === 0) {
if (data?.m_type && formData.imageAssets.length === 0) {
Toast.show({
icon: "fail",
content: "请上传至少一张图片",
@ -123,6 +125,7 @@ export default function EditSpacePost() {
...media.video_ids,
];
}
try {
const body = {
id: data.id,
@ -142,6 +145,7 @@ export default function EditSpacePost() {
is_creating_paid_text: isCreatingPaidText && price > 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 (
<div className="flex-1">
{/* 头部标题 */}
@ -191,33 +220,36 @@ export default function EditSpacePost() {
</div>
{/* 内容 */}
<div className="pt-16 p-4">
{data?.status === 3 && (
<div className="mb-4">
<span className="text-base font-medium text-[#F53030] mb-2">
违规详情
</span>
<div className="mt-2 p-4 rounded-2xl bg-[#FFFFFF1A]">
{data.text_audit_opinion && (
<span className="text-sm font-medium text-white">
<span className="text-[#F53030]">文案违规原因</span>
{data.text_audit_opinion}
</span>
)}
{data.image_audit_opinion && (
<span className="text-sm font-medium text-white">
<span className="text-[#F53030]">图片/视频违规原因</span>
{data.image_audit_opinion}
</span>
)}
{data.manually_review_opinion && (
<span className="text-sm font-medium text-white">
<span className="text-[#F53030]">运营追加</span>
{data.manually_review_opinion}
</span>
)}
{data?.status === 3 &&
(data.text_audit_opinion ||
data.image_audit_opinion ||
data.manually_review_opinion) && (
<div className="mb-4">
<span className="text-base font-medium text-[#F53030] mb-2">
违规详情
</span>
<div className="mt-2 p-4 rounded-2xl bg-[#FFFFFF1A]">
{data.text_audit_opinion && (
<span className="text-sm font-medium text-white">
<span className="text-[#F53030]">文案违规原因</span>
{data.text_audit_opinion}
</span>
)}
{data.image_audit_opinion && (
<span className="text-sm font-medium text-white">
<span className="text-[#F53030]">图片/视频违规原因</span>
{data.image_audit_opinion}
</span>
)}
{data.manually_review_opinion && (
<span className="text-sm font-medium text-white">
<span className="text-[#F53030]">运营追加</span>
{data.manually_review_opinion}
</span>
)}
</div>
</div>
</div>
)}
)}
<div className="mt-2">
<p className="text-base font-medium text-white">动态内容</p>
<TextArea
@ -227,7 +259,7 @@ export default function EditSpacePost() {
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 && (
<>
@ -239,7 +271,7 @@ export default function EditSpacePost() {
}
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"
/>
</>
)}
@ -248,20 +280,7 @@ export default function EditSpacePost() {
<div>
<UploadImgs
type={data?.m_type}
existImages={(data?.m_type === 1
? data.media_component.images
: data.media_component.videos
).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],
}
)}
existImages={getExistImgs}
accept={
data?.m_type === 1
? "image/png, image/jpeg, image/jpg"
@ -307,10 +326,10 @@ export default function EditSpacePost() {
className="flex flex-col py-2"
>
<div className="flex flex-row items-center">
<span className="text-white text-base font-medium whitespace-nowrap">
<span className="text-base font-medium whitespace-nowrap">
价格¥
</span>
<div className="px-2 mx-1 rounded-full bg-[#ffffff80]">
<div className="px-2 mx-1 rounded-full bg-[#ffffff1a]">
<OwnInput
placeholder="¥13000"
placeholderTextColor="#FFFFFF80"
@ -320,7 +339,7 @@ export default function EditSpacePost() {
setPriceEditData((old) => ({ ...old, price: value }))
}
value={priceEditData.price}
className="flex-1 bg-[#FFFFFF1A] text-white rounded-2xl px-4 h-8 mx-2"
// className="flex-1 bg-[#FFFFFF1A] rounded-2xl px-4 h-8 mx-2"
/>
</div>
<span
@ -337,11 +356,11 @@ export default function EditSpacePost() {
{data?.m_type === 1 && (
<div className="flex justify-between items-center my-1">
<div className="flex items-center">
<span className="text-white text-base font-medium mr-2 whitespace-nowrap">
<span className="text-base font-medium mr-2 whitespace-nowrap">
可预览图片
</span>
<span className="text-white text-base font-medium"></span>
<div className="px-2 mx-1 rounded-full max-w-[60px] bg-[#ffffff80]">
<span className="text-base font-medium"></span>
<div className="px-2 mx-1 rounded-full max-w-[60px] bg-[#ffffff1a]">
<OwnInput
placeholder="0~3"
placeholderTextColor="#FFFFFF80"
@ -352,10 +371,10 @@ export default function EditSpacePost() {
}))
}
value={priceEditData.imageVisibleRange}
className="bg-[#FFFFFF1A] text-white rounded-2xl px-4 mx-2 h-8"
// className="bg-[#FFFFFF1A] rounded-2xl px-4 mx-2 h-8"
/>
</div>
<span className="text-white text-base font-medium"></span>
<span className="text-base font-medium"></span>
</div>
<span
onClick={() =>
@ -371,7 +390,7 @@ export default function EditSpacePost() {
</div>
)}
<div className="flex items-center my-1">
<span className="text-white text-base font-medium mr-2">
<span className="text-base font-medium mr-2">
添加付费文案
</span>
<Switch
@ -382,13 +401,14 @@ export default function EditSpacePost() {
isCreatingPaidText: value,
}));
}}
style={{
"--checked-color": "#FF669E",
}}
/>
</div>
{data?.m_type === 2 && (
<div className="flex items-center my-1">
<span className="text-white text-base font-medium mr-2">
封面模糊
</span>
<span className="text-base font-medium mr-2">封面模糊</span>
<Switch
checked={priceEditData.blurCover}
onChange={(value) => {
@ -397,11 +417,14 @@ export default function EditSpacePost() {
blurCover: value,
}));
}}
style={{
"--checked-color": "#FF669E",
}}
/>
</div>
)}
<div className="flex items-center my-1">
<span className="text-white text-base font-medium mr-2">
<span className="text-base font-medium mr-2">
铁粉免费查看
</span>
<Switch
@ -412,6 +435,9 @@ export default function EditSpacePost() {
isFreeForIronfan: value,
}))
}
style={{
"--checked-color": "#FF669E",
}}
/>
</div>
</>

View File

@ -122,15 +122,15 @@ export default function Setting() {
{/* 内容 */}
<div className="p-4 pt-20">
<div className="flex justify-between items-center">
<div
className="flex items-center"
onClick={() => {
router.push(
"setting/spaceIntroSetting?data=" + searchParams.get("data")
);
}}
>
<div
className="flex justify-between items-center"
onClick={() => {
router.push(
"setting/spaceIntroSetting?data=" + searchParams.get("data")
);
}}
>
<div className="flex items-center">
<Avatar
rounded-full
mr-4
@ -159,9 +159,6 @@ export default function Setting() {
icon={faCalendar}
size="sm"
className="mr-1"
onClick={() => {
router.back();
}}
/>
<span>{formatDate(streamerInfo?.ct)}</span>
</li>

View File

@ -186,6 +186,7 @@ export default function spacePaymentSetting() {
_superFanPrice < 100 ||
_superFanPrice > 388800)
) {
isPrice = true;
Toast.show({
icon: "fail",
content: "请输入有效的超粉价格",
@ -194,6 +195,7 @@ export default function spacePaymentSetting() {
return;
}
if (openSuper && _superFanPrice <= _ironFanPrice) {
isPrice = true;
Toast.show({
icon: "fail",
content: "请输入大于铁粉价格的超粉价格",
@ -314,6 +316,7 @@ export default function spacePaymentSetting() {
/>
)} */}
<OwnInput
id="spacePrice"
type="number"
fontSize="22"
placeholder="0~3888仅支持整数"
@ -325,12 +328,13 @@ export default function spacePaymentSetting() {
inputClassName="placeholder:text-[14px]"
/>
</div>
<p
<label
htmlFor="spacePrice"
className="text-[#ffffff40] text-xs whitespace-nowrap"
onClick={() => setSpacePriceAble(true)}
>
点击编辑
</p>
</label>
</div>
</div>
<div className="mt-3">
@ -352,6 +356,7 @@ export default function spacePaymentSetting() {
)} */}
<OwnInput
id="ironPrice"
type="number"
fontSize="22"
placeholder="1~3888仅支持整数"
@ -363,12 +368,13 @@ export default function spacePaymentSetting() {
inputClassName="placeholder:text-[14px]"
/>
</div>
<p
<label
htmlFor="ironPrice"
className="text-[#ffffff40] text-xs whitespace-nowrap"
onClick={() => setTiefenPriceAble(true)}
>
点击编辑
</p>
</label>
</div>
</div>
<div className="mt-3">

View File

@ -78,7 +78,7 @@ export default function StreamerPosts({ id }) {
}}
/>
</div>
<p className="text-base text-center leading-9">动态</p>
<p className="text-base text-center leading-9">广场动态</p>
</div>
{/* 内容 */}
<div className="pt-16 p-4">
@ -91,7 +91,7 @@ export default function StreamerPosts({ id }) {
{data?.map((item, index) => (
<List.Item key={index}>
{/* <RenderItem item={item} /> */}
<PostItem data={item} />
<PostItem data={item} type="post" />
</List.Item>
))}
</List>

View File

@ -15,10 +15,12 @@ export default function OwnInput({
className,
inputClassName,
fontSize,
id,
}) {
return (
<div className={`flex flex-1 relative ${className}`}>
<input
id={id}
placeholder={placeholder}
disabled={disabled}
name={name}

View File

@ -179,12 +179,12 @@ export default function PostItem({
</div>
</div>
)}
{data?.status === 3 && (
{data?.status === 3 && type == "space" && (
<p
className="py-1 px-2 inline-block bg-[#F53030] rounded"
onClick={() => {
router.push(
`editSpacePost?data=${encodeURIComponent(
`/space/editSpacePost?data=${encodeURIComponent(
JSON.stringify(data)
)}`
);
@ -397,6 +397,12 @@ export default function PostItem({
删除
</li>
</>
) : type == "post" && account?.mid == data?.mid ? (
<>
<li className="py-1 px-4" onClick={handleDelete}>
删除
</li>
</>
) : (
<>
<li

View File

@ -21,8 +21,6 @@ export default function UploadImgs({
useEffect(() => {
if (existImages.length > 0) {
setFilesUrls(existImages.map((it) => it.url));
// setFrameImage({...frameImage,src:existImages});
getImgs(existImages);
}
if (videoSrc) {
setVideoUrl(videoSrc);
@ -77,7 +75,6 @@ export default function UploadImgs({
let newAssets = [...assets];
newArr.splice(index, 1);
newAssets.splice(index, 1);
setFilesUrls(newArr);
getImgs(newAssets);
};

View File

@ -27,7 +27,7 @@ export default function customFetch(method, url, options = {}, needMid) {
// 合并选项
const mergedOptions = { ...defaultOptions, body };
console.log("body", body);
// console.log("body", body);
// 返回 Promise 对象
return new Promise((resolve, reject) => {
fetch(url, mergedOptions)