修改退款审核和消息
This commit is contained in:
parent
5e2375c8d9
commit
840ef29428
|
@ -141,7 +141,7 @@ export default function RefundDetail() {
|
|||
<Radio.Group
|
||||
className="flex flex-col"
|
||||
onChange={setIndex}
|
||||
value={selectedIndex}
|
||||
value={data && data?.refunds_status === 4 ? 2 : selectedIndex}
|
||||
disabled={!checkAble}
|
||||
>
|
||||
<div className="flex flex-row items-start mt-4 pr-6">
|
||||
|
@ -204,7 +204,6 @@ export default function RefundDetail() {
|
|||
</div>
|
||||
</Radio.Group>
|
||||
</div>
|
||||
|
||||
<div
|
||||
onClick={(e) => {
|
||||
if (isLoading || !checkAble) return;
|
||||
|
@ -215,7 +214,13 @@ export default function RefundDetail() {
|
|||
background: isLoading || !checkAble ? "#FFFFFF80" : "#FF669E",
|
||||
}}
|
||||
>
|
||||
{!checkAble ? "您已提交" : isLoading ? "正在提交..." : "提交"}
|
||||
{data && data?.refunds_status === 4
|
||||
? "系统已自动提交"
|
||||
: !checkAble
|
||||
? "您已提交"
|
||||
: isLoading
|
||||
? "正在提交..."
|
||||
: "提交"}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -26,7 +26,7 @@ export default function Reviewed({ currentIndex }) {
|
|||
b_mid: account.mid,
|
||||
audit_type: 1,
|
||||
offset: offset,
|
||||
limit: 20,
|
||||
limit: 10,
|
||||
};
|
||||
const _data = await requireAPI("POST", "/api/zone/refund_list", {
|
||||
body,
|
||||
|
@ -90,7 +90,7 @@ export default function Reviewed({ currentIndex }) {
|
|||
<div className="bg-[#FFFFFF1A] w-max flex items-center rounded-full px-2 py-0.5">
|
||||
<span className="text-white text-xs font-medium">
|
||||
申请时间:
|
||||
{formatTimestamp(item?.account.ut)}
|
||||
{formatTimestamp(item?.refund_t)}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -93,7 +93,7 @@ export default function PendingReview({ currentIndex }) {
|
|||
<div className="bg-[#FFFFFF1A] w-max flex items-center rounded-full px-2 py-0.5">
|
||||
<span className="text-white text-xs font-medium">
|
||||
申请时间:
|
||||
{formatTimestamp(item?.account.ut)}
|
||||
{formatTimestamp(item?.refund_t)}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -102,7 +102,11 @@ export default function PendingReview({ currentIndex }) {
|
|||
<div className="flex flex-col justify-center items-center">
|
||||
<div className="px-4 py-1 rounded-full bg-[#FFFFFF1A] flex-row items-center">
|
||||
<span className="text-white text-sm">
|
||||
{item?.refunds_status === -1 ? "已拒绝" : "已退款"}
|
||||
{item?.refunds_status === 4
|
||||
? "已自动退款"
|
||||
: item?.refunds_status === -1
|
||||
? "已拒绝"
|
||||
: "已退款"}
|
||||
</span>
|
||||
</div>
|
||||
{item?.refunds_status === 3 && (
|
||||
|
|
|
@ -25,7 +25,7 @@ export default function SpaceMember() {
|
|||
);
|
||||
return (
|
||||
<div>
|
||||
<div className="p-4 fixed top-0 z-10 w-full">
|
||||
<div className="p-4 fixed top-0 z-10 w-full bg-deepBg">
|
||||
<div className="w-9 h-9 flex items-center justify-center bg-[#FFFFFF1A] rounded-full float-left absolute">
|
||||
<FontAwesomeIcon
|
||||
icon={faAngleLeft}
|
||||
|
|
|
@ -88,6 +88,7 @@ export default function JoinEntrance() {
|
|||
}
|
||||
>
|
||||
<OwnIcon
|
||||
className="h-auto w-80"
|
||||
src={`/images/${
|
||||
streamerState?.basic_status === 2 ||
|
||||
streamerState?.basic_status === 4
|
||||
|
@ -101,6 +102,7 @@ export default function JoinEntrance() {
|
|||
onClick={() => guildState !== 0 && router.push("joinGuild")}
|
||||
>
|
||||
<OwnIcon
|
||||
className="h-auto w-80"
|
||||
src={`/images/${
|
||||
guildState === 0 ? "guildJoined" : "guildJoin"
|
||||
}.png`}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import React, { useMemo } from "react";
|
||||
import { formatTimestamp } from "@/utils/tools";
|
||||
import React from "react";
|
||||
import { formatDate } from "@/utils/tools";
|
||||
import { Toast } from "antd-mobile";
|
||||
import { useRouter } from "next/navigation";
|
||||
import OwnImage from "@/components/OwnImage";
|
||||
|
@ -32,7 +32,9 @@ export default function NoticeItem({ leftIcon, hasLink, data }) {
|
|||
>
|
||||
<div className="mr-2 bg-white rounded-lg w-[50px] h-[50px]">
|
||||
<OwnImage
|
||||
className="rounded-lg"
|
||||
outClassName="w-full h-full rounded-lg"
|
||||
className="w-full h-full"
|
||||
rounded="rounded-lg"
|
||||
height="100%"
|
||||
fit="cover"
|
||||
src={data.thumbnail?.images[0].urls[0]}
|
||||
|
@ -90,7 +92,7 @@ export default function NoticeItem({ leftIcon, hasLink, data }) {
|
|||
{/* 时间 */}
|
||||
<div>
|
||||
<span className="text-xs text-[#FFFFFF80]">
|
||||
{formatTimestamp(data?.push_time || data?.ct)}
|
||||
{formatDate(data?.push_time || data?.ct)}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
"use client";
|
||||
import React, { useState, useRef } from "react";
|
||||
import NoticeItem from "../../components/NoticeItem";
|
||||
import Empty from "../../../../components/Empty";
|
||||
import { Toast, InfiniteScroll } from "antd-mobile";
|
||||
import { useParams, useRouter, useSearchParams } from "next/navigation";
|
||||
import requireAPI from "@/utils/requireAPI";
|
||||
|
@ -104,7 +103,6 @@ export default function SystemNotice({ mid, total, ...props }) {
|
|||
<NoticeItem
|
||||
key={it.id}
|
||||
data={it}
|
||||
navigation={navigation}
|
||||
hasLink={{ url: it.url, text: it.link_text }}
|
||||
leftIcon={
|
||||
<div>
|
||||
|
|
|
@ -7,7 +7,7 @@ const WebSocketComponent = ({ getData }) => {
|
|||
let socket = null;
|
||||
let interval = null;
|
||||
|
||||
function fn() {
|
||||
function connect_socket() {
|
||||
const base = baseRequest();
|
||||
if (socket && socket.readyState === 1) return;
|
||||
// 创建WebSocket连接
|
||||
|
@ -15,6 +15,14 @@ const WebSocketComponent = ({ getData }) => {
|
|||
socket = new WebSocket(
|
||||
`${process.env.NEXT_PUBLIC_WEBSOCKET_URL}/ws?b_mid=${base.b_mid}&b_dt=1&b_token=${base.b_token}&b-ch=h5`
|
||||
);
|
||||
|
||||
// 响应服务器的 ping
|
||||
// socket.on("ping", () => {
|
||||
// socket.send("pong");
|
||||
// });
|
||||
}
|
||||
connect_socket();
|
||||
if (socket) {
|
||||
// 注意使用wss协议(如果服务器支持)
|
||||
// 连接打开时触发
|
||||
socket.onopen = () => {
|
||||
|
@ -53,24 +61,19 @@ const WebSocketComponent = ({ getData }) => {
|
|||
// 连接关闭时触发
|
||||
socket.onclose = () => {
|
||||
clearInterval(interval);
|
||||
connect_socket();
|
||||
// console.log("WebSocket disconnected.");
|
||||
};
|
||||
|
||||
// 连接错误时触发
|
||||
socket.onerror = (error) => {
|
||||
// console.error("WebSocket error:", error);
|
||||
};
|
||||
|
||||
// 响应服务器的 ping
|
||||
// socket.on("ping", () => {
|
||||
// socket.send("pong");
|
||||
// });
|
||||
}
|
||||
fn();
|
||||
// 组件卸载时关闭WebSocket连接
|
||||
return () => {
|
||||
// console.log("state", socket.readyState);
|
||||
socket?.readyState === WebSocket.OPEN && socket?.close();
|
||||
clearInterval(interval);
|
||||
};
|
||||
}, []); // 空依赖数组表示这个effect只在组件挂载时运行一次
|
||||
// return <Error statusCode={500} />;
|
||||
|
|
|
@ -54,6 +54,21 @@ export function formatTimestamp(timestamp) {
|
|||
)}`;
|
||||
}
|
||||
|
||||
export function formatDate(timestamp) {
|
||||
const nowTime = new Date();
|
||||
const date = new Date(timestamp * 1000);
|
||||
const year = date.getFullYear();
|
||||
const month = date.getMonth() + 1; // 月份从0开始,所以需要加1
|
||||
const day = date.getDate();
|
||||
const hours = date.getHours();
|
||||
const minutes = date.getMinutes();
|
||||
if (nowTime.getTime() - 24 * 60 * 60 * 1000 > date.getTime()) {
|
||||
return `${month}/${day}`;
|
||||
} else {
|
||||
return `${hours}:${minutes > 9 ? minutes : "0" + minutes}`;
|
||||
}
|
||||
}
|
||||
|
||||
// 防抖函数
|
||||
export function debounce(fn, delay) {
|
||||
let timer = null;
|
||||
|
|
Loading…
Reference in New Issue