|
@@ -11,8 +11,7 @@ import { FC, Fragment, useRef, useState } from "react";
|
|
|
|
|
|
import ButtonOwn from "@/components/ButtonOwn";
|
|
|
import "@/styles/deposit.scss";
|
|
|
-import { Autoplay, Pagination } from "swiper/modules";
|
|
|
-import { Swiper, SwiperSlide } from "swiper/react";
|
|
|
+import Image from "next/image";
|
|
|
interface Props {
|
|
|
deposits: DepositsTypes[];
|
|
|
}
|
|
@@ -20,10 +19,10 @@ const DepositData: FC<Props> = (props) => {
|
|
|
const { deposits } = props;
|
|
|
const t = useTranslations();
|
|
|
const userInfo = useUserInfoStore((state) => state.userInfo);
|
|
|
+
|
|
|
+ const count = 2;
|
|
|
// 选中类型
|
|
|
const [activeType, setActiveType] = useState<DepositsTypes>(deposits[0]);
|
|
|
- // 是否自定义充值
|
|
|
- const [isCustomInput, setIsCustomInput] = useState(false);
|
|
|
|
|
|
const formInstanceRef = useRef<FormInstance>(null);
|
|
|
let [amount, setAmount] = useState<number | undefined>(undefined);
|
|
@@ -71,61 +70,21 @@ const DepositData: FC<Props> = (props) => {
|
|
|
);
|
|
|
return Promise.resolve();
|
|
|
};
|
|
|
- const banners = [
|
|
|
- {
|
|
|
- id: 61,
|
|
|
- sort: 0,
|
|
|
- show_platform: 1,
|
|
|
- action_type: 1,
|
|
|
- action_params: "",
|
|
|
- content: "http://192.168.0.237:9000/bcwin/86fa3351-2aef-4ede-ba70-cae365f03812.jpg",
|
|
|
- },
|
|
|
- {
|
|
|
- id: 62,
|
|
|
- sort: 0,
|
|
|
- show_platform: 1,
|
|
|
- action_type: 1,
|
|
|
- action_params: "",
|
|
|
- content: "http://192.168.0.237:9000/bcwin/9809de49-966e-4dea-81c9-baa71347dc6c.jpg",
|
|
|
- },
|
|
|
- ];
|
|
|
|
|
|
return (
|
|
|
<>
|
|
|
- <div style={{ height: "1.86rem" }} className={"home-banner"}>
|
|
|
- <Swiper
|
|
|
- autoplay={{ delay: 2500 }}
|
|
|
- pagination={{ clickable: true }}
|
|
|
- spaceBetween={10}
|
|
|
- scrollbar={{ draggable: true }}
|
|
|
- slidesPerView={1}
|
|
|
- loop
|
|
|
- modules={[Pagination, Autoplay]}
|
|
|
- >
|
|
|
- {banners.map((banner, index) => (
|
|
|
- <SwiperSlide key={index}>
|
|
|
- <Box
|
|
|
- none
|
|
|
- action={banner.action_type as 1}
|
|
|
- actionData={banner.action_params}
|
|
|
- >
|
|
|
- <img
|
|
|
- src={banner.content}
|
|
|
- style={{ height: "1.86rem", width: "100%" }}
|
|
|
- alt={"banner"}
|
|
|
- />
|
|
|
- </Box>
|
|
|
- </SwiperSlide>
|
|
|
- ))}
|
|
|
- </Swiper>
|
|
|
- </div>
|
|
|
+ <Image src={"/doings/recharge.jpg"} alt={"deposit"} width={1950} height={10} />
|
|
|
<div className="deposit-box">
|
|
|
- <p>title</p>
|
|
|
- <p className={"text-[0.12rem] text-[#e8e8e8]"}>
|
|
|
- Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ab accusamus amet
|
|
|
- animi beatae blanditiis cumque dicta dolor eius est ex, facilis illo libero
|
|
|
- magnam placeat quibusdam similique ullam, vel veniam?
|
|
|
- </p>
|
|
|
+ <div className={"flex items-center"}>
|
|
|
+ <div className="img-box"></div>
|
|
|
+ <div className={"flex-1 text-right"}>
|
|
|
+ <i
|
|
|
+ className={"iconfont icon-star_full text-[0.15rem] text-primary-color"}
|
|
|
+ ></i>
|
|
|
+ {`{${count}} recargas restantes`}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
<div className={"flex flex-wrap"}>
|
|
|
{deposits.map((item, index) => {
|
|
|
return (
|
|
@@ -155,6 +114,11 @@ const DepositData: FC<Props> = (props) => {
|
|
|
initialValues={userInfo}
|
|
|
onFinish={onFinish}
|
|
|
onValuesChange={onValuesChange}
|
|
|
+ footer={
|
|
|
+ <>
|
|
|
+ <ButtonOwn active>{t("DepositPage.DepositarAgora")}</ButtonOwn>
|
|
|
+ </>
|
|
|
+ }
|
|
|
>
|
|
|
{isStrictMode ? (
|
|
|
<>
|
|
@@ -184,21 +148,17 @@ const DepositData: FC<Props> = (props) => {
|
|
|
</Form.Item>
|
|
|
</>
|
|
|
) : null}
|
|
|
- {isCustomInput && (
|
|
|
- <Form.Item
|
|
|
- name="amount"
|
|
|
- label=""
|
|
|
- rules={[
|
|
|
- { required: true, type: "number", validator: amountValidator },
|
|
|
- ]}
|
|
|
- >
|
|
|
- <Input
|
|
|
- placeholder={`${t("DepositPage.Montante")}(BRL): Mín. ${activeType.min_amount}`}
|
|
|
- type={"number"}
|
|
|
- maxLength={activeType.max_amount}
|
|
|
- />
|
|
|
- </Form.Item>
|
|
|
- )}
|
|
|
+ <Form.Item
|
|
|
+ name="amount"
|
|
|
+ label=""
|
|
|
+ rules={[{ required: true, type: "number", validator: amountValidator }]}
|
|
|
+ >
|
|
|
+ <Input
|
|
|
+ placeholder={`${t("DepositPage.Montante")}(BRL): Mín. ${activeType.min_amount}`}
|
|
|
+ type={"number"}
|
|
|
+ maxLength={activeType.max_amount}
|
|
|
+ />
|
|
|
+ </Form.Item>
|
|
|
|
|
|
<div className={"flex flex-col"}>
|
|
|
<div className={"flex-1"}>
|
|
@@ -225,13 +185,10 @@ const DepositData: FC<Props> = (props) => {
|
|
|
</div>
|
|
|
</Form>
|
|
|
</Box>
|
|
|
- <ButtonOwn
|
|
|
- style={{ marginTop: "0.1389rem" }}
|
|
|
- active
|
|
|
- callbackFun={() => setIsCustomInput(true)}
|
|
|
- >
|
|
|
- {t("DepositPage.customButtonText")}
|
|
|
- </ButtonOwn>
|
|
|
+ <p className={"text-[#e59c5f]"}>Descrição daatividade:</p>
|
|
|
+ <p className={"text-[0.12rem] text-[#e59c5f]"}>
|
|
|
+ Recarregue nas primeiras {`{${count}}`} vezes todos os dias e ganhe desco
|
|
|
+ </p>
|
|
|
</div>
|
|
|
</>
|
|
|
);
|