Compare commits
6 Commits
master
...
feature/pc
Author | SHA1 | Date |
---|---|---|
john | 20c5eaf47d | |
john | 6a819b6412 | |
john | daf5634a10 | |
john | 5e4d6e6521 | |
john | a58b225544 | |
john | c1a8cfd6d6 |
|
@ -1,6 +1,12 @@
|
|||
VITE_BASE_URL=/
|
||||
VITE_BASE_API_URL=/dev
|
||||
###
|
||||
# @LastEditors: John
|
||||
# @Date: 2024-06-26 15:04:10
|
||||
# @LastEditTime: 2024-07-01 15:13:11
|
||||
# @Author: John
|
||||
###
|
||||
VITE_BASE_URL=https://www.nodeai.world
|
||||
VITE_BASE_API_URL=https://www.nodeai.world/api
|
||||
VITE_PARTICIPATE_CHAIN_ID=56
|
||||
VITE_PURCHASED_CONTRACT_ADDRESS=
|
||||
VITE_NETWORK_USDT_ADDRESS=
|
||||
VITE_PURCHASED_CONTRACT_ADDRESS=0x17c38AaF564716A3D9dD4EBE7Fb5db2D43c6A834
|
||||
VITE_NETWORK_USDT_ADDRESS=0x55d398326f99059fF775485246999027B3197955
|
||||
VITE_CHECK_TRANSACTION_DETAILS_URL=https://bscscan.com/
|
Binary file not shown.
|
@ -0,0 +1,100 @@
|
|||
-----BEGIN CERTIFICATE-----
|
||||
MIIFuTCCBKGgAwIBAgIRAM0x4XaWUXTydUUUUxaKx6swDQYJKoZIhvcNAQELBQAw
|
||||
gY8xCzAJBgNVBAYTAkdCMRswGQYDVQQIExJHcmVhdGVyIE1hbmNoZXN0ZXIxEDAO
|
||||
BgNVBAcTB1NhbGZvcmQxGDAWBgNVBAoTD1NlY3RpZ28gTGltaXRlZDE3MDUGA1UE
|
||||
AxMuU2VjdGlnbyBSU0EgRG9tYWluIFZhbGlkYXRpb24gU2VjdXJlIFNlcnZlciBD
|
||||
QTAeFw0yNDA2MjgwMDAwMDBaFw0yNDA5MjYyMzU5NTlaMBcxFTATBgNVBAMTDG5v
|
||||
ZGVhaS53b3JsZDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ699oW5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Xkx8
|
||||
OR47xvO5EClDdVJb9a5hET6iJn9UXR9UrSiuzZAE0HEOK1t3KEJOFh0/39sDqwTn
|
||||
pJ49DjiVA7TvvJgUljjnumf40I1F6apuZbdnW03VHr3WsBkPE/wv+ZEBxwRTZaLB
|
||||
1BakIMguI8tnSSReAf4O+oOwIAgz0OwT18d/xc4O8hhkitdfUnON03KZLEK26J1r
|
||||
KQ+8PPhMBKVjsPTM9li8vAWSq8Cc3GxoNnvOeV/u1NXnxfD+X6vBwA==
|
||||
-----END CERTIFICATE-----
|
|
@ -0,0 +1,59 @@
|
|||
server {
|
||||
server_name nodeai.world www.nodeai.world;
|
||||
client_max_body_size 50m;
|
||||
listen *:80;
|
||||
listen *:443 ssl;
|
||||
#ssl on;
|
||||
|
||||
# 静态文件夹和域名对应
|
||||
root /data/nginx/nodeai.world;
|
||||
index index.html index.htm;
|
||||
|
||||
# 日志文件名和域名对应
|
||||
access_log /data/nginx/logs/nodeai.world.access.log;
|
||||
error_log /data/nginx/logs/nodeai.world.error.log;
|
||||
|
||||
ssl_certificate cert/nodeai.worid.pem;
|
||||
ssl_certificate_key cert/nodeai.worid.key;
|
||||
|
||||
location /upload {
|
||||
root /data/nginx/;
|
||||
index index.html;
|
||||
}
|
||||
|
||||
location /api {
|
||||
proxy_pass http://127.17.0.1:8102;
|
||||
proxy_headers_hash_max_size 51200;
|
||||
proxy_headers_hash_bucket_size 6400;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
|
||||
proxy_buffering off;
|
||||
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
}
|
||||
|
||||
location /api/api {
|
||||
proxy_pass http://127.17.0.1:8102/api;
|
||||
proxy_headers_hash_max_size 51200;
|
||||
proxy_headers_hash_bucket_size 6400;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
|
||||
proxy_buffering off;
|
||||
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
}
|
||||
|
||||
location /zip {
|
||||
alias /data/nginx/zip/;#此处定义映射文件位置
|
||||
allow all;
|
||||
autoindex on;
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* @LastEditors: John
|
||||
* @Date: 2024-06-17 18:25:10
|
||||
* @LastEditTime: 2024-06-19 16:14:06
|
||||
* @LastEditTime: 2024-06-28 17:46:23
|
||||
* @Author: John
|
||||
*/
|
||||
export default {
|
||||
|
@ -11,7 +11,7 @@ export default {
|
|||
rootValue: 37.5,
|
||||
propList: ["*"],
|
||||
exclude: (e) => {
|
||||
if (/.*-m\.css$/.test(e) || /.module\.css$/.test(e)) {
|
||||
if (/.*-m\.css$/.test(e) || /.*-m.module\.css$/.test(e)) {
|
||||
// console.log(e);
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="46" height="46" viewBox="0 0 46 46"><g><g><g><rect x="0" y="0" width="46" height="46" rx="23" fill="#2DFCFC" fill-opacity="1"/></g><g><ellipse cx="15.29602861404419" cy="18.62433671951294" rx="5.9895710945129395" ry="5.9895710945129395" fill="#000000" fill-opacity="1"/></g><g><path d="M28.716520703125,12.63720703125L14.313720703125,33.363107031249996L22.288390703125,33.363107031249996L36.693520703125,12.63720703125L28.716520703125,12.63720703125Z" fill="#000000" fill-opacity="1"/></g></g></g></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="46" height="46" viewBox="0 0 46 46"><g><g><g><rect x="0" y="0" width="46" height="46" rx="23" fill="#EA6D28" fill-opacity="1"/></g><g><ellipse cx="15.29602861404419" cy="18.62433671951294" rx="5.9895710945129395" ry="5.9895710945129395" fill="#000000" fill-opacity="1"/></g><g><path d="M28.716520703125,12.63720703125L14.313720703125,33.363107031249996L22.288390703125,33.363107031249996L36.693520703125,12.63720703125L28.716520703125,12.63720703125Z" fill="#000000" fill-opacity="1"/></g></g></g></svg>
|
Before Width: | Height: | Size: 619 B After Width: | Height: | Size: 619 B |
|
@ -3,7 +3,7 @@ html,
|
|||
#root {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: url("./assets/home_bg.png");
|
||||
background: #fafafb;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
|
|
32
src/App.tsx
32
src/App.tsx
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* @LastEditors: John
|
||||
* @Date: 2024-06-17 17:20:03
|
||||
* @LastEditTime: 2024-06-26 16:00:00
|
||||
* @LastEditTime: 2024-07-01 16:41:42
|
||||
* @Author: John
|
||||
*/
|
||||
import { Route, Routes } from "react-router-dom";
|
||||
|
@ -16,7 +16,7 @@ import InvitationList from "./pages/InvitationList";
|
|||
import { useEffect } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import useUserStore from "./store/User";
|
||||
import { getUrlQueryParam } from "./utils";
|
||||
import { getUrlParameterByName, isMobile } from "./utils";
|
||||
import { UrlQueryParamsKey } from "./constants";
|
||||
import { signAndLogin } from "./utils/wallet";
|
||||
import { useAccount } from "wagmi";
|
||||
|
@ -26,7 +26,9 @@ function App() {
|
|||
const { address } = useAccount();
|
||||
useEffect(() => {
|
||||
i18n.changeLanguage(currantLang);
|
||||
UpdateInviteCode(getUrlQueryParam(UrlQueryParamsKey.INVITE_CODE) || "");
|
||||
UpdateInviteCode(
|
||||
getUrlParameterByName(UrlQueryParamsKey.INVITE_CODE) || ""
|
||||
);
|
||||
return () => {};
|
||||
}, []);
|
||||
|
||||
|
@ -45,12 +47,30 @@ function App() {
|
|||
return (
|
||||
<>
|
||||
<RouterLogProvider>
|
||||
<Header />
|
||||
{isMobile ? (
|
||||
<>
|
||||
<Header.Mobile />
|
||||
<Routes>
|
||||
<Route path="/" element={<Home />} />
|
||||
<>
|
||||
<Route path="/" element={<Home.Mobile />} />
|
||||
<Route path="/mint" element={<Mint />} />
|
||||
<Route path="/invitationlist" element={<InvitationList />}></Route>
|
||||
<Route
|
||||
path="/invitationlist"
|
||||
element={<InvitationList />}
|
||||
></Route>
|
||||
</>
|
||||
</Routes>
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<Header.Desktop />
|
||||
<Routes>
|
||||
<>
|
||||
<Route path="/" element={<Home.Desktop />} />
|
||||
</>
|
||||
</Routes>
|
||||
</>
|
||||
)}
|
||||
</RouterLogProvider>
|
||||
</>
|
||||
);
|
||||
|
|
|
@ -1 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="46" height="46" viewBox="0 0 46 46"><g><g><g><rect x="0" y="0" width="46" height="46" rx="23" fill="#2DFCFC" fill-opacity="1"/></g><g><ellipse cx="15.29602861404419" cy="18.62433671951294" rx="5.9895710945129395" ry="5.9895710945129395" fill="#000000" fill-opacity="1"/></g><g><path d="M28.716520703125,12.63720703125L14.313720703125,33.363107031249996L22.288390703125,33.363107031249996L36.693520703125,12.63720703125L28.716520703125,12.63720703125Z" fill="#000000" fill-opacity="1"/></g></g></g></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="46" height="46" viewBox="0 0 46 46"><g><g><g><rect x="0" y="0" width="46" height="46" rx="23" fill="#EA6D28" fill-opacity="1"/></g><g><ellipse cx="15.29602861404419" cy="18.62433671951294" rx="5.9895710945129395" ry="5.9895710945129395" fill="#000000" fill-opacity="1"/></g><g><path d="M28.716520703125,12.63720703125L14.313720703125,33.363107031249996L22.288390703125,33.363107031249996L36.693520703125,12.63720703125L28.716520703125,12.63720703125Z" fill="#000000" fill-opacity="1"/></g></g></g></svg>
|
Before Width: | Height: | Size: 619 B After Width: | Height: | Size: 619 B |
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 325 KiB After Width: | Height: | Size: 322 KiB |
|
@ -1,17 +1,17 @@
|
|||
/*
|
||||
* @LastEditors: John
|
||||
* @Date: 2024-06-18 15:19:21
|
||||
* @LastEditTime: 2024-06-18 18:49:40
|
||||
* @LastEditTime: 2024-07-01 14:10:45
|
||||
* @Author: John
|
||||
*/
|
||||
.header {
|
||||
background-color: #101010;
|
||||
background-color: #fafafb;
|
||||
padding: 0 15px;
|
||||
.header_top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
border-bottom: 0.25px solid #333333;
|
||||
border-bottom: 1px solid #d8d8d8;
|
||||
padding: 10px 0;
|
||||
|
||||
.header_logo {
|
||||
|
@ -30,7 +30,7 @@
|
|||
|
||||
font-variation-settings: "opsz" auto;
|
||||
font-feature-settings: "kern" on;
|
||||
color: #ffffff;
|
||||
color: #000000;
|
||||
|
||||
z-index: 1;
|
||||
}
|
||||
|
@ -57,7 +57,7 @@
|
|||
|
||||
font-variation-settings: "opsz" auto;
|
||||
font-feature-settings: "kern" on;
|
||||
color: #ffffff;
|
||||
color: #000000;
|
||||
|
||||
z-index: 1;
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* @LastEditors: John
|
||||
* @Date: 2024-06-18 15:16:31
|
||||
* @LastEditTime: 2024-06-27 15:29:00
|
||||
* @LastEditTime: 2024-07-01 15:19:02
|
||||
* @Author: John
|
||||
*/
|
||||
import Picker, {
|
||||
|
@ -11,7 +11,7 @@ import Picker, {
|
|||
import { useContext, useEffect, useMemo, useState } from "react";
|
||||
import IconFont from "./iconfont";
|
||||
import logo from "@/assets/logo.svg";
|
||||
import classes from "./Header.module.css";
|
||||
import classes from "./Header-m.module.css";
|
||||
import { useLocation, useNavigate, useNavigation } from "react-router-dom";
|
||||
import { RouterLogContext } from "@/context/RouterContext";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
@ -27,7 +27,7 @@ const langColums: Action[] = [
|
|||
{ text: "日本語", key: Lang.jp },
|
||||
{ text: "DEUTSCH", key: Lang.de },
|
||||
];
|
||||
export default function () {
|
||||
function Mobile() {
|
||||
const { UpdateLang } = useUserStore();
|
||||
|
||||
const route = useContext(RouterLogContext);
|
||||
|
@ -70,7 +70,7 @@ export default function () {
|
|||
<IconFont
|
||||
className={classes.header_nav_icon}
|
||||
name="icon_arrow_left"
|
||||
color={"#fff"}
|
||||
color={"#000000"}
|
||||
/>
|
||||
<span>{navTitle}</span>
|
||||
</div>
|
||||
|
@ -79,3 +79,12 @@ export default function () {
|
|||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function Desktop() {
|
||||
return <></>;
|
||||
}
|
||||
|
||||
export default {
|
||||
Mobile,
|
||||
Desktop,
|
||||
};
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
/*
|
||||
* @LastEditors: John
|
||||
* @Date: 2024-06-19 10:49:42
|
||||
* @LastEditTime: 2024-06-19 10:52:32
|
||||
* @LastEditTime: 2024-06-28 14:05:45
|
||||
* @Author: John
|
||||
*/
|
||||
import classes from "./RecordsItem.module.css";
|
||||
import classes from "./RecordsItem-m.module.css";
|
||||
export default function RecordsItem({
|
||||
itemList,
|
||||
}: {
|
||||
|
|
|
@ -61,7 +61,7 @@ createWeb3Modal({
|
|||
wagmiConfig: config,
|
||||
projectId,
|
||||
themeVariables: {
|
||||
"--w3m-accent": "#2dfcfc",
|
||||
"--w3m-accent": "#EA6D28",
|
||||
},
|
||||
featuredWalletIds: [
|
||||
...(window.ethereum
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
"总收益= 已领取 + 待领取": "Total Revenue = Claimed + Pending",
|
||||
"邀请": "Invite",
|
||||
"邀请链接": "Invite Link",
|
||||
"Invite your friends to become YOTTA nodes and you will get a 20% rebate.": "Invite your friends to become YOTTA nodes and you will get a 20% rebate.",
|
||||
"Invite your friends to become YOTTA nodes and you will get a 10% rebate.": "Invite your friends to become YOTTA nodes and you will get a 10% rebate.",
|
||||
"数据披露": "Data Disclosure",
|
||||
"资金池": "Fund Pool",
|
||||
"社长席位": "Leader Seats",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* @LastEditors: John
|
||||
* @Date: 2024-06-17 17:20:03
|
||||
* @LastEditTime: 2024-06-20 11:43:14
|
||||
* @LastEditTime: 2024-07-01 16:46:07
|
||||
* @Author: John
|
||||
*/
|
||||
import "@/i18n/init.ts";
|
||||
|
@ -15,9 +15,9 @@ import EventBusProvider from "./context/EventBusContext.tsx";
|
|||
import { WalletProvider } from "./components/WalletProvider.tsx";
|
||||
import flexible from "./utils/flexible.ts";
|
||||
import VConsole from "vconsole";
|
||||
import { getUrlQueryParam } from "./utils/index.ts";
|
||||
import { getUrlParameterByName } from "./utils/index.ts";
|
||||
|
||||
if (getUrlQueryParam("vconsole") === "1") {
|
||||
if (getUrlParameterByName("vconsole") === "1") {
|
||||
new VConsole();
|
||||
}
|
||||
flexible(window, document);
|
||||
|
|
|
@ -0,0 +1,104 @@
|
|||
/*
|
||||
* @LastEditors: John
|
||||
* @Date: 2024-06-28 14:09:55
|
||||
* @LastEditTime: 2024-06-28 14:14:29
|
||||
* @Author: John
|
||||
*/
|
||||
import useUserStore from "@/store/User";
|
||||
import { useWeb3Modal } from "@web3modal/wagmi/react";
|
||||
import { useEffect, useMemo, useRef, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { useAccount } from "wagmi";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { Dialog } from "antd-mobile";
|
||||
import {
|
||||
api_get_homepage_user_data,
|
||||
api_query_user_invitation_code,
|
||||
} from "@/server/api";
|
||||
import { UserHomeData } from "@/server/module";
|
||||
import { UrlQueryParamsKey } from "@/constants";
|
||||
import usePollingCheckBuyStatus from "@/hook/usePollingCheckBuyStatus";
|
||||
import { ToastHandler } from "antd-mobile/es/components/toast";
|
||||
import { PullStatus } from "antd-mobile/es/components/pull-to-refresh";
|
||||
export default function () {
|
||||
const { Token, UpdateToken } = useUserStore();
|
||||
const { open } = useWeb3Modal();
|
||||
|
||||
const { t } = useTranslation();
|
||||
const { address } = useAccount();
|
||||
|
||||
const [tabIndex, setTabIndex] = useState(0);
|
||||
const navigate = useNavigate();
|
||||
const [userData, setUserData] = useState<UserHomeData>();
|
||||
const [inviteCode, setInviteCode] = useState("");
|
||||
|
||||
const userInviteLink = useMemo(
|
||||
() =>
|
||||
`${location.origin}/#/?${UrlQueryParamsKey.INVITE_CODE}=${inviteCode}`,
|
||||
[inviteCode]
|
||||
);
|
||||
const receiveLoadingToast = useRef<ToastHandler>();
|
||||
const {
|
||||
transcationStatus,
|
||||
startPollingCheckBuyStatus,
|
||||
stopPollingCheckBuyStatus,
|
||||
} = usePollingCheckBuyStatus("NORMAL");
|
||||
|
||||
const statusRecord: Record<PullStatus, string> = {
|
||||
pulling: "Pull down to refresh",
|
||||
canRelease: "Release to refresh immediately",
|
||||
refreshing: "Loading...",
|
||||
complete: "Refresh complete",
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (Token) {
|
||||
getHomeData();
|
||||
getInviteCode();
|
||||
}
|
||||
return () => {};
|
||||
}, [Token]);
|
||||
|
||||
useEffect(() => {
|
||||
if (transcationStatus == "success") {
|
||||
receiveLoadingToast.current?.close();
|
||||
stopPollingCheckBuyStatus();
|
||||
Dialog.alert({
|
||||
content: `${t("领取成功,前往钱包查看")}`,
|
||||
confirmText: "OK",
|
||||
});
|
||||
}
|
||||
|
||||
return () => {};
|
||||
}, [transcationStatus]);
|
||||
|
||||
async function getHomeData() {
|
||||
const { data } = await api_get_homepage_user_data().send({});
|
||||
setUserData(data?.data);
|
||||
}
|
||||
|
||||
async function getInviteCode() {
|
||||
const { data } = await api_query_user_invitation_code().send({});
|
||||
setInviteCode(data?.data.invitationCode || "");
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
console.log("user token:", Token);
|
||||
|
||||
return () => {};
|
||||
}, [Token]);
|
||||
return {
|
||||
getHomeData,
|
||||
statusRecord,
|
||||
Token,
|
||||
address,
|
||||
setUserData,
|
||||
userData,
|
||||
tabIndex,
|
||||
t,
|
||||
setTabIndex,
|
||||
navigate,
|
||||
userInviteLink,
|
||||
open,
|
||||
};
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
import usePagination from "@/hook/usePagination";
|
||||
import { api_recommended_list } from "@/server/api";
|
||||
import { RecommendedListItem } from "@/server/module";
|
||||
import { Empty, InfiniteScroll } from "antd-mobile";
|
||||
import DataTable, { TableColumn } from "react-data-table-component";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
export default function () {
|
||||
const { t } = useTranslation();
|
||||
const columns: TableColumn<RecommendedListItem>[] = [
|
||||
{
|
||||
name: t("地址"),
|
||||
selector: (row) => row.walletAddress,
|
||||
grow: 9,
|
||||
},
|
||||
{
|
||||
name: "Node",
|
||||
selector: (row) => row.nodeNumber,
|
||||
grow: 1,
|
||||
// @ts-ignore
|
||||
right: "true",
|
||||
},
|
||||
];
|
||||
|
||||
const { list, hasMore, loadMore } = usePagination<RecommendedListItem>({
|
||||
service({ pageNum, pageSize }) {
|
||||
return new Promise(async (reslove) => {
|
||||
const { data } = await api_recommended_list().send({
|
||||
queryParams: { pageNum, pageSize },
|
||||
});
|
||||
reslove(data?.data.records || []);
|
||||
});
|
||||
},
|
||||
});
|
||||
return {
|
||||
columns,
|
||||
list,
|
||||
loadMore,
|
||||
hasMore,
|
||||
};
|
||||
}
|
|
@ -0,0 +1,118 @@
|
|||
import { cn, filterAddressBeforeZero, filterAmountBeforeZero } from "@/utils";
|
||||
import classes from "./Mint-m.module.css";
|
||||
import nft_bg from "@/assets/nft_bg.svg";
|
||||
import Button from "antd-mobile/es/components/button";
|
||||
import Space from "antd-mobile/es/components/space";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { useEffect, useMemo, useRef, useState } from "react";
|
||||
import {
|
||||
api_get_homepage_user_data,
|
||||
api_get_nft_configuration_data,
|
||||
api_node_order,
|
||||
api_users_cancel_orders,
|
||||
} from "@/server/api";
|
||||
import {
|
||||
NftConfigurationData,
|
||||
NftOrder,
|
||||
NodeOrder,
|
||||
UserHomeData,
|
||||
} from "@/server/module";
|
||||
import {
|
||||
authorizedU,
|
||||
getApproveUsdt,
|
||||
getBalance,
|
||||
payByContract,
|
||||
} from "@/contract/utils";
|
||||
import { Dialog, Modal, Stepper, Toast } from "antd-mobile";
|
||||
import useUserStore from "@/store/User";
|
||||
import usePollingCheckBuyStatus from "@/hook/usePollingCheckBuyStatus";
|
||||
import { ToastHandler } from "antd-mobile/es/components/toast";
|
||||
import { BaseError } from "wagmi";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { toWei } from "web3-utils";
|
||||
|
||||
export default function () {
|
||||
const { t } = useTranslation();
|
||||
const { Token } = useUserStore();
|
||||
const [nodeConfig, setNodeConfig] = useState<UserHomeData>();
|
||||
const [approveUsdt, setApproveUsdt] = useState<bigint>(0n);
|
||||
const [balance, setBalance] = useState<bigint>(0n);
|
||||
const orderInfo = useRef<NodeOrder>();
|
||||
const navigate = useNavigate();
|
||||
const [num, setNum] = useState(1);
|
||||
|
||||
const buyLoadingToast = useRef<ToastHandler>();
|
||||
const approveLoadingToast = useRef<ToastHandler>();
|
||||
const {
|
||||
transcationStatus,
|
||||
startPollingCheckBuyStatus,
|
||||
stopPollingCheckBuyStatus,
|
||||
} = usePollingCheckBuyStatus("NORMAL");
|
||||
|
||||
const costNum = useMemo(
|
||||
() =>
|
||||
BigInt(
|
||||
toWei(`${parseFloat(`${nodeConfig?.nodePrice || "0"}`) * num}`, "ether")
|
||||
),
|
||||
[nodeConfig?.nodePrice, num]
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
updateNodeConfig();
|
||||
|
||||
return () => {};
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
(async () => {
|
||||
Toast.show({ icon: "loading", content: t("正在获取已授权金额") });
|
||||
setBalance(await getBalance());
|
||||
setApproveUsdt(await getApproveUsdt());
|
||||
Toast.clear();
|
||||
})();
|
||||
|
||||
return () => {};
|
||||
}, [Token]);
|
||||
|
||||
async function updateNodeConfig() {
|
||||
const { data } = await api_get_homepage_user_data().send({});
|
||||
setNodeConfig(data?.data);
|
||||
}
|
||||
useEffect(() => {
|
||||
if (transcationStatus == "success") {
|
||||
buyLoadingToast.current?.close();
|
||||
stopPollingCheckBuyStatus();
|
||||
Dialog.alert({
|
||||
content: `${t(
|
||||
"Buy successful. Please return to the homepage to view."
|
||||
)}`,
|
||||
confirmText: "OK",
|
||||
onConfirm() {
|
||||
navigate("/");
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
return () => {};
|
||||
}, [transcationStatus]);
|
||||
|
||||
useEffect(() => {
|
||||
return () => {};
|
||||
}, []);
|
||||
|
||||
return {
|
||||
nodeConfig,
|
||||
num,
|
||||
setNum,
|
||||
approveUsdt,
|
||||
t,
|
||||
balance,
|
||||
approveLoadingToast,
|
||||
costNum,
|
||||
setApproveUsdt,
|
||||
buyLoadingToast,
|
||||
orderInfo,
|
||||
updateNodeConfig,
|
||||
startPollingCheckBuyStatus,
|
||||
};
|
||||
}
|
|
@ -14,10 +14,8 @@
|
|||
border-radius: 16px;
|
||||
opacity: 1;
|
||||
|
||||
background: #171719;
|
||||
|
||||
box-shadow: 0px 4px 10px 0px rgba(45, 252, 252, 0.3),
|
||||
inset 0px 0px 8px 0px #2dfcfc;
|
||||
background: #ffffff;
|
||||
box-shadow: 0px 2px 8px 0px rgba(99, 99, 99, 0.2);
|
||||
|
||||
padding: 14px 15px;
|
||||
box-sizing: border-box;
|
||||
|
@ -57,7 +55,7 @@
|
|||
|
||||
font-variation-settings: "opsz" auto;
|
||||
font-feature-settings: "kern" on;
|
||||
color: #ffffff;
|
||||
color: #000000;
|
||||
|
||||
z-index: 0;
|
||||
}
|
||||
|
@ -117,10 +115,9 @@
|
|||
border-radius: 10px;
|
||||
opacity: 1;
|
||||
|
||||
background: #2dfcfc;
|
||||
background: #ea6d28;
|
||||
|
||||
box-sizing: border-box;
|
||||
border: 1px solid;
|
||||
|
||||
padding: 0 20px;
|
||||
|
||||
|
@ -153,7 +150,7 @@
|
|||
border-radius: 16px;
|
||||
opacity: 1;
|
||||
|
||||
background: #212123;
|
||||
background: #eeeeef;
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
@ -173,7 +170,7 @@
|
|||
|
||||
font-variation-settings: "opsz" auto;
|
||||
font-feature-settings: "kern" on;
|
||||
color: #ffffff;
|
||||
color: #000000;
|
||||
|
||||
z-index: 0;
|
||||
|
||||
|
@ -193,7 +190,7 @@
|
|||
|
||||
font-variation-settings: "opsz" auto;
|
||||
font-feature-settings: "kern" on;
|
||||
color: #ffffff;
|
||||
color: #000000;
|
||||
|
||||
z-index: 1;
|
||||
}
|
||||
|
@ -210,7 +207,7 @@
|
|||
|
||||
font-variation-settings: "opsz" auto;
|
||||
font-feature-settings: "kern" on;
|
||||
color: #ffffff;
|
||||
color: #000000;
|
||||
|
||||
z-index: 1;
|
||||
}
|
||||
|
@ -245,7 +242,7 @@
|
|||
border-radius: 10px;
|
||||
opacity: 1;
|
||||
|
||||
background: #2dfcfc;
|
||||
background: #ea6d28;
|
||||
|
||||
color: #101010;
|
||||
}
|
||||
|
@ -260,7 +257,8 @@
|
|||
border-radius: 16px;
|
||||
opacity: 1;
|
||||
|
||||
background: #171719;
|
||||
background: #ffffff;
|
||||
box-shadow: 0px 2px 8px 0px rgba(99, 99, 99, 0.2);
|
||||
z-index: 1;
|
||||
.nftToken_content_nft {
|
||||
/* 自动布局 */
|
||||
|
@ -286,7 +284,7 @@
|
|||
|
||||
font-variation-settings: "opsz" auto;
|
||||
font-feature-settings: "kern" on;
|
||||
color: #ffffff;
|
||||
color: #000000;
|
||||
|
||||
z-index: 0;
|
||||
}
|
||||
|
@ -303,7 +301,7 @@
|
|||
|
||||
font-variation-settings: "opsz" auto;
|
||||
font-feature-settings: "kern" on;
|
||||
color: #2dfcfc;
|
||||
color: #ea6d28;
|
||||
|
||||
z-index: 0;
|
||||
|
||||
|
@ -335,7 +333,7 @@
|
|||
|
||||
font-variation-settings: "opsz" auto;
|
||||
font-feature-settings: "kern" on;
|
||||
color: #ffffff;
|
||||
color: #000000;
|
||||
|
||||
z-index: 2;
|
||||
}
|
||||
|
@ -536,7 +534,7 @@
|
|||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 10px 0;
|
||||
background: #2dfcfc;
|
||||
background: #ea6d28;
|
||||
z-index: 0;
|
||||
gap: 10px;
|
||||
box-sizing: border-box;
|
||||
|
@ -574,7 +572,7 @@
|
|||
|
||||
font-variation-settings: "opsz" auto;
|
||||
font-feature-settings: "kern" on;
|
||||
color: #ffffff;
|
||||
color: #000000;
|
||||
|
||||
z-index: 1;
|
||||
}
|
||||
|
@ -600,7 +598,7 @@
|
|||
|
||||
font-variation-settings: "opsz" auto;
|
||||
font-feature-settings: "kern" on;
|
||||
color: #ffffff;
|
||||
color: #000000;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -625,7 +623,7 @@
|
|||
|
||||
font-variation-settings: "opsz" auto;
|
||||
font-feature-settings: "kern" on;
|
||||
color: #ffffff;
|
||||
color: #000000;
|
||||
|
||||
z-index: 0;
|
||||
}
|
||||
|
@ -641,7 +639,7 @@
|
|||
|
||||
font-variation-settings: "opsz" auto;
|
||||
font-feature-settings: "kern" on;
|
||||
color: #2dfcfc;
|
||||
color: #ea6d28;
|
||||
|
||||
z-index: 0;
|
||||
|
||||
|
@ -657,7 +655,8 @@
|
|||
border-radius: 16px;
|
||||
opacity: 1;
|
||||
|
||||
background: #171719;
|
||||
background: #ffffff;
|
||||
box-shadow: 0px 2px 8px 0px rgba(99, 99, 99, 0.2);
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
@ -680,7 +679,7 @@
|
|||
|
||||
font-variation-settings: "opsz" auto;
|
||||
font-feature-settings: "kern" on;
|
||||
color: #ffffff;
|
||||
color: #333333;
|
||||
|
||||
z-index: 0;
|
||||
}
|
||||
|
@ -697,7 +696,7 @@
|
|||
|
||||
font-variation-settings: "opsz" auto;
|
||||
font-feature-settings: "kern" on;
|
||||
color: #eaeaea;
|
||||
color: #666666;
|
||||
|
||||
z-index: 1;
|
||||
}
|
||||
|
@ -720,7 +719,7 @@
|
|||
|
||||
font-variation-settings: "opsz" auto;
|
||||
font-feature-settings: "kern" on;
|
||||
color: #ffffff;
|
||||
color: #000000;
|
||||
|
||||
z-index: 0;
|
||||
|
|
@ -1,98 +1,36 @@
|
|||
import classes from "./Home.module.css";
|
||||
import useUserStore from "@/store/User";
|
||||
/*
|
||||
* @LastEditors: John
|
||||
* @Date: 2024-06-26 15:04:10
|
||||
* @LastEditTime: 2024-07-01 17:35:37
|
||||
* @Author: John
|
||||
*/
|
||||
import classes from "./Home-m.module.css";
|
||||
import { cn, copyText, getLevelName, shortenString } from "@/utils";
|
||||
import { useWeb3Modal } from "@web3modal/wagmi/react";
|
||||
import { useEffect, useMemo, useRef, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import logo from "@/assets/logo.svg";
|
||||
import nftBg from "@/assets/nft_bg.svg";
|
||||
import usdtBg from "@/assets/usdt_bg.svg";
|
||||
import IconFont from "@/components/iconfont";
|
||||
import { BaseError, useAccount } from "wagmi";
|
||||
import { config } from "@/components/WalletProvider";
|
||||
import { createSearchParams, useNavigate } from "react-router-dom";
|
||||
import { Button, Dialog, Empty, PullToRefresh, Toast } from "antd-mobile";
|
||||
import { PullToRefresh } from "antd-mobile";
|
||||
import { loginOut } from "@/utils/wallet";
|
||||
import {
|
||||
api_claim_income,
|
||||
api_get_homepage_user_data,
|
||||
api_query_user_invitation_code,
|
||||
} from "@/server/api";
|
||||
import { UserHomeData } from "@/server/module";
|
||||
import { UrlQueryParamsKey } from "@/constants";
|
||||
import usePollingCheckBuyStatus from "@/hook/usePollingCheckBuyStatus";
|
||||
import { ToastHandler } from "antd-mobile/es/components/toast";
|
||||
import { disconnect, getAccount } from "@wagmi/core";
|
||||
import { PullStatus } from "antd-mobile/es/components/pull-to-refresh";
|
||||
export default function () {
|
||||
const { Token, UpdateToken } = useUserStore();
|
||||
const { open } = useWeb3Modal();
|
||||
const { t } = useTranslation();
|
||||
const { address } = useAccount();
|
||||
|
||||
const [tabIndex, setTabIndex] = useState(0);
|
||||
const navigate = useNavigate();
|
||||
const [userData, setUserData] = useState<UserHomeData>();
|
||||
const [inviteCode, setInviteCode] = useState("");
|
||||
|
||||
const userInviteLink = useMemo(
|
||||
() =>
|
||||
`${location.origin}/#/?${UrlQueryParamsKey.INVITE_CODE}=${inviteCode}`,
|
||||
[inviteCode]
|
||||
);
|
||||
const receiveLoadingToast = useRef<ToastHandler>();
|
||||
import useHome from "./Feature/useHome";
|
||||
import useMint from "./Feature/useMint";
|
||||
import useInvitationList from "./Feature/useInvitationList";
|
||||
function Mobile() {
|
||||
const {
|
||||
transcationStatus,
|
||||
startPollingCheckBuyStatus,
|
||||
stopPollingCheckBuyStatus,
|
||||
} = usePollingCheckBuyStatus("NORMAL");
|
||||
|
||||
const statusRecord: Record<PullStatus, string> = {
|
||||
pulling: "Pull down to refresh",
|
||||
canRelease: "Release to refresh immediately",
|
||||
refreshing: "Loading...",
|
||||
complete: "Refresh complete",
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (Token) {
|
||||
getHomeData();
|
||||
getInviteCode();
|
||||
}
|
||||
return () => {};
|
||||
}, [Token]);
|
||||
|
||||
useEffect(() => {
|
||||
if (transcationStatus == "success") {
|
||||
receiveLoadingToast.current?.close();
|
||||
stopPollingCheckBuyStatus();
|
||||
Dialog.alert({
|
||||
content: `${t("领取成功,前往钱包查看")}`,
|
||||
confirmText: "OK",
|
||||
});
|
||||
}
|
||||
|
||||
return () => {};
|
||||
}, [transcationStatus]);
|
||||
|
||||
async function getHomeData() {
|
||||
const { data } = await api_get_homepage_user_data().send({});
|
||||
setUserData(data?.data);
|
||||
}
|
||||
|
||||
async function getInviteCode() {
|
||||
const { data } = await api_query_user_invitation_code().send({});
|
||||
setInviteCode(data?.data.invitationCode || "");
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
console.log("user token:", Token);
|
||||
|
||||
return () => {};
|
||||
}, [Token]);
|
||||
getHomeData,
|
||||
statusRecord,
|
||||
Token,
|
||||
address,
|
||||
setUserData,
|
||||
userData,
|
||||
tabIndex,
|
||||
t,
|
||||
setTabIndex,
|
||||
navigate,
|
||||
userInviteLink,
|
||||
open,
|
||||
} = useHome();
|
||||
|
||||
return (
|
||||
<>
|
||||
<PullToRefresh
|
||||
onRefresh={async () => {
|
||||
await getHomeData();
|
||||
|
@ -118,7 +56,7 @@ export default function () {
|
|||
}}
|
||||
name="tuichu"
|
||||
className={classes.userinfo_top_right_wallet_disconnect}
|
||||
color={"#fff"}
|
||||
color={"#000000"}
|
||||
/>
|
||||
</div>
|
||||
<div className={classes.userinfo_top_right_btns}>
|
||||
|
@ -200,7 +138,7 @@ export default function () {
|
|||
{t("Buy Node")}
|
||||
<IconFont
|
||||
name="chevronsrightshuangyoujiantou"
|
||||
color={"#2DFCFC"}
|
||||
color={"#EA6D28"}
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
|
@ -262,7 +200,7 @@ export default function () {
|
|||
{t("邀请列表")}{" "}
|
||||
<IconFont
|
||||
name="chevronsrightshuangyoujiantou"
|
||||
color={"#2DFCFC"}
|
||||
color={"#EA6D28"}
|
||||
/>
|
||||
</span>
|
||||
)}
|
||||
|
@ -282,7 +220,7 @@ export default function () {
|
|||
}}
|
||||
className={classes.invite_content_icon}
|
||||
name="fuzhi"
|
||||
color={"#fff"}
|
||||
color={"#101010"}
|
||||
/>{" "}
|
||||
</>
|
||||
) : (
|
||||
|
@ -302,13 +240,49 @@ export default function () {
|
|||
|
||||
<span>
|
||||
{t(
|
||||
"Invite your friends to become YOTTA nodes and you will get a 20% rebate."
|
||||
"Invite your friends to become YOTTA nodes and you will get a 10% rebate."
|
||||
)}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</PullToRefresh>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function Desktop() {
|
||||
const {
|
||||
getHomeData,
|
||||
statusRecord,
|
||||
Token,
|
||||
address,
|
||||
setUserData,
|
||||
userData,
|
||||
tabIndex,
|
||||
t,
|
||||
setTabIndex,
|
||||
navigate,
|
||||
userInviteLink,
|
||||
} = useHome();
|
||||
const {
|
||||
nodeConfig,
|
||||
num,
|
||||
setNum,
|
||||
approveUsdt,
|
||||
balance,
|
||||
approveLoadingToast,
|
||||
costNum,
|
||||
setApproveUsdt,
|
||||
buyLoadingToast,
|
||||
orderInfo,
|
||||
updateNodeConfig,
|
||||
startPollingCheckBuyStatus,
|
||||
} = useMint();
|
||||
const { columns, list, loadMore, hasMore } = useInvitationList();
|
||||
return <></>;
|
||||
}
|
||||
|
||||
export default {
|
||||
Mobile,
|
||||
Desktop,
|
||||
};
|
||||
|
|
|
@ -4,40 +4,12 @@
|
|||
* @LastEditTime: 2024-06-27 15:33:01
|
||||
* @Author: John
|
||||
*/
|
||||
import usePagination from "@/hook/usePagination";
|
||||
import { api_recommended_list } from "@/server/api";
|
||||
import { RecommendedListItem } from "@/server/module";
|
||||
import { Empty, InfiniteScroll } from "antd-mobile";
|
||||
import DataTable, { TableColumn } from "react-data-table-component";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import DataTable from "react-data-table-component";
|
||||
import useInvitationList from "./Feature/useInvitationList";
|
||||
|
||||
export default function () {
|
||||
const { t } = useTranslation();
|
||||
const columns: TableColumn<RecommendedListItem>[] = [
|
||||
{
|
||||
name: t("地址"),
|
||||
selector: (row) => row.walletAddress,
|
||||
grow: 9,
|
||||
},
|
||||
{
|
||||
name: "Node",
|
||||
selector: (row) => row.nodeNumber,
|
||||
grow: 1,
|
||||
// @ts-ignore
|
||||
right: "true",
|
||||
},
|
||||
];
|
||||
|
||||
const { list, hasMore, loadMore } = usePagination<RecommendedListItem>({
|
||||
service({ pageNum, pageSize }) {
|
||||
return new Promise(async (reslove) => {
|
||||
const { data } = await api_recommended_list().send({
|
||||
queryParams: { pageNum, pageSize },
|
||||
});
|
||||
reslove(data?.data.records || []);
|
||||
});
|
||||
},
|
||||
});
|
||||
const { columns, list, loadMore, hasMore } = useInvitationList();
|
||||
|
||||
return (
|
||||
<>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
height: 190px;
|
||||
border-radius: 10px;
|
||||
opacity: 1;
|
||||
background: #171719;
|
||||
background: #ffffff;
|
||||
box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.16),
|
||||
0px 3px 6px 0px rgba(0, 0, 0, 0.23);
|
||||
padding: 8px;
|
||||
|
@ -95,7 +95,7 @@
|
|||
|
||||
font-variation-settings: "opsz" auto;
|
||||
font-feature-settings: "kern" on;
|
||||
color: #9e9e9e;
|
||||
color: #333333;
|
||||
|
||||
z-index: 0;
|
||||
}
|
||||
|
@ -137,7 +137,7 @@
|
|||
|
||||
font-variation-settings: "opsz" auto;
|
||||
font-feature-settings: "kern" on;
|
||||
color: #ffffff;
|
||||
color: #000000;
|
||||
|
||||
z-index: 0;
|
||||
}
|
||||
|
@ -154,7 +154,7 @@
|
|||
|
||||
font-variation-settings: "opsz" auto;
|
||||
font-feature-settings: "kern" on;
|
||||
color: #ffffff;
|
||||
color: #000000;
|
||||
|
||||
z-index: 1;
|
||||
}
|
||||
|
@ -178,7 +178,7 @@
|
|||
|
||||
font-variation-settings: "opsz" auto;
|
||||
font-feature-settings: "kern" on;
|
||||
color: #ffffff;
|
||||
color: #000000;
|
||||
|
||||
z-index: 0;
|
||||
}
|
||||
|
@ -194,7 +194,7 @@
|
|||
|
||||
font-variation-settings: "opsz" auto;
|
||||
font-feature-settings: "kern" on;
|
||||
color: #ffffff;
|
||||
color: #000000;
|
||||
|
||||
z-index: 1;
|
||||
}
|
||||
|
@ -215,7 +215,7 @@
|
|||
padding: 11px 40px;
|
||||
gap: 10px;
|
||||
|
||||
background: #2dfcfc;
|
||||
background: #ea6d28;
|
||||
|
||||
z-index: 3;
|
||||
|
|
@ -1,110 +1,36 @@
|
|||
/*
|
||||
* @LastEditors: John
|
||||
* @Date: 2024-06-18 15:28:03
|
||||
* @LastEditTime: 2024-06-27 17:17:09
|
||||
* @LastEditTime: 2024-06-28 14:33:02
|
||||
* @Author: John
|
||||
*/
|
||||
import { cn, filterAddressBeforeZero, filterAmountBeforeZero } from "@/utils";
|
||||
import classes from "./Mint.module.css";
|
||||
import classes from "./Mint-m.module.css";
|
||||
import nft_bg from "@/assets/nft_bg.svg";
|
||||
import Button from "antd-mobile/es/components/button";
|
||||
import Space from "antd-mobile/es/components/space";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { useEffect, useMemo, useRef, useState } from "react";
|
||||
import {
|
||||
api_get_homepage_user_data,
|
||||
api_get_nft_configuration_data,
|
||||
api_node_order,
|
||||
api_users_cancel_orders,
|
||||
} from "@/server/api";
|
||||
import {
|
||||
NftConfigurationData,
|
||||
NftOrder,
|
||||
NodeOrder,
|
||||
UserHomeData,
|
||||
} from "@/server/module";
|
||||
import {
|
||||
authorizedU,
|
||||
getApproveUsdt,
|
||||
getBalance,
|
||||
payByContract,
|
||||
} from "@/contract/utils";
|
||||
import { Dialog, Modal, Stepper, Toast } from "antd-mobile";
|
||||
import useUserStore from "@/store/User";
|
||||
import usePollingCheckBuyStatus from "@/hook/usePollingCheckBuyStatus";
|
||||
import { ToastHandler } from "antd-mobile/es/components/toast";
|
||||
import { api_node_order } from "@/server/api";
|
||||
import { authorizedU, getApproveUsdt, payByContract } from "@/contract/utils";
|
||||
import { Stepper, Toast } from "antd-mobile";
|
||||
import { BaseError } from "wagmi";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { toWei } from "web3-utils";
|
||||
import useMint from "./Feature/useMint";
|
||||
export default function () {
|
||||
const { t } = useTranslation();
|
||||
const { Token } = useUserStore();
|
||||
const [nodeConfig, setNodeConfig] = useState<UserHomeData>();
|
||||
const [approveUsdt, setApproveUsdt] = useState<bigint>(0n);
|
||||
const [balance, setBalance] = useState<bigint>(0n);
|
||||
const orderInfo = useRef<NodeOrder>();
|
||||
const navigate = useNavigate();
|
||||
const [num, setNum] = useState(1);
|
||||
|
||||
const buyLoadingToast = useRef<ToastHandler>();
|
||||
const approveLoadingToast = useRef<ToastHandler>();
|
||||
const {
|
||||
transcationStatus,
|
||||
nodeConfig,
|
||||
num,
|
||||
setNum,
|
||||
approveUsdt,
|
||||
t,
|
||||
balance,
|
||||
approveLoadingToast,
|
||||
costNum,
|
||||
setApproveUsdt,
|
||||
buyLoadingToast,
|
||||
orderInfo,
|
||||
updateNodeConfig,
|
||||
startPollingCheckBuyStatus,
|
||||
stopPollingCheckBuyStatus,
|
||||
} = usePollingCheckBuyStatus("NORMAL");
|
||||
|
||||
const costNum = useMemo(
|
||||
() =>
|
||||
BigInt(
|
||||
toWei(`${parseFloat(`${nodeConfig?.nodePrice || "0"}`) * num}`, "ether")
|
||||
),
|
||||
[nodeConfig?.nodePrice, num]
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
updateNodeConfig();
|
||||
|
||||
return () => {};
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
(async () => {
|
||||
Toast.show({ icon: "loading", content: t("正在获取已授权金额") });
|
||||
setBalance(await getBalance());
|
||||
setApproveUsdt(await getApproveUsdt());
|
||||
Toast.clear();
|
||||
})();
|
||||
|
||||
return () => {};
|
||||
}, [Token]);
|
||||
|
||||
async function updateNodeConfig() {
|
||||
const { data } = await api_get_homepage_user_data().send({});
|
||||
setNodeConfig(data?.data);
|
||||
}
|
||||
useEffect(() => {
|
||||
if (transcationStatus == "success") {
|
||||
buyLoadingToast.current?.close();
|
||||
stopPollingCheckBuyStatus();
|
||||
Dialog.alert({
|
||||
content: `${t(
|
||||
"Buy successful. Please return to the homepage to view."
|
||||
)}`,
|
||||
confirmText: "OK",
|
||||
onConfirm() {
|
||||
navigate("/");
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
return () => {};
|
||||
}, [transcationStatus]);
|
||||
|
||||
useEffect(() => {
|
||||
return () => {};
|
||||
}, []);
|
||||
|
||||
} = useMint();
|
||||
return (
|
||||
<>
|
||||
<div className={cn(classes.Mint, classes.container)}>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* @LastEditors: John
|
||||
* @Date: 2024-06-18 10:28:21
|
||||
* @LastEditTime: 2024-06-27 09:52:45
|
||||
* @LastEditTime: 2024-07-01 11:55:38
|
||||
* @Author: John
|
||||
*/
|
||||
import { GET, POST } from "./client";
|
||||
|
@ -54,7 +54,7 @@ export function api_signUp() {
|
|||
chainType: 2;
|
||||
},
|
||||
any
|
||||
>({ url: "/api/account/signUp", requiresToken: false });
|
||||
>({ url: "/api/account/signUp", requiresToken: false, catchErr: true });
|
||||
}
|
||||
|
||||
// 获取钱包签名串
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* @LastEditors: John
|
||||
* @Date: 2024-06-18 10:09:21
|
||||
* @LastEditTime: 2024-06-21 14:47:26
|
||||
* @LastEditTime: 2024-07-01 11:38:43
|
||||
* @Author: John
|
||||
*/
|
||||
import { Client } from "@hyper-fetch/core";
|
||||
|
@ -17,9 +17,11 @@ import i18next from "i18next";
|
|||
function initClient({
|
||||
requiresToken,
|
||||
requiresAddress,
|
||||
catchErr,
|
||||
}: {
|
||||
requiresToken: boolean;
|
||||
requiresAddress: boolean;
|
||||
catchErr: boolean;
|
||||
}) {
|
||||
return new Client({ url: import.meta.env.VITE_BASE_API_URL })
|
||||
.onAuth(async (req) => {
|
||||
|
@ -59,6 +61,7 @@ function initClient({
|
|||
const resData: BASE_RESPONSE = res.data;
|
||||
if (resData.code !== 200 && resData.code !== 0) {
|
||||
if (resData.msg) Toast.show({ content: resData.msg, icon: "fail" });
|
||||
if (catchErr) return res;
|
||||
throw new Error(resData.msg || "client on response error");
|
||||
}
|
||||
return res;
|
||||
|
@ -69,12 +72,14 @@ export const POST = <P = any, R = any, QueryParams = any>({
|
|||
url,
|
||||
requiresToken = true,
|
||||
requiresAddress = true,
|
||||
catchErr = false,
|
||||
}: {
|
||||
url: string;
|
||||
requiresToken?: boolean;
|
||||
requiresAddress?: boolean;
|
||||
catchErr?: boolean;
|
||||
}) => {
|
||||
return initClient({ requiresToken, requiresAddress }).createRequest<
|
||||
return initClient({ requiresToken, requiresAddress, catchErr }).createRequest<
|
||||
BASE_RESPONSE<R>,
|
||||
P,
|
||||
any,
|
||||
|
@ -89,12 +94,14 @@ export const GET = <P = any, R = any>({
|
|||
url,
|
||||
requiresToken = true,
|
||||
requiresAddress = true,
|
||||
catchErr = false,
|
||||
}: {
|
||||
url: string;
|
||||
requiresToken?: boolean;
|
||||
requiresAddress?: boolean;
|
||||
catchErr?: boolean;
|
||||
}) => {
|
||||
return initClient({ requiresToken, requiresAddress }).createRequest<
|
||||
return initClient({ requiresToken, requiresAddress, catchErr }).createRequest<
|
||||
BASE_RESPONSE<R>,
|
||||
any,
|
||||
any,
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
.adm-tabs {
|
||||
@media only screen and (max-width: 1024px) {
|
||||
.adm-tabs {
|
||||
.adm-tabs-header {
|
||||
border-bottom: 0.25px solid #333333;
|
||||
|
||||
.adm-tabs-tab-line {
|
||||
background-color: #2dfcfc;
|
||||
background-color: #ea6d28;
|
||||
}
|
||||
|
||||
.adm-tabs-tab {
|
||||
|
@ -27,9 +28,9 @@
|
|||
.adm-tabs-content {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.adm-capsule-tabs {
|
||||
.adm-capsule-tabs {
|
||||
.adm-capsule-tabs-header {
|
||||
padding: 0px 15px;
|
||||
border-bottom: none;
|
||||
|
@ -51,7 +52,7 @@
|
|||
opacity: 1;
|
||||
|
||||
box-sizing: border-box;
|
||||
border: 1px solid #2dfcfc;
|
||||
border: 1px solid #ea6d28;
|
||||
|
||||
z-index: 1;
|
||||
background-color: transparent;
|
||||
|
@ -80,7 +81,7 @@
|
|||
border-radius: 8px;
|
||||
opacity: 1;
|
||||
|
||||
background: #2dfcfc;
|
||||
background: #ea6d28;
|
||||
|
||||
z-index: 0;
|
||||
|
||||
|
@ -102,10 +103,10 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* picker */
|
||||
.adm-picker-popup {
|
||||
/* picker */
|
||||
.adm-picker-popup {
|
||||
.adm-picker-header {
|
||||
border-bottom: 1px solid #404040;
|
||||
.adm-picker-header-title {
|
||||
|
@ -175,10 +176,10 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* toast */
|
||||
.adm-toast-main {
|
||||
/* toast */
|
||||
.adm-toast-main {
|
||||
min-width: 170px !important;
|
||||
min-height: 40px !important;
|
||||
max-width: 320px !important;
|
||||
|
@ -192,7 +193,7 @@
|
|||
/* background: rgba(252, 135, 43, 0.5) !important; */
|
||||
|
||||
box-sizing: border-box !important;
|
||||
border: 1px solid #2dfcfc !important;
|
||||
border: 1px solid #ea6d28 !important;
|
||||
|
||||
/* backdrop-filter: blur(10px); */
|
||||
|
||||
|
@ -211,9 +212,9 @@
|
|||
|
||||
z-index: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.adm-popover-menu {
|
||||
.adm-popover-menu {
|
||||
.adm-popover-arrow {
|
||||
color: rgba(42, 42, 42, 0.6) !important;
|
||||
}
|
||||
|
@ -255,24 +256,24 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* adm-stepper */
|
||||
.adm-stepper {
|
||||
/* adm-stepper */
|
||||
.adm-stepper {
|
||||
width: calc(100%) !important;
|
||||
height: 42px;
|
||||
border-radius: 5px !important;
|
||||
opacity: 1;
|
||||
background: rgba(37, 33, 39, 0.2);
|
||||
background: rgba(204, 184, 214, 0.2);
|
||||
box-sizing: border-box !important;
|
||||
border: 1px solid #2dfcfc !important;
|
||||
border: 1px solid #ea6d28 !important;
|
||||
.adm-button {
|
||||
width: 42px;
|
||||
height: 42px;
|
||||
border-radius: 5px;
|
||||
opacity: 1;
|
||||
|
||||
background: #2dfcfc;
|
||||
background: #ea6d28;
|
||||
|
||||
svg {
|
||||
width: 23px;
|
||||
|
@ -296,16 +297,16 @@
|
|||
|
||||
font-variation-settings: "opsz" auto;
|
||||
font-feature-settings: "kern" on;
|
||||
color: #ffffff;
|
||||
color: #000000;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.adm-dialog {
|
||||
.adm-dialog {
|
||||
.adm-center-popup-body {
|
||||
box-sizing: border-box !important;
|
||||
border: 1px solid #2dfcfc !important;
|
||||
border: 1px solid #ea6d28 !important;
|
||||
border-radius: 10px !important;
|
||||
background-color: transparent !important;
|
||||
backdrop-filter: blur(10px);
|
||||
|
@ -328,20 +329,20 @@
|
|||
|
||||
.adm-dialog-footer {
|
||||
.adm-dialog-action-row {
|
||||
border-top: 1px solid #2dfcfc !important;
|
||||
border-top: 1px solid #ea6d28 !important;
|
||||
|
||||
.adm-dialog-button {
|
||||
span {
|
||||
color: #2dfcfc;
|
||||
color: #ea6d28;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* adm-pull-to-refresh */
|
||||
.adm-pull-to-refresh {
|
||||
/* adm-pull-to-refresh */
|
||||
.adm-pull-to-refresh {
|
||||
.adm-pull-to-refresh-head-content {
|
||||
/* 自动布局子元素 */
|
||||
font-family: Space Grotesk;
|
||||
|
@ -356,4 +357,5 @@
|
|||
|
||||
z-index: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
height: 16px !important;
|
||||
min-height: 16px !important;
|
||||
background-color: transparent !important;
|
||||
border-bottom: none;
|
||||
|
||||
.rdt_TableCol {
|
||||
div {
|
||||
|
@ -24,7 +25,7 @@
|
|||
|
||||
font-variation-settings: "opsz" auto;
|
||||
font-feature-settings: "kern" on;
|
||||
color: #eaeaea;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -37,6 +38,8 @@
|
|||
height: 18px !important;
|
||||
min-height: 18px !important;
|
||||
background-color: transparent !important;
|
||||
border-bottom: none;
|
||||
|
||||
.rdt_TableCell {
|
||||
div {
|
||||
opacity: 1;
|
||||
|
@ -49,7 +52,7 @@
|
|||
|
||||
font-variation-settings: "opsz" auto;
|
||||
font-feature-settings: "kern" on;
|
||||
color: #ffffff;
|
||||
color: #000000;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* @LastEditors: John
|
||||
* @Date: 2024-06-17 18:19:27
|
||||
* @LastEditTime: 2024-06-27 11:40:59
|
||||
* @LastEditTime: 2024-07-01 16:49:14
|
||||
* @Author: John
|
||||
*/
|
||||
import { type ClassValue, clsx } from "clsx";
|
||||
|
@ -121,3 +121,14 @@ export function filterAmountBeforeZero(arr: bigint[]) {
|
|||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
export function getUrlParameterByName(name: string, url?: string) {
|
||||
if (!url) url = window.location.href;
|
||||
name = name.replace(/[\[\]]/g, "\\$&");
|
||||
let regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
|
||||
results = regex.exec(url);
|
||||
if (!results) return null;
|
||||
if (!results[2]) return "";
|
||||
console.log("url params:", results);
|
||||
return decodeURIComponent(results[2].replace(/\+/g, " "));
|
||||
}
|
||||
|
|
|
@ -1,16 +1,14 @@
|
|||
/*
|
||||
* @LastEditors: John
|
||||
* @Date: 2024-06-19 15:55:07
|
||||
* @LastEditTime: 2024-06-27 15:09:45
|
||||
* @LastEditTime: 2024-07-01 16:44:04
|
||||
* @Author: John
|
||||
*/
|
||||
import { config } from "@/components/WalletProvider";
|
||||
import {
|
||||
api_binding_invitation_relationship,
|
||||
api_check_account_registration,
|
||||
api_get_wallet_signature_string,
|
||||
api_login,
|
||||
api_query_whether_the_user_is_binding_relationship,
|
||||
api_signUp,
|
||||
} from "@/server/api";
|
||||
import useUserStore from "@/store/User";
|
||||
|
@ -24,7 +22,7 @@ import {
|
|||
} from "@wagmi/core";
|
||||
import Toast from "antd-mobile/es/components/toast";
|
||||
import i18next from "i18next";
|
||||
import { getUrlQueryParam } from ".";
|
||||
import { getUrlParameterByName } from ".";
|
||||
import { UrlQueryParamsKey } from "@/constants";
|
||||
|
||||
/**
|
||||
|
@ -130,7 +128,8 @@ export async function signAndLogin(address?: `0x${string}`): Promise<void> {
|
|||
loadingToast.close();
|
||||
}
|
||||
} else {
|
||||
const inviteCode = getUrlQueryParam(UrlQueryParamsKey.INVITE_CODE);
|
||||
const inviteCode = getUrlParameterByName(UrlQueryParamsKey.INVITE_CODE);
|
||||
console.log("inviteCode:", inviteCode);
|
||||
if (!inviteCode) {
|
||||
Toast.show({
|
||||
icon: "fail",
|
||||
|
@ -139,7 +138,7 @@ export async function signAndLogin(address?: `0x${string}`): Promise<void> {
|
|||
return loginOut();
|
||||
}
|
||||
// 注册
|
||||
await api_signUp().send({
|
||||
const { data } = await api_signUp().send({
|
||||
data: {
|
||||
account: address,
|
||||
publicKey,
|
||||
|
@ -147,7 +146,11 @@ export async function signAndLogin(address?: `0x${string}`): Promise<void> {
|
|||
chainType: 2,
|
||||
},
|
||||
});
|
||||
if (data?.code == 0) {
|
||||
await signAndLogin(address);
|
||||
} else {
|
||||
return loginOut();
|
||||
}
|
||||
reslove();
|
||||
loadingToast.close();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue