|
@@ -1,24 +1,24 @@
|
|
"use client";
|
|
"use client";
|
|
import { DepositsTypes, RewardsType } from "@/api/depositsApi";
|
|
import { DepositsTypes, RewardsType } from "@/api/depositsApi";
|
|
import { getUserMoneyApi, getUserRechargeApi } from "@/api/user";
|
|
import { getUserMoneyApi, getUserRechargeApi } from "@/api/user";
|
|
|
|
+import actions from "@/app/[locale]/(TabBar)/deposit/actions";
|
|
import Box from "@/components/Box";
|
|
import Box from "@/components/Box";
|
|
import ButtonOwn from "@/components/ButtonOwn";
|
|
import ButtonOwn from "@/components/ButtonOwn";
|
|
-import TipsModal, { ModalProps } from "@/components/TipsModal";
|
|
|
|
-import { useUserInfoStore } from "@/stores/useUserInfoStore";
|
|
|
|
-import { neReg } from "@/utils";
|
|
|
|
-import { Button, Form, Input, Toast } from "antd-mobile";
|
|
|
|
-import { FormInstance } from "antd-mobile/es/components/form";
|
|
|
|
-import { useTranslations } from "next-intl";
|
|
|
|
-import { FC, useLayoutEffect, useRef, useState } from "react";
|
|
|
|
-
|
|
|
|
-import actions from "@/app/[locale]/(TabBar)/deposit/actions";
|
|
|
|
import Empty from "@/components/Empty";
|
|
import Empty from "@/components/Empty";
|
|
|
|
+import TipsModal, { ModalProps } from "@/components/TipsModal";
|
|
import { useEventPoint } from "@/hooks/useEventPoint";
|
|
import { useEventPoint } from "@/hooks/useEventPoint";
|
|
import { useRouter } from "@/i18n/routing";
|
|
import { useRouter } from "@/i18n/routing";
|
|
import { useSystemStore } from "@/stores/useSystemStore";
|
|
import { useSystemStore } from "@/stores/useSystemStore";
|
|
|
|
+import { useUserInfoStore } from "@/stores/useUserInfoStore";
|
|
|
|
+import { useWalletStore } from "@/stores/useWalletStore";
|
|
import "@/styles/deposit.scss";
|
|
import "@/styles/deposit.scss";
|
|
|
|
+import { neReg } from "@/utils";
|
|
import { server } from "@/utils/client";
|
|
import { server } from "@/utils/client";
|
|
|
|
+import { Button, Dialog, Form, Input, Toast } from "antd-mobile";
|
|
|
|
+import { FormInstance } from "antd-mobile/es/components/form";
|
|
import clsx from "clsx";
|
|
import clsx from "clsx";
|
|
|
|
+import { useTranslations } from "next-intl";
|
|
|
|
+import { FC, useLayoutEffect, useRef, useState } from "react";
|
|
import { Swiper, SwiperSlide } from "swiper/react";
|
|
import { Swiper, SwiperSlide } from "swiper/react";
|
|
interface Props {}
|
|
interface Props {}
|
|
|
|
|
|
@@ -82,6 +82,7 @@ const DepositData: FC<Props> = (props) => {
|
|
const t = useTranslations();
|
|
const t = useTranslations();
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
const userInfo = useUserInfoStore((state) => state.userInfo);
|
|
const userInfo = useUserInfoStore((state) => state.userInfo);
|
|
|
|
+ const wallet = useWalletStore((state) => state.wallet);
|
|
const { eventInitiate } = useEventPoint();
|
|
const { eventInitiate } = useEventPoint();
|
|
|
|
|
|
const isStrictMode = useSystemStore((state) => state.identity_verify.deposit === 1);
|
|
const isStrictMode = useSystemStore((state) => state.identity_verify.deposit === 1);
|
|
@@ -102,6 +103,20 @@ const DepositData: FC<Props> = (props) => {
|
|
const tipModelRef = useRef<ModalProps>(null); // 充值清空打码量弹窗
|
|
const tipModelRef = useRef<ModalProps>(null); // 充值清空打码量弹窗
|
|
const [formData, setFormData] = useState<any>({}); // 存放表单数据
|
|
const [formData, setFormData] = useState<any>({}); // 存放表单数据
|
|
const onFinish = async (values: any) => {
|
|
const onFinish = async (values: any) => {
|
|
|
|
+ if (wallet?.is_open_no_bonus) {
|
|
|
|
+ const confirmRes = await Dialog.confirm({
|
|
|
|
+ content: <div className="text-[#fff]">{t(`ProfilePage.depositeWarn`)}</div>,
|
|
|
|
+ confirmText: t("ProfilePage.sure"),
|
|
|
|
+ cancelText: t("ProfilePage.cancel"),
|
|
|
|
+ bodyStyle: {
|
|
|
|
+ backgroundColor: "#373737",
|
|
|
|
+ color: "#fff",
|
|
|
|
+ },
|
|
|
|
+ bodyClassName: "customConfirm",
|
|
|
|
+ });
|
|
|
|
+ if (!confirmRes) return;
|
|
|
|
+ }
|
|
|
|
+
|
|
const params = { ...values, channel_id: activeType.id, amount: +values.amount };
|
|
const params = { ...values, channel_id: activeType.id, amount: +values.amount };
|
|
const res = await getUserMoneyApi();
|
|
const res = await getUserMoneyApi();
|
|
if (res.data?.tips_reset_rollover) {
|
|
if (res.data?.tips_reset_rollover) {
|