diff --git a/src/router/renderRouter.tsx b/src/router/renderRouter.tsx
index bcc8b2a..24c7974 100644
--- a/src/router/renderRouter.tsx
+++ b/src/router/renderRouter.tsx
@@ -1,6 +1,7 @@
import { Suspense } from "react";
import { Route, Routes } from "react-router-dom";
import routes from "./routes";
+import { observer } from "mobx-react";
const RenderRouter = () => {
return (
@@ -21,4 +22,4 @@ const RenderRouter = () => {
)
}
-export default RenderRouter;
+export default observer(RenderRouter);
diff --git a/src/router/routes.tsx b/src/router/routes.tsx
index 8f05217..7731ad7 100644
--- a/src/router/routes.tsx
+++ b/src/router/routes.tsx
@@ -10,6 +10,20 @@ const Transfer = lazy(() => import("../pages/transfer"));
const Withdraw = lazy(() => import("../pages/withdraw"));
const Account = lazy(() => import("../pages/account"));
const Security = lazy(() => import("../pages/security"));
+const Link = lazy(() => import("../pages/link"));
+const Team = lazy(() => import("../pages/team"));
+const AssetsRecords = lazy(() => import("../pages/record/assets"));
+const WithdrawRecords = lazy(() => import("../pages/record/withdraw"));
+const DepositRecords = lazy(() => import("../pages/record/deposit"));
+const Personal = lazy(() => import("../pages/personal"));
+const BonusRecords = lazy(() => import("../pages/record/bonus"));
+const EscrowRecords = lazy(() => import("../pages/record/escrow"));
+
+export const unLoginPath = [
+ "/login",
+ "/forget",
+ "/createProxy"
+]
const routes = [
{
@@ -48,6 +62,38 @@ const routes = [
path: "/security",
element:
},
+ {
+ path: "/link",
+ element:
+ },
+ {
+ path: "/team",
+ element:
+ },
+ {
+ path: "/assetsRecords",
+ element:
+ },
+ {
+ path: "/personal",
+ element:
+ },
+ {
+ path: '/withdrawRecords',
+ element:
+ },
+ {
+ path: '/depositRecords',
+ element:
+ },
+ {
+ path: '/bonusRecords',
+ element:
+ },
+ {
+ path: '/escrowRecords',
+ element:
+ }
] as RouteObject[];
export default routes;
diff --git a/src/store/index.ts b/src/store/index.ts
index 8de59f9..6e65254 100644
--- a/src/store/index.ts
+++ b/src/store/index.ts
@@ -1,13 +1,13 @@
import { makeAutoObservable } from "mobx";
+import { Store } from "../types";
+import { http_account, http_receiveAccount } from "../http/api";
-interface Store {
- state: object;
-}
-
-class AppStore implements Store {
+class AppStore {
state = {
token: "",
- screenWidth: 0
+ screenWidth: 0,
+ userInfo: {} as Store.AccountDetails,
+ receiveAccount: [] as Store.ReceiveAccount[]
};
constructor() {
@@ -22,17 +22,41 @@ class AppStore implements Store {
// let addr =
// window.sessionStorage.getItem(StoreLocalStorageKey.ADDRESS) || "";
// this.state.walletAddress = addr;
+ this.state.token = window.localStorage.getItem('Tarder_Token') || ""
this.state.screenWidth = window.innerWidth
}
setToken(_token: string) {
- this.state.token = _token
+ this.state.token = _token;
+ window.localStorage.setItem('Tarder_Token', _token)
}
setScreenWidth(_width: number) {
this.state.screenWidth = _width
}
+ async getUserInfo() {
+ const res: any = await http_account()
+ if (res.code === 0) {
+ this.state.userInfo = res.data
+ }
+ }
+
+ resetUserInfo() {
+ this.state.userInfo = {} as Store.AccountDetails
+ }
+
+ async getReceiveAccount() {
+ const res: any = await http_receiveAccount()
+ if (res.code === 0) {
+ this.state.receiveAccount = res.data
+ }
+ }
+
+ resetReceiveAccount() {
+ this.state.receiveAccount = []
+ }
+
}
const store = new AppStore();
diff --git a/src/styles/app.scss b/src/styles/app.scss
index 1c1fc1d..7751b99 100644
--- a/src/styles/app.scss
+++ b/src/styles/app.scss
@@ -85,4 +85,14 @@
&::-webkit-scrollbar {
display: none;
}
-}
\ No newline at end of file
+}
+
+.ant-collapse-expand-icon{
+ color: #fff;
+ font-weight: bold;
+}
+
+.ant-collapse-header-text{
+ color: #fff;
+ font-weight: bold;
+}
diff --git a/src/styles/components.scss b/src/styles/components.scss
index 79f331c..b31e164 100644
--- a/src/styles/components.scss
+++ b/src/styles/components.scss
@@ -10,6 +10,10 @@
justify-content: center;
align-items: center;
cursor: pointer;
+ border: none;
+ padding: 0;
+ text-decoration: none;
+ outline: inherit;
&:hover {
opacity: 0.9;
diff --git a/src/styles/global.scss b/src/styles/global.scss
index 68c6892..429c90e 100644
--- a/src/styles/global.scss
+++ b/src/styles/global.scss
@@ -9,7 +9,7 @@ $iterations: 10;
body {
font-size: 1rem;
color: #000;
- user-select: none;
+ // user-select: none;
background-color: #f8f8fb;
font-family: Play;
width: 100%;
@@ -296,4 +296,25 @@ body {
height: 1px;
background-color: #fff;
transform: scaleY(0.1);
+}
+
+.tx-over {
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
+:where(.css-dev-only-do-not-override-1q0h2je).ant-table-wrapper .ant-table-pagination-right {
+ justify-content: left;
+}
+
+:where(.css-dev-only-do-not-override-1q0h2je).ant-input-affix-wrapper>input.ant-input,
+:where(.css-dev-only-do-not-override-1q0h2je).ant-input-affix-wrapper>textarea.ant-input {
+ &::placeholder {
+ color: #999;
+ }
+}
+
+:where(.css-dev-only-do-not-override-myver8).ant-table-wrapper .ant-table-pagination-right {
+ justify-content: left;
}
\ No newline at end of file
diff --git a/src/styles/home.scss b/src/styles/home.scss
index fbe3307..89a9ee1 100644
--- a/src/styles/home.scss
+++ b/src/styles/home.scss
@@ -1,4 +1,10 @@
.home {
+ .box {
+ display: flex;
+ flex-direction: row;
+ justify-content: space-between;
+ }
+
.income {
width: 60%;
height: 400px;
@@ -17,19 +23,35 @@
.CFD-box {
width: 360px;
- height: 430px;
background-color: #fff;
border-radius: 5px;
box-shadow: 0 .05rem 0.04rem rgba(8, 5, 3, .03);
}
-}
+ @media (max-width:1000px) {
+ .income {
+ width: 100%;
+ height: 420px;
+ }
+ .total-income {
+ width: 100%;
+ height: 250px;
+ margin-top: 20px;
+ }
+ .box {
+ flex-direction: column;
+ }
+ .CFD-box {
+ width: 100%;
+ }
+ }
+}
.deposit {
@@ -56,11 +78,97 @@
}
.securify {
-
+
.container {
width: 100%;
background-color: #fff;
box-shadow: 0 .05rem 0.04rem rgba(8, 5, 3, .03);
border-radius: 5px;
}
+}
+
+.widthdraw {
+ .container {
+ width: 100%;
+ background-color: #fff;
+ box-shadow: 0 .05rem 0.04rem rgba(8, 5, 3, .03);
+ border-radius: 5px;
+
+ .form-box {
+ display: flex;
+ flex-direction: row;
+ justify-content: space-between;
+
+ .input {
+ width: 48%;
+ }
+ }
+
+ @media (max-width:700px) {
+ .form-box {
+ flex-direction: column;
+
+ .input {
+ width: 100%;
+ }
+ }
+ }
+
+ }
+
+}
+
+.link {
+ .container {
+ width: 100%;
+ background-color: #fff;
+ box-shadow: 0 .05rem 0.04rem rgba(8, 5, 3, .03);
+ border-radius: 5px;
+ max-width: 450px;
+ }
+}
+
+
+.team {
+ .container {
+ width: 100%;
+ background-color: #fff;
+ box-shadow: 0 .05rem 0.04rem rgba(8, 5, 3, .03);
+ border-radius: 5px;
+ }
+
+ .box-width {
+ width: 25%;
+ }
+
+ @media (max-width:700px) {
+ .box-width {
+ width: 50%;
+ }
+ }
+
+ @media (max-width:350px) {
+ .box-width {
+ width: 100%;
+ }
+ }
+}
+
+.records {
+
+ .container {
+ width: var(--screen);
+ background-color: #fff;
+ box-shadow: 0 .05rem 0.04rem rgba(8, 5, 3, .03);
+ border-radius: 5px;
+ height: 100%;
+ overflow-x: scroll;
+ scrollbar-color: #f7b93f #f5f5f5;
+ }
+}
+
+.ant-tabs-nav-wrap {
+ overflow: hidden;
+ overflow-x: scroll;
+ width: 400px;
}
\ No newline at end of file
diff --git a/src/styles/login.scss b/src/styles/login.scss
index 4ba30e9..4f50cb2 100644
--- a/src/styles/login.scss
+++ b/src/styles/login.scss
@@ -13,10 +13,9 @@
color: #fff;
.img {
- max-width: 100%;
- margin-top: 20px;
+ max-width: 140px;
+ margin-top: 100px;
margin-bottom: 30px;
-
}
.verify-button {
@@ -43,8 +42,11 @@
&::placeholder {
color: #999;
}
- }
+ &:hover {
+ background: none;
+ }
+ }
.button {
width: 100%;
height: 52px;
diff --git a/src/types/index.ts b/src/types/index.ts
new file mode 100644
index 0000000..8b55a10
--- /dev/null
+++ b/src/types/index.ts
@@ -0,0 +1,27 @@
+export namespace Store {
+ export interface AccountDetails {
+ account: string;
+ account_balance: string;
+ account_capital: string;
+ account_credit: string;
+ account_net_worth: string;
+ account_observer_password: string;
+ account_prepaid: string;
+ account_status: string;
+ balance: string;
+ email: string;
+ inviti_code: string;
+ name: string;
+ total_assets: string;
+ total_income: string;
+ }
+
+ export interface ReceiveAccount {
+ "address": string,
+ "fee": string,
+ "id": number,
+ "time": number,
+ "type": string
+ }
+}
+
diff --git a/src/utils/index.ts b/src/utils/index.ts
new file mode 100644
index 0000000..9dea92c
--- /dev/null
+++ b/src/utils/index.ts
@@ -0,0 +1,47 @@
+import { notification } from "antd"
+
+export function copy(value: string, cb?: Function) {
+ // 动态创建 textarea 标签
+ const textarea: any = document.createElement('textarea')
+ // 将该 textarea 设为 readonly 防止 iOS 下自动唤起键盘,同时将 textarea 移出可视区域
+ textarea.readOnly = 'readonly'
+ textarea.style.position = 'absolute'
+ textarea.style.left = '-9999px'
+ // 将要 copy 的值赋给 textarea 标签的 value 属性
+ // 网上有些例子是赋值给innerText,这样也会赋值成功,但是识别不了\r\n的换行符,赋值给value属性就可以
+ textarea.value = value
+ // 将 textarea 插入到 body 中
+ document.body.appendChild(textarea)
+ // 选中值并复制
+ textarea.select()
+ textarea.setSelectionRange(0, textarea.value.length)
+ document.execCommand('Copy')
+ document.body.removeChild(textarea)
+ notification.success({
+ message: '复制成功'
+ })
+ if (cb && Object.prototype.toString.call(cb) === '[object Function]') {
+ cb()
+ }
+}
+
+/**
+ * @param value
+ * @returns
+ */
+export const getTime = (value: number, type?: string) => {
+ let date = new Date(value);
+ let yy: number | string = date.getFullYear();
+ let mm: number | string = date.getMonth() + 1;
+ let dd: number | string = date.getDate();
+ let xs: number | string = date.getHours();
+ let ff: number | string = date.getMinutes();
+ let ss: number | string = date.getSeconds();
+ mm = mm >= 10 ? mm : "0" + mm;
+ dd = dd >= 10 ? dd : "0" + dd;
+ xs = xs >= 10 ? xs : "0" + xs;
+ ff = ff >= 10 ? ff : "0" + ff;
+ ss = ss >= 10 ? ss : "0" + ss;
+ if (type === "day") return `${yy}-${mm}-${dd}`;
+ return `${yy}-${mm}-${dd} ${xs}:${ff}`;
+};
\ No newline at end of file
diff --git a/yarn.lock b/yarn.lock
index e6940ad..945be30 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -3067,6 +3067,15 @@ axe-core@=4.7.0:
resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.7.0.tgz#34ba5a48a8b564f67e103f0aa5768d76e15bbbbf"
integrity sha512-M0JtH+hlOL5pLQwHOLNYZaXuhqmvS8oExsqB1SBYgA4Dk7u/xx+YdGHXaK5pyUfed5mYXdlYiphWq3G8cRi5JQ==
+axios@^1.7.2:
+ version "1.7.2"
+ resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.2.tgz#b625db8a7051fbea61c35a3cbb3a1daa7b9c7621"
+ integrity sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw==
+ dependencies:
+ follow-redirects "^1.15.6"
+ form-data "^4.0.0"
+ proxy-from-env "^1.1.0"
+
axobject-query@^3.2.1:
version "3.2.1"
resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-3.2.1.tgz#39c378a6e3b06ca679f29138151e45b2b32da62a"
@@ -4262,6 +4271,22 @@ eastasianwidth@^0.2.0:
resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb"
integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==
+echarts-for-react@^3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/echarts-for-react/-/echarts-for-react-3.0.2.tgz#ac5859157048a1066d4553e34b328abb24f2b7c1"
+ integrity sha512-DRwIiTzx8JfwPOVgGttDytBqdp5VzCSyMRIxubgU/g2n9y3VLUmF2FK7Icmg/sNVkv4+rktmrLN9w22U2yy3fA==
+ dependencies:
+ fast-deep-equal "^3.1.3"
+ size-sensor "^1.0.1"
+
+echarts@^5.5.0:
+ version "5.5.0"
+ resolved "https://registry.yarnpkg.com/echarts/-/echarts-5.5.0.tgz#c13945a7f3acdd67c134d8a9ac67e917830113ac"
+ integrity sha512-rNYnNCzqDAPCr4m/fqyUFv7fD9qIsd50S6GDFgO1DxZhncCsNsG7IfUlAlvZe5oSEQxtsjnHiUuppzccry93Xw==
+ dependencies:
+ tslib "2.3.0"
+ zrender "5.5.0"
+
ee-first@1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
@@ -5029,7 +5054,7 @@ flatted@^3.2.9:
resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.3.1.tgz#21db470729a6734d4997002f439cb308987f567a"
integrity sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==
-follow-redirects@^1.0.0:
+follow-redirects@^1.0.0, follow-redirects@^1.15.6:
version "1.15.6"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b"
integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==
@@ -5077,6 +5102,15 @@ form-data@^3.0.0:
combined-stream "^1.0.8"
mime-types "^2.1.12"
+form-data@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452"
+ integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==
+ dependencies:
+ asynckit "^0.4.0"
+ combined-stream "^1.0.8"
+ mime-types "^2.1.12"
+
forwarded@0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811"
@@ -6497,6 +6531,11 @@ jiti@^1.21.0:
resolved "https://registry.yarnpkg.com/jiti/-/jiti-1.21.6.tgz#6c7f7398dd4b3142767f9a168af2f317a428d268"
integrity sha512-2yTgeWTWzMWkHu6Jp9NKgePDaYHbntiwvYuuJLbbN9vl7DC9DvXKOB2BC3ZZ92D3cvV/aflH0osDfwpHepQ53w==
+js-md5@^0.8.3:
+ version "0.8.3"
+ resolved "https://registry.yarnpkg.com/js-md5/-/js-md5-0.8.3.tgz#921bab7efa95bfc9d62b87ee08a57f8fe4305b69"
+ integrity sha512-qR0HB5uP6wCuRMrWPTrkMaev7MJZwJuuw4fnwAzRgP4J4/F8RwtodOKpGp4XpqsLBFzzgqIO42efFAyz2Et6KQ==
+
"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
@@ -8107,6 +8146,11 @@ proxy-addr@~2.0.7:
forwarded "0.2.0"
ipaddr.js "1.9.1"
+proxy-from-env@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2"
+ integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==
+
psl@^1.1.33:
version "1.9.0"
resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7"
@@ -8589,6 +8633,11 @@ react-error-overlay@^6.0.11:
resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-6.0.11.tgz#92835de5841c5cf08ba00ddd2d677b6d17ff9adb"
integrity sha512-/6UZ2qgEyH2aqzYZgQPxEnz33NJ2gNsnHA2o5+o4wW9bLM/JYQitNP9xPhsXwC08hMMovfGe/8retsdDsczPRg==
+react-icons@^5.2.1:
+ version "5.2.1"
+ resolved "https://registry.yarnpkg.com/react-icons/-/react-icons-5.2.1.tgz#28c2040917b2a2eda639b0f797bff1888e018e4a"
+ integrity sha512-zdbW5GstTzXaVKvGSyTaBalt7HSfuK5ovrzlpyiWHAFXndXTdd/1hdDHI4xBM1Mn7YriT6aqESucFl9kEXzrdw==
+
react-is@^16.13.1:
version "16.13.1"
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"
@@ -9223,6 +9272,11 @@ sisteransi@^1.0.5:
resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed"
integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==
+size-sensor@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/size-sensor/-/size-sensor-1.0.2.tgz#b8f8da029683cf2b4e22f12bf8b8f0a1145e8471"
+ integrity sha512-2NCmWxY7A9pYKGXNBfteo4hy14gWu47rg5692peVMst6lQLPKrVjhY+UTEsPI5ceFRJSl3gVgMYaUi/hKuaiKw==
+
slash@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634"
@@ -9838,6 +9892,11 @@ tsconfig-paths@^3.15.0:
minimist "^1.2.6"
strip-bom "^3.0.0"
+tslib@2.3.0:
+ version "2.3.0"
+ resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.0.tgz#803b8cdab3e12ba581a4ca41c8839bbb0dacb09e"
+ integrity sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==
+
tslib@^1.8.1:
version "1.14.1"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
@@ -10697,3 +10756,10 @@ yocto-queue@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"
integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==
+
+zrender@5.5.0:
+ version "5.5.0"
+ resolved "https://registry.yarnpkg.com/zrender/-/zrender-5.5.0.tgz#54d0d6c4eda81a96d9f60a9cd74dc48ea026bc1e"
+ integrity sha512-O3MilSi/9mwoovx77m6ROZM7sXShR/O/JIanvzTwjN3FORfLSr81PsUGd7jlaYOeds9d8tw82oP44+3YucVo+w==
+ dependencies:
+ tslib "2.3.0"