修复一些问题

This commit is contained in:
al 2024-12-25 16:21:55 +08:00
parent a1c4d0efab
commit f49dab8186
14 changed files with 51 additions and 29 deletions

View File

@ -305,7 +305,7 @@ textarea {
.adm-list-item-content {
padding: 0;
border: none!important;
border: none !important;
}
.customize-body img {
max-height: 90vh;
@ -393,13 +393,13 @@ textarea {
}
}
.adm-slider-track{
.adm-slider-track {
background-color: #ff669e40 !important;
}
.adm-slider-thumb{
.adm-slider-thumb {
background-color: #ff669e !important;
transform: scale(0.5);
}
.adm-form-item-label .adm-form-item-required-asterisk{
left: auto!important;
}
.adm-form-item-label .adm-form-item-required-asterisk {
left: auto !important;
}

View File

@ -6,6 +6,7 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faAngleLeft } from "@fortawesome/free-solid-svg-icons";
import requireAPI from "@/utils/requireAPI";
import LoadingMask from "@/components/LoadingMask";
import { formatTimestamp } from "@/utils/tools";
export default function RefundDetail() {
const [data, setData] = useState(null);
const [isLoading, setIsLoading] = useState(false);
@ -90,7 +91,7 @@ export default function RefundDetail() {
<div className="flex flex-row justify-between items-center">
<span className="text-base font-medium">退款价格</span>
<span className="flex flex-row flex-1 justify-end items-center">
<span>¥ {data?.price}</span>
<span>¥ {data ? data?.price / 100 : "0"}</span>
</span>
</div>
<Divider className="my-2" />
@ -104,14 +105,14 @@ export default function RefundDetail() {
<div className="flex flex-row justify-between items-center">
<span className="text-base font-medium">购买时间</span>
<div className="flex flex-row flex-1 justify-end items-center">
<span>{data?.ct}</span>
<span>{data ? formatTimestamp(data?.by_time) : ""}</span>
</div>
</div>
<Divider className="my-2" />
<div className="flex flex-row justify-between items-center">
<span className="text-base font-medium">退款时间</span>
<div className="flex flex-row flex-1 justify-end items-center">
<span>{data?.refund_t}</span>
<span>{data ? formatTimestamp(data?.refund_t) : ""}</span>
</div>
</div>
<Divider className="my-2" />

View File

@ -966,7 +966,13 @@ export default function CompleteStreamerInformation() {
<div className="mt-2 px-4 py-3 h-12 rounded-[0.8rem] bg-[#FFFFFF1a] flex justify-between items-center">
<div className="flex items-center">
<span className="mr-1 text-[#ffffffae] text-sm">¥</span>
<OwnInput id="addWeChatPrice" type="number" />
<Form.Item name="wechatPrice">
<OwnInput
// name="wechatPrice"
id="addWeChatPrice"
// type="number"
/>
</Form.Item>
</div>
<label
htmlFor="addWeChatPrice"

View File

@ -222,6 +222,7 @@ export default function JoinGuild() {
<Button
size="middle"
shape="rounded"
block
style={{
"--background-color": "#FF669E",
paddingLeft: "32px",

View File

@ -200,6 +200,7 @@ export default function JoinStreamer() {
<Button
size="middle"
shape="rounded"
block
style={{
"--background-color": "#FF669E",
paddingLeft: "32px",

View File

@ -4,8 +4,8 @@ import React, {
forwardRef,
useImperativeHandle,
} from "react";
import { formatTimestamp } from "../../../../utils/tools";
import ScrollNotice from "../ScrollNotice";
import { formatDate } from "../../../../utils/tools";
// import ScrollNotice from "../ScrollNotice";
import { useRouter } from "next/navigation";
import requireAPI from "@/utils/requireAPI";
import { connect } from "react-redux";
@ -115,7 +115,7 @@ const MessageList = ({ mid, changeNoticeCount, refInstance, noticeCount }) => {
newInfoItems[parseInt(it)]["count"] = noticeObj[it].unread_cnt;
if (noticeObj[it]["most_recent_notif"]) {
const time = noticeObj[it]["most_recent_notif"]["push_time"];
newInfoItems[parseInt(it)]["time"] = formatTimestamp(
newInfoItems[parseInt(it)]["time"] = formatDate(
time ? time : noticeObj[it]["most_recent_notif"]["ct"]
);
newInfoItems[parseInt(it)]["subtitle"] =

View File

@ -1,5 +1,5 @@
import React from "react";
import { formatDate } from "@/utils/tools";
import { formatTimestamp } from "@/utils/tools";
import { Toast } from "antd-mobile";
import { useRouter } from "next/navigation";
import OwnImage from "@/components/OwnImage";
@ -92,7 +92,7 @@ export default function NoticeItem({ leftIcon, hasLink, data }) {
{/* 时间 */}
<div>
<span className="text-xs text-[#FFFFFF80]">
{formatDate(data?.push_time || data?.ct)}
{formatTimestamp(data?.push_time || data?.ct)}
</span>
</div>
</div>

View File

@ -142,7 +142,7 @@ export default function Space() {
<OwnIcon src="/icons/search.png" className="scale-90" />
</Link>
<div
className="w-9 h-9 flex items-center justify-center bg-[#FFFFFF1A] rounded-full"
className="w-9 h-9 flex items-center justify-center rounded-full"
onClick={handleReadAll}
>
<OwnIcon src="/icons/32DP/remove.png" className="scale-90" />

View File

@ -451,6 +451,12 @@ export default function Search() {
boxSizing: "border-box",
}}
>
<OwnIcon
outClassName="mr-2"
className="w-[32px] h-[32px]"
src="/icons/comprehensive.png"
alt=""
/>
<span
className="text-lg font-medium"
style={{
@ -502,6 +508,12 @@ export default function Search() {
boxSizing: "border-box",
}}
>
<OwnIcon
outClassName="mr-2"
className="w-[32px] h-[32px]"
src="/icons/pricefilter.png"
alt=""
/>
<span
className="text-lg font-medium"
style={{

View File

@ -1,5 +1,4 @@
"use client";
import React, { useEffect, useState, useRef, useMemo } from "react";
import {
FloatingPanel,

View File

@ -77,7 +77,7 @@ export default function SpaceRefund() {
}
Toast.show({
icon: "success",
content: "提交成功,请关注原支付渠道通知",
content: "已提交,将在一个工作日内审核完毕",
position: "top",
});
router.replace("/");

Binary file not shown.

After

Width:  |  Height:  |  Size: 446 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 517 B

View File

@ -11,6 +11,8 @@ export function formatDeadline(timestamp) {
return `${year}${month}${day}${hours}:${minutes}:${seconds}`;
}
// 格式化时间戳-完整
export function formatTimestamp(timestamp) {
const now = new Date();
const date = new Date(timestamp * 1000);
@ -37,23 +39,20 @@ export function formatTimestamp(timestamp) {
// 检查是否是今年
if (now.getFullYear() === date.getFullYear()) {
return `${
date.getMonth() + 1
}-${date.getDate()} ${date.getHours()}:${String(date.getMinutes()).padStart(
2,
"0"
)}`;
return `${date.getMonth() + 1}-${date.getDate()} ${String(
date.getHours()
).padStart(2, "0")}:${String(date.getMinutes()).padStart(2, "0")}`;
}
// 不是今年,返回完整日期和时间
return `${date.getFullYear()}-${
date.getMonth() + 1
}-${date.getDate()} ${date.getHours()}:${String(date.getMinutes()).padStart(
2,
"0"
)}`;
}-${date.getDate()} ${String(date.getHours()).padStart(2, "0")}:${String(
date.getMinutes()
).padStart(2, "0")}`;
}
// 格式化时间戳-简洁
export function formatDate(timestamp) {
const nowTime = new Date();
const date = new Date(timestamp * 1000);
@ -65,7 +64,10 @@ export function formatDate(timestamp) {
if (nowTime.getTime() - 24 * 60 * 60 * 1000 > date.getTime()) {
return `${month}/${day}`;
} else {
return `${hours}:${minutes > 9 ? minutes : "0" + minutes}`;
return `${String(hours).padStart(2, "0")}:${String(minutes).padStart(
2,
"0"
)}`;
}
}