修复意见反馈功能

This commit is contained in:
al 2024-08-05 18:34:44 +08:00
parent 0a64774413
commit 80f9a6e9bd
6 changed files with 60 additions and 55 deletions

View File

@ -361,13 +361,15 @@ function Login({ handleLogin }) {
/> />
</div> </div>
</div> </div>
<div <div className="flex justify-end">
<span
onClick={() => onClick={() =>
router.push(`/my/setting/editPassword?forgetPassword=true`) router.push(`/my/setting/editPassword?forgetPassword=true`)
} }
className="w-full text-[#FF669E] text-xs mt-2 text-right" className="text-[#FF669E] text-xs mt-2 text-right"
> >
忘记密码 忘记密码
</span>
</div> </div>
<LoginBtn <LoginBtn
loginInfo={loginInfo} loginInfo={loginInfo}
@ -430,12 +432,15 @@ const LoginBtn = ({ loginInfo, setLoginInfo, type, handleSubmit }) => {
size="middle" size="middle"
block block
onClick={() => handleSubmit(type)} onClick={() => handleSubmit(type)}
style={{ "--background-color": "#FF669E", color: "#FFFFFF",marginTop:"1rem" }} style={{
"--background-color": "#FF669E",
color: "#FFFFFF",
marginTop: "1rem",
}}
className="mt-4 py-2" className="mt-4 py-2"
> >
登录 登录
</Button> </Button>
</div> </div>
); );
}; };
@ -447,9 +452,16 @@ const BottomBox = () => {
<div className="p-3 rounded-md flex justify-between items-center bg-[#ffffff17]"> <div className="p-3 rounded-md flex justify-between items-center bg-[#ffffff17]">
<div> <div>
<p className="">铁粉空间APP可以下载啦</p> <p className="">铁粉空间APP可以下载啦</p>
<p className="text-xs text-[#FFFFFF80]">立即下载APP体验更好的服务</p> <p className="text-xs text-[#FFFFFF80]">
立即下载APP体验更好的服务
</p>
</div>
<div
className="px-2 py-1 rounded-full bg-[#FF669E]"
onClick={() => router.push("https://tiefen.fun")}
>
下载APP
</div> </div>
<div className="px-2 py-1 rounded-full bg-[#FF669E]" onClick={()=>router.push("https://tiefen.fun")}>下载APP</div>
</div> </div>
</div> </div>
); );

View File

@ -461,6 +461,7 @@ export default function MessageDetail({}) {
className="" className=""
value={newMessage} value={newMessage}
onChange={setNewMessage} onChange={setNewMessage}
style={{"--font-size": "16px",}}
/> />
</div> </div>
<Button <Button

View File

@ -84,7 +84,8 @@ export default function EditUserName() {
max={8} max={8}
onChange={(value) => setName(value)} onChange={(value) => setName(value)}
value={name} value={name}
style={{ "--placeholder-color": "#FFFFFF80" }} style={{ "--placeholder-color": "#FFFFFF80","--font-size": "16px", }}
/> />
</div> </div>
<div className="mt-16"> <div className="mt-16">

View File

@ -82,7 +82,7 @@ export default function Feedback() {
onChange={(value) => setValue(value)} onChange={(value) => setValue(value)}
value={value} value={value}
className="h-32 bg-[#FFFFFF1A] text-white rounded-2xl mt-2 p-2" className="h-32 bg-[#FFFFFF1A] text-white rounded-2xl mt-2 p-2"
style={{ "--placeholder-color": "#FFFFFF80", "--font-size": "14px" }} style={{ "--placeholder-color": "#FFFFFF80", "--font-size": "16px" }}
/> />
<p className="text-base font-medium text-white mt-4 mb-1"> <p className="text-base font-medium text-white mt-4 mb-1">
截图最多9张 截图最多9张

View File

@ -183,7 +183,7 @@ export default function SpaceRefund() {
className="h-32 bg-[#FFFFFF1A] text-white rounded-2xl mt-2 p-2" className="h-32 bg-[#FFFFFF1A] text-white rounded-2xl mt-2 p-2"
style={{ style={{
"--placeholder-color": "#FFFFFF80", "--placeholder-color": "#FFFFFF80",
"--font-size": "14px", "--font-size": "16px",
}} }}
/> />
</div> </div>

View File

@ -126,9 +126,8 @@ async function getFailId() {
//上传单张图片 //上传单张图片
export async function uploadImage(asset) { export async function uploadImage(asset) {
const auth = await getAuth(1); const auth = await getAuth(1);
console.log("auth",auth) console.log("auth", auth);
try { try {
const formData = new FormData(); const formData = new FormData();
formData.append("name", auth.filename); formData.append("name", auth.filename);
@ -138,12 +137,12 @@ export async function uploadImage(asset) {
formData.append("signature", auth.signature); formData.append("signature", auth.signature);
formData.append("key", auth.directory + "/" + auth.filename); formData.append("key", auth.directory + "/" + auth.filename);
formData.append("file", asset); formData.append("file", asset);
console.log("formData",...formData) console.log("formData", ...formData);
const uploadResponse = await fetch(auth.host, { const uploadResponse = await fetch(auth.host, {
method: "POST", method: "POST",
body: formData, body: formData,
}); });
console.log("uploadResponse",uploadResponse) console.log("uploadResponse", uploadResponse);
if (uploadResponse.status === 200) { if (uploadResponse.status === 200) {
// console.log(asset); // console.log(asset);
// debugger // debugger
@ -156,11 +155,8 @@ export async function uploadImage(asset) {
fmt: asset.type, fmt: asset.type,
}; };
const base = baseRequest(); const base = baseRequest();
const response = await fetch( const response = await fetch(`/api/media/c_upload`, {
`/api/media/c_upload`,
{
method: "POST", method: "POST",
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
@ -170,8 +166,7 @@ export async function uploadImage(asset) {
item: item, item: item,
...base, ...base,
}), }),
} });
);
const data = await response.json(); const data = await response.json();
if (data.ret === -1) { if (data.ret === -1) {
Toast.show({ Toast.show({
@ -220,7 +215,7 @@ export async function uploadVideo(asset) {
method: "POST", method: "POST",
body: formData, body: formData,
}); });
console.log("uploadResponse",uploadResponse) console.log("uploadResponse", uploadResponse);
if (uploadResponse.status === 200) { if (uploadResponse.status === 200) {
const md5 = uploadResponse.headers.map.etag.substring( const md5 = uploadResponse.headers.map.etag.substring(
1, 1,
@ -236,9 +231,7 @@ export async function uploadVideo(asset) {
fmt: fileType, fmt: fileType,
}; };
const base = baseRequest(); const base = baseRequest();
const response = await fetch( const response = await fetch(`/api/media/c_upload`, {
`/api/media/c_upload`,
{
method: "POST", method: "POST",
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
@ -248,8 +241,7 @@ export async function uploadVideo(asset) {
item: item, item: item,
...base, ...base,
}), }),
} });
);
const data = await response.json(); const data = await response.json();
if (data.ret === -1) { if (data.ret === -1) {
Toast.show({ Toast.show({
@ -281,14 +273,13 @@ export async function uploadVideo(asset) {
} }
} }
//上传多个图片 //上传多个图片
export async function multiUploadImage(assets) { export async function multiUploadImage(assets) {
console.log("assets",assets) console.log("assets", assets);
let ids = { image_ids: [], video_ids: [] }; let ids = { image_ids: [], video_ids: [] };
await Promise.all( await Promise.all(
assets.map(async (asset) => { assets.map(async (asset) => {
const id = await uploadImage(asset.src); const id = await uploadImage(asset);
// debugger; // debugger;
ids.image_ids.push(id); ids.image_ids.push(id);
}) })