"use client"; import React, { useState } from "react"; import { Image, InfiniteScroll, List, Toast, Modal } from "antd-mobile"; import Empty from "@/components/Empty"; import requireAPI from "@/utils/requireAPI"; import clipboard from "copy-to-clipboard"; export default function AlreadyAddWechat({ zid, currentIndex }) { const [offset, setOffset] = useState(0); const [more, setMore] = useState(1); const [data, setData] = useState([]); const [modalVisible, setModalVisible] = useState(false); const getData = async () => { if (zid === undefined || !more || currentIndex != 0) return; try { const body = { tab: 2, offset, //如果是下拉刷新则更新最新数据 limit: 20, }; const _data = await requireAPI("POST", "/api/vas/get_add_wechat_list", { body, }); if (_data.ret === -1) { Toast.show({ icon: "fail", content: _data.msg, position: "top", }); return; } setData((old) => [...old, ..._data.data.list]); setOffset(_data.data.offset); setMore(_data.data.more); } catch (error) { console.error(error); } }; //保存内容到剪贴板 const copy = (_data) => { // console.log("_data", _data); clipboard(_data); Toast.show({ icon: "success", content: "已复制到剪贴板", position: "top", }); }; //单个成员组件 const RenderItem = ({ item }) => { return (
请于72小时内添加对方微信
付款时间:{new Date(item?.ct * 1000).toLocaleString()}