diff --git a/.DS_Store b/.DS_Store
index 4c85036..efd6a62 100644
Binary files a/.DS_Store and b/.DS_Store differ
diff --git a/package-lock.json b/package-lock.json
index be7a7b7..2606c96 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -31,6 +31,7 @@
"less": "^3.11.1",
"less-loader": "^5.0.0",
"moment": "^2.24.0",
+ "qrcode": "^1.5.3",
"react": "^16.13.1",
"react-canvas-nest": "^1.0.10",
"react-dom": "^16.13.1",
@@ -8459,6 +8460,11 @@
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
"integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA=="
},
+ "node_modules/dijkstrajs": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/dijkstrajs/-/dijkstrajs-1.0.3.tgz",
+ "integrity": "sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA=="
+ },
"node_modules/dir-glob": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz",
@@ -8717,6 +8723,11 @@
"node": ">= 4"
}
},
+ "node_modules/encode-utf8": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/encode-utf8/-/encode-utf8-1.0.3.tgz",
+ "integrity": "sha512-ucAnuBEhUK4boH2HjVYG5Q2mQyPorvv0u/ocS+zhdw0S8AlHYY+GOFhP1Gio5z4icpP2ivFSvhtFjQi8+T9ppw=="
+ },
"node_modules/encodeurl": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
@@ -10322,7 +10333,6 @@
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
"integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
- "dev": true,
"dependencies": {
"locate-path": "^5.0.0",
"path-exists": "^4.0.0"
@@ -15813,7 +15823,6 @@
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
"integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
- "dev": true,
"dependencies": {
"p-locate": "^4.1.0"
},
@@ -17236,7 +17245,6 @@
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
"integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
- "dev": true,
"dependencies": {
"p-limit": "^2.2.0"
},
@@ -17369,7 +17377,6 @@
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
"integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
- "dev": true,
"engines": {
"node": ">=8"
}
@@ -17591,6 +17598,14 @@
"resolved": "https://registry.npmjs.org/pn/-/pn-1.1.0.tgz",
"integrity": "sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA=="
},
+ "node_modules/pngjs": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-5.0.0.tgz",
+ "integrity": "sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw==",
+ "engines": {
+ "node": ">=10.13.0"
+ }
+ },
"node_modules/pnp-webpack-plugin": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/pnp-webpack-plugin/-/pnp-webpack-plugin-1.5.0.tgz",
@@ -18879,6 +18894,90 @@
"teleport": ">=0.2.0"
}
},
+ "node_modules/qrcode": {
+ "version": "1.5.3",
+ "resolved": "https://registry.npmjs.org/qrcode/-/qrcode-1.5.3.tgz",
+ "integrity": "sha512-puyri6ApkEHYiVl4CFzo1tDkAZ+ATcnbJrJ6RiBM1Fhctdn/ix9MTE3hRph33omisEbC/2fcfemsseiKgBPKZg==",
+ "dependencies": {
+ "dijkstrajs": "^1.0.1",
+ "encode-utf8": "^1.0.3",
+ "pngjs": "^5.0.0",
+ "yargs": "^15.3.1"
+ },
+ "bin": {
+ "qrcode": "bin/qrcode"
+ },
+ "engines": {
+ "node": ">=10.13.0"
+ }
+ },
+ "node_modules/qrcode/node_modules/cliui": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz",
+ "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==",
+ "dependencies": {
+ "string-width": "^4.2.0",
+ "strip-ansi": "^6.0.0",
+ "wrap-ansi": "^6.2.0"
+ }
+ },
+ "node_modules/qrcode/node_modules/strip-ansi": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "dependencies": {
+ "ansi-regex": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/qrcode/node_modules/wrap-ansi": {
+ "version": "6.2.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz",
+ "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==",
+ "dependencies": {
+ "ansi-styles": "^4.0.0",
+ "string-width": "^4.1.0",
+ "strip-ansi": "^6.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/qrcode/node_modules/yargs": {
+ "version": "15.4.1",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz",
+ "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==",
+ "dependencies": {
+ "cliui": "^6.0.0",
+ "decamelize": "^1.2.0",
+ "find-up": "^4.1.0",
+ "get-caller-file": "^2.0.1",
+ "require-directory": "^2.1.1",
+ "require-main-filename": "^2.0.0",
+ "set-blocking": "^2.0.0",
+ "string-width": "^4.2.0",
+ "which-module": "^2.0.0",
+ "y18n": "^4.0.0",
+ "yargs-parser": "^18.1.2"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/qrcode/node_modules/yargs-parser": {
+ "version": "18.1.3",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz",
+ "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==",
+ "dependencies": {
+ "camelcase": "^5.0.0",
+ "decamelize": "^1.2.0"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
"node_modules/qs": {
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz",
@@ -33440,6 +33539,11 @@
}
}
},
+ "dijkstrajs": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/dijkstrajs/-/dijkstrajs-1.0.3.tgz",
+ "integrity": "sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA=="
+ },
"dir-glob": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz",
@@ -33653,6 +33757,11 @@
"resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz",
"integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q=="
},
+ "encode-utf8": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/encode-utf8/-/encode-utf8-1.0.3.tgz",
+ "integrity": "sha512-ucAnuBEhUK4boH2HjVYG5Q2mQyPorvv0u/ocS+zhdw0S8AlHYY+GOFhP1Gio5z4icpP2ivFSvhtFjQi8+T9ppw=="
+ },
"encodeurl": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
@@ -34912,7 +35021,6 @@
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
"integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
- "dev": true,
"requires": {
"locate-path": "^5.0.0",
"path-exists": "^4.0.0"
@@ -39170,7 +39278,6 @@
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
"integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
- "dev": true,
"requires": {
"p-locate": "^4.1.0"
}
@@ -40288,7 +40395,6 @@
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
"integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
- "dev": true,
"requires": {
"p-limit": "^2.2.0"
}
@@ -40393,8 +40499,7 @@
"path-exists": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
- "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
- "dev": true
+ "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w=="
},
"path-is-absolute": {
"version": "1.0.1",
@@ -40563,6 +40668,11 @@
"resolved": "https://registry.npmjs.org/pn/-/pn-1.1.0.tgz",
"integrity": "sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA=="
},
+ "pngjs": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-5.0.0.tgz",
+ "integrity": "sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw=="
+ },
"pnp-webpack-plugin": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/pnp-webpack-plugin/-/pnp-webpack-plugin-1.5.0.tgz",
@@ -41589,6 +41699,74 @@
"resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz",
"integrity": "sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw=="
},
+ "qrcode": {
+ "version": "1.5.3",
+ "resolved": "https://registry.npmjs.org/qrcode/-/qrcode-1.5.3.tgz",
+ "integrity": "sha512-puyri6ApkEHYiVl4CFzo1tDkAZ+ATcnbJrJ6RiBM1Fhctdn/ix9MTE3hRph33omisEbC/2fcfemsseiKgBPKZg==",
+ "requires": {
+ "dijkstrajs": "^1.0.1",
+ "encode-utf8": "^1.0.3",
+ "pngjs": "^5.0.0",
+ "yargs": "^15.3.1"
+ },
+ "dependencies": {
+ "cliui": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz",
+ "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==",
+ "requires": {
+ "string-width": "^4.2.0",
+ "strip-ansi": "^6.0.0",
+ "wrap-ansi": "^6.2.0"
+ }
+ },
+ "strip-ansi": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "requires": {
+ "ansi-regex": "^5.0.1"
+ }
+ },
+ "wrap-ansi": {
+ "version": "6.2.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz",
+ "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==",
+ "requires": {
+ "ansi-styles": "^4.0.0",
+ "string-width": "^4.1.0",
+ "strip-ansi": "^6.0.0"
+ }
+ },
+ "yargs": {
+ "version": "15.4.1",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz",
+ "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==",
+ "requires": {
+ "cliui": "^6.0.0",
+ "decamelize": "^1.2.0",
+ "find-up": "^4.1.0",
+ "get-caller-file": "^2.0.1",
+ "require-directory": "^2.1.1",
+ "require-main-filename": "^2.0.0",
+ "set-blocking": "^2.0.0",
+ "string-width": "^4.2.0",
+ "which-module": "^2.0.0",
+ "y18n": "^4.0.0",
+ "yargs-parser": "^18.1.2"
+ }
+ },
+ "yargs-parser": {
+ "version": "18.1.3",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz",
+ "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==",
+ "requires": {
+ "camelcase": "^5.0.0",
+ "decamelize": "^1.2.0"
+ }
+ }
+ }
+ },
"qs": {
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz",
diff --git a/package.json b/package.json
index 0e4c7e7..d0ae962 100644
--- a/package.json
+++ b/package.json
@@ -26,6 +26,7 @@
"less": "^3.11.1",
"less-loader": "^5.0.0",
"moment": "^2.24.0",
+ "qrcode": "^1.5.3",
"react": "^16.13.1",
"react-canvas-nest": "^1.0.10",
"react-dom": "^16.13.1",
@@ -92,4 +93,4 @@
"pre-commit": "lint-staged"
}
}
-}
\ No newline at end of file
+}
diff --git a/src/api/index.ts b/src/api/index.ts
index ea40a39..2ab7fed 100644
--- a/src/api/index.ts
+++ b/src/api/index.ts
@@ -88,7 +88,75 @@ export default {
},
user_relation(data: object) {
return $axios.post('/admin/inviti', data)
- }
-
-
+ },
+ assets_review(data: object) {
+ return $axios.post('/admin/assetsReview', data)
+ },
+ profit_list(data: object) {
+ return $axios.post('/admin/profitList', data)
+ },
+ review_submit(data: object) {
+ return $axios.post('/admin/dataReview', data)
+ },
+ review_depositReview(data: object) {
+ return $axios.post('/admin/depositReview', data)
+ },
+ review_withdrawReview(data: object) {
+ return $axios.post('/admin/withdrawReview', data)
+ },
+ delete_nofity(data: object) {
+ return $axios.post('/admin/delMessageList', data)
+ },
+ add_nofity(data: object) {
+ return $axios.post('/admin/addMessageList', data)
+ },
+ update_nofity(data: object) {
+ return $axios.post('/admin/updMessageList', data)
+ },
+ add_receiveManage(data: object) {
+ return $axios.post('/admin/addPlatformDeposit', data)
+ },
+ delete_receiveManage(data: object) {
+ return $axios.post('/admin/delPlatformDeposit', data)
+ },
+ update_receiveManage(data: object) {
+ return $axios.post('/admin/updPlatformDeposit', data)
+ },
+ add_withdrawManage(data: object) {
+ return $axios.post('/admin/addWithdrawMethod', data)
+ },
+ delete_withdrawManage(data: object) {
+ return $axios.post('/admin/delWithdrawMethod', data)
+ },
+ update_withdrawManage(data: object) {
+ return $axios.post('/admin/updWithdrawMethod', data)
+ },
+ get_emailList(data: object) {
+ return $axios.post('/admin/emailList', data)
+ },
+ update_emailList(data: object) {
+ return $axios.post('/admin/updEmail', data)
+ },
+ get_simulationList(data: object) {
+ return $axios.post('/admin/levelList', data)
+ },
+ set_simulationList(data: object) {
+ return $axios.post('/admin/Updlevel', data)
+ },
+ get_emailRecord(data: object) {
+ return $axios.post('/admin/emailRecords', data)
+ },
+ get_operationRecord(data: object) {
+ return $axios.post('/admin/emailRecords', data)
+ },
+ get_walletRecord(data: object) {
+ return $axios.post('/admin/walletDetails', data)
+ },
+ get_googleBingCode(data: object) {
+ return $axios.post('/admin/authenticatorCode', data)
+ },
+ bind_googleCode(data: object) {
+ return $axios.post('/admin/bindAuthenticator', data)
+ },
}
+
diff --git a/src/pages/account-review/index.tsx b/src/pages/account-review/index.tsx
index 222b3da..72ff0d3 100644
--- a/src/pages/account-review/index.tsx
+++ b/src/pages/account-review/index.tsx
@@ -1,11 +1,31 @@
import api from "@/api"
import MyTable from "@/components/MyTable"
import { getTime } from "@/utils"
-import React from "react"
+import { EditOutlined } from "@ant-design/icons"
+import { Button, Input, Modal, notification } from "antd"
+import React, { useEffect, useRef, useState } from "react"
const AccountReview = () => {
+ const [visible, setVisible] = useState(false)
+ const [currentItem, setCurrentItem] = useState({} as any)
+ const tableRef = useRef(null)
+
const columns = [
+ {
+ title: '操作',
+ width: 100,
+ render: (row) => {
+ return row.status_code === 0 ? (
+
+ {
+ setCurrentItem(() => row)
+ setVisible(true)
+ }} />
+
+ ) : <>>
+ }
+ },
{ dataIndex: 'account', title: '帐号', width: 200 },
{ dataIndex: 'password', title: '密码', width: 200 },
{
@@ -17,12 +37,49 @@ const AccountReview = () => {
{ dataIndex: 'status', title: '状态' },
]
+ const handleReview = async (type: number) => {
+ setVisible(false)
+ const res: any = await api.review_submit({
+ status_code: type,
+ id: currentItem.id
+ })
+ if (res.code === 0) {
+ notification.success({
+ message: type === 1 ? '已拒绝' : '已同意'
+ })
+ tableRef.current.update()
+ }
+ }
+
+ useEffect(() => {
+ !visible && setCurrentItem({})
+ }, [visible])
+
return (
+
setVisible(false)}
+ title={`账号审核:${currentItem.account}`}
+ footer={() => null}
+ >
+ 账号:{currentItem.account}
+
+
密码:
+
{currentItem.password}
+
+
+
+
+
+
+
+
)
}
diff --git a/src/pages/assets-manage/assets-list.tsx b/src/pages/assets-manage/assets-list.tsx
index 9dfc3c5..4db1443 100644
--- a/src/pages/assets-manage/assets-list.tsx
+++ b/src/pages/assets-manage/assets-list.tsx
@@ -1,11 +1,32 @@
import api from "@/api"
import MyTable from "@/components/MyTable"
import { getTime } from "@/utils"
-import React from "react"
+import { EditOutlined } from "@ant-design/icons"
+import { Button, Form, Input, Modal, Switch, notification } from "antd"
+import React, { useEffect, useRef, useState } from "react"
const AssetsList = () => {
+ const [visible, setVisible] = useState(false)
+ const [currentItem, setCurrentItem] = useState({} as any)
+ const [form] = Form.useForm()
+ const currentType = useRef(1)
+ const tableRef = useRef(null)
+
const columns = [
+ {
+ title: '操作',
+ render: (row) => {
+ return row.status_code === 0 ? (
+
+ {
+ setCurrentItem(() => row)
+ setVisible(true)
+ }} />
+
+ ) : <>>
+ }
+ },
{
title: '状态',
dataIndex: 'status',
@@ -49,15 +70,55 @@ const AssetsList = () => {
dataIndex: 'review',
width: 200
},
-
]
+ useEffect(() => {
+ !visible && setCurrentItem({})
+ }, [visible])
+
+ const onFinish = async (values) => {
+ setVisible(false)
+ const res: any = await api.assets_review({
+ ...values,
+ id: currentItem.id,
+ status_code: currentType.current
+ })
+ if (res.code === 0) {
+ tableRef.current.update()
+ form.resetFields()
+ notification.success({
+ message: currentType.current === 1 ? '已拒绝' : '已同意'
+ })
+ }
+ }
+
return (
+ setVisible(false)}
+ footer={() => null}
+ title={`审核用户:${currentItem.email}`}
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
)
}
diff --git a/src/pages/assets-manage/profit-list.tsx b/src/pages/assets-manage/profit-list.tsx
new file mode 100644
index 0000000..5310428
--- /dev/null
+++ b/src/pages/assets-manage/profit-list.tsx
@@ -0,0 +1,45 @@
+import api from "@/api"
+import MyTable from "@/components/MyTable"
+import React from "react"
+
+const ProfitList = () => {
+
+ const columns = [
+ {
+ title: '金额',
+ dataIndex: 'amount',
+ width: 200
+ },
+ {
+ title: '订单号',
+ dataIndex: 'order',
+ width: 200
+ },
+ {
+ title: '来源',
+ dataIndex: 'source',
+ width: 200
+ },
+ {
+ title: '时间',
+ dataIndex: 'time',
+ render: (text) => new Date(text * 1000).toLocaleString(), // 将时间戳转换为人类可读的格式
+ width: 200
+ },
+ {
+ title: '类型',
+ dataIndex: 'type',
+ },
+ ]
+
+ return (
+
+
+
+ )
+}
+
+export default ProfitList
\ No newline at end of file
diff --git a/src/pages/chart/data.ts b/src/pages/chart/data.ts
deleted file mode 100644
index 12a4ff8..0000000
--- a/src/pages/chart/data.ts
+++ /dev/null
@@ -1,53 +0,0 @@
-import dagre from 'dagre';
-const edgeType = 'smoothstep';
-
-export const flattenTree = (tree) => {
- let stack = [tree];
- let nodes = [];
- let edges = [];
- while (stack.length > 0) {
- let node = stack.pop();
- nodes.push({ id: node.id, data: { ...node, label: `${node.name}` }, position: node.position });
- if (node.children && node.children.length > 0) {
- node.children.map(item => {
- edges.push({ source: node.id, target: item.id, id: item.id, type: edgeType, animated: true });
- stack.unshift(item);
- });
- };
- };
- return { nodes, edges };
-};
-
-export const getLayoutedElements = (nodes, edges, direction = 'TB') => {
- const dagreGraph = new dagre.graphlib.Graph();
- dagreGraph.setDefaultEdgeLabel(() => ({}));
-
- const nodeWidth = 172;
- const nodeHeight = 36;
- const isHorizontal = direction === 'LR';
- dagreGraph.setGraph({ rankdir: direction });
-
- nodes.forEach((node: any) => {
- dagreGraph.setNode(node.id, { width: nodeWidth, height: nodeHeight });
- });
-
- edges.forEach((edge: any) => {
- dagreGraph.setEdge(edge.source, edge.target);
- });
-
- dagre.layout(dagreGraph);
-
- nodes.forEach((node: any) => {
- const nodeWithPosition = dagreGraph.node(node.id);
- node.targetPosition = isHorizontal ? 'left' : 'top';
- node.sourcePosition = isHorizontal ? 'right' : 'bottom';
- node.position = {
- x: nodeWithPosition.x - nodeWidth / 2,
- y: nodeWithPosition.y - nodeHeight / 2,
- };
-
- return node;
- });
-
- return { nodes, edges };
-};
\ No newline at end of file
diff --git a/src/pages/chart/index.tsx b/src/pages/chart/index.tsx
index 9b3ab69..bd14199 100644
--- a/src/pages/chart/index.tsx
+++ b/src/pages/chart/index.tsx
@@ -6,7 +6,8 @@ import ReactFlow, {
useEdgesState,
Controls
} from 'react-flow-renderer';
-import { getLayoutedElements, flattenTree } from './data';
+
+import dagre from 'dagre';
import { Button, Form, Input, Modal, notification } from 'antd';
import api from '@/api';
@@ -54,7 +55,7 @@ const InviteChart: FC = () => {
return (
-
+
@@ -81,4 +82,73 @@ const InviteChart: FC = () => {
);
};
-export default InviteChart;
\ No newline at end of file
+const edgeType = 'smoothstep';
+
+const flattenTree = (tree) => {
+ let stack = [tree];
+ let nodes = [];
+ let edges = [];
+ while (stack.length > 0) {
+ let node = stack.pop();
+ nodes.push({
+ id: node.id, data: {
+ ...node, label: (
+
+
名称:{node.name}
+
邮箱:{node.email}
+
邀请码:{node.invitiCode}
+
级别:{node.level}
+
+ )
+ }, position: node.position, style: {
+ width: 260,
+ }
+ });
+ if (node.children && node.children.length > 0) {
+ node.children.map(item => {
+ edges.push({ source: node.id, target: item.id, id: item.id, type: edgeType, animated: true });
+ stack.unshift(item);
+ });
+ };
+ };
+ return { nodes, edges };
+};
+
+const getLayoutedElements = (nodes, edges, direction = 'TB') => {
+ const dagreGraph = new dagre.graphlib.Graph();
+ dagreGraph.setDefaultEdgeLabel(() => ({}));
+
+ const nodeWidth = 300;
+ const nodeHeight = 100;
+ const isHorizontal = direction === 'LR';
+ dagreGraph.setGraph({ rankdir: direction });
+
+ nodes.forEach((node: any) => {
+ dagreGraph.setNode(node.id, { width: nodeWidth, height: nodeHeight });
+ });
+
+ edges.forEach((edge: any) => {
+ dagreGraph.setEdge(edge.source, edge.target);
+ });
+
+ dagre.layout(dagreGraph);
+
+ console.log(dagreGraph);
+
+ nodes.forEach((node: any) => {
+ const nodeWithPosition = dagreGraph.node(node.id);
+ node.targetPosition = isHorizontal ? 'left' : 'top';
+ node.sourcePosition = isHorizontal ? 'right' : 'bottom';
+ node.position = {
+ x: nodeWithPosition.x - nodeWidth / 2,
+ y: nodeWithPosition.y - nodeHeight / 2,
+ };
+
+ return node;
+ });
+
+ return { nodes, edges };
+};
+
+export default InviteChart;
+
diff --git a/src/pages/google/index.tsx b/src/pages/google/index.tsx
new file mode 100644
index 0000000..71afe0f
--- /dev/null
+++ b/src/pages/google/index.tsx
@@ -0,0 +1,78 @@
+import api from "@/api"
+import { Button, Form, Input, notification } from "antd"
+import React, { useRef, useState } from "react"
+import QRcode from 'qrcode'
+
+const GoogleBind = () => {
+
+ const password = useRef(null)
+ const codeRef = useRef(null)
+
+ const [code, setCode] = useState('')
+ const [qrcode, setQrcode] = useState('')
+
+ const getCode = async () => {
+ const pwd = password.current.input.value;
+ if (!pwd) return notification.error({ message: '请输入密码!' })
+ const res: any = await api.get_googleBingCode({
+ password: pwd
+ })
+ if (res.code === 0) {
+ password.current.input.value = ''
+ setCode(res.data.url)
+ QRcode.toDataURL(res.data.url, (err, url) => {
+ setQrcode(url)
+ })
+ }
+ }
+
+ const bindCode = async () => {
+ const code = codeRef.current.input.value;
+
+ const res: any = await api.bind_googleCode({
+ code: Number(code)
+ })
+
+ if (res.code === 0) {
+ codeRef.current.input.value = '';
+ setCode('')
+ setQrcode('')
+ notification.success({
+ message: '绑定成功'
+ })
+ }
+ }
+
+ return (
+
+
第一步
+
+
+
+
+
+
+
+ {
+ qrcode && (
+
+
第二步
+
+
+
+
+
+
+
+
+
+
+
+
+ )
+ }
+
+ )
+}
+
+export default GoogleBind
\ No newline at end of file
diff --git a/src/pages/review/deposit.tsx b/src/pages/review/deposit.tsx
index 0f16edd..857b850 100644
--- a/src/pages/review/deposit.tsx
+++ b/src/pages/review/deposit.tsx
@@ -1,13 +1,34 @@
import api from "@/api"
import MyTable from "@/components/MyTable"
import { getTime } from "@/utils"
-import { Tooltip } from "antd"
+import { EditOutlined } from "@ant-design/icons"
+import { Button, Form, Input, Modal, Switch, Tooltip, notification } from "antd"
import { title } from "process"
-import React from "react"
+import React, { useRef, useState } from "react"
const DepositReview = () => {
+ const [visible, setVisible] = useState(false)
+ const [currentItem, setCurrentItem] = useState({} as any)
+ const tableRef = useRef(null)
+ const currentType = useRef(1)
+ const [form] = Form.useForm()
+
const columns = [
+ {
+ title: '操作',
+ width: 100,
+ render: (row) => {
+ return row.status_code === 0 ? (
+
+ {
+ setCurrentItem(() => row)
+ setVisible(true)
+ }} />
+
+ ) : <>>
+ }
+ },
{
title: '状态',
dataIndex: 'status',
@@ -53,13 +74,66 @@ const DepositReview = () => {
dataIndex: 'order'
},
]
+ console.log(currentItem);
+
+ const onFinish = async (values) => {
+ setVisible(false)
+ const res: any = await api.review_depositReview({
+ ...values,
+ id: currentItem.id,
+ status_code: currentType.current
+ })
+ if (res.code === 0) {
+ tableRef.current.update()
+ form.resetFields()
+ notification.success({
+ message: currentType.current === 1 ? '已拒绝' : '已同意'
+ })
+ }
+ }
return (
+
+
setVisible(false)}
+ footer={() => null}
+ title={`存款审核:${currentItem.email}`}
+ >
+
+ {currentItem.email}
+
+
+ {currentItem.symbol}
+
+
+ {currentItem.deposit_method}
+
+
+ }>
+ window.open(currentItem.url)} />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
)
}
diff --git a/src/pages/review/withdraw.tsx b/src/pages/review/withdraw.tsx
index bdd5467..9d01229 100644
--- a/src/pages/review/withdraw.tsx
+++ b/src/pages/review/withdraw.tsx
@@ -1,11 +1,33 @@
import api from "@/api"
import MyTable from "@/components/MyTable"
import { getTime } from "@/utils"
-import React from "react"
+import { EditOutlined } from "@ant-design/icons"
+import { Button, Form, Input, Modal, Switch, notification } from "antd"
+import React, { useRef, useState } from "react"
const WithdrawReview = () => {
+ const [visible, setVisible] = useState(false)
+ const [currentItem, setCurrentItem] = useState({} as any)
+ const tableRef = useRef(null)
+ const currentType = useRef(1)
+ const [form] = Form.useForm()
+
const columns = [
+ {
+ title: '操作',
+ width: 100,
+ render: (row) => {
+ return row.status_code === 0 ? (
+
+ {
+ setCurrentItem(() => row)
+ setVisible(true)
+ }} />
+
+ ) : <>>
+ }
+ },
{ "dataIndex": "Withdraw_method", "title": "取款方式" },
{ "dataIndex": "withdraw_source", "title": "取款来自" },
{ "dataIndex": "account", "title": "MT账户" },
@@ -21,12 +43,90 @@ const WithdrawReview = () => {
{ "dataIndex": "type", "title": "钱包类型" },
]
+
+ const onFinish = async (values) => {
+ setVisible(false)
+ const res: any = await api.review_withdrawReview({
+ ...values,
+ id: currentItem.id,
+ status_code: currentType.current
+ })
+ if (res.code === 0) {
+ tableRef.current.update()
+ form.resetFields()
+ notification.success({
+ message: currentType.current === 1 ? '已拒绝' : '已同意'
+ })
+ }
+ }
+
return (
)
}
diff --git a/src/pages/system-log/emailLog.tsx b/src/pages/system-log/emailLog.tsx
new file mode 100644
index 0000000..7a0ff17
--- /dev/null
+++ b/src/pages/system-log/emailLog.tsx
@@ -0,0 +1,56 @@
+import api from "@/api"
+import MyTable from "@/components/MyTable"
+import React from "react"
+
+const EmailLog = () => {
+
+ const columns = [
+ {
+ title: '接受帐号',
+ dataIndex: 'account',
+ width: 200,
+ },
+ {
+ title: '详细',
+ dataIndex: 'detail',
+ width: 200,
+ },
+ {
+ title: 'ID',
+ width: 200,
+ dataIndex: 'id',
+ },
+ {
+ title: '状态',
+ width: 200,
+ dataIndex: 'status',
+ },
+ {
+ title: '时间',
+ width: 200,
+ dataIndex: 'time',
+ render: (text) => new Date(text * 1000).toLocaleString(), // 将时间戳转换为人类可读的格式
+ },
+ {
+ title: '标题',
+ width: 200,
+ dataIndex: 'title',
+ },
+ {
+ title: '类型',
+ dataIndex: 'type',
+ },
+ ];
+
+
+ return (
+
+
+
+ )
+}
+
+export default EmailLog
\ No newline at end of file
diff --git a/src/pages/system-log/operationLog.tsx b/src/pages/system-log/operationLog.tsx
new file mode 100644
index 0000000..0b8f7e3
--- /dev/null
+++ b/src/pages/system-log/operationLog.tsx
@@ -0,0 +1,56 @@
+import api from "@/api"
+import MyTable from "@/components/MyTable"
+import React from "react"
+
+const OperationLog = () => {
+
+ const columns = [
+ {
+ title: '接受帐号',
+ dataIndex: 'account',
+ width: 260
+ },
+ {
+ title: '详细',
+ dataIndex: 'detail',
+ width: 200
+ },
+ {
+ title: 'ID',
+ dataIndex: 'id',
+ width: 200
+ },
+ {
+ title: '状态',
+ dataIndex: 'status',
+ width: 200
+ },
+ {
+ title: '时间',
+ dataIndex: 'time',
+ render: (text) => new Date(text * 1000).toLocaleString(), // 将时间戳转换为人类可读的格式
+ width: 200
+ },
+ {
+ title: '标题',
+ dataIndex: 'title',
+ width: 200
+ },
+ {
+ title: '类型',
+ dataIndex: 'type',
+ },
+ ];
+
+
+ return (
+
+
+
+ )
+}
+
+export default OperationLog
\ No newline at end of file
diff --git a/src/pages/system-log/walletLog.tsx b/src/pages/system-log/walletLog.tsx
new file mode 100644
index 0000000..838f8d1
--- /dev/null
+++ b/src/pages/system-log/walletLog.tsx
@@ -0,0 +1,57 @@
+import api from "@/api"
+import MyTable from "@/components/MyTable"
+import React, { useRef } from "react"
+
+const WalletLog = () => {
+
+ const tableRef = useRef(null)
+ const columns = [
+ {
+ title: '金额',
+ dataIndex: 'amount',
+ width: 200
+ },
+ {
+ title: '剩余金额',
+ dataIndex: 'balance',
+ width: 200
+ },
+ {
+ title: 'MT帐号',
+ dataIndex: 'count',
+ width: 200
+ },
+ {
+ title: 'ID',
+ dataIndex: 'id',
+ width: 200
+ },
+ {
+ title: '流水号',
+ dataIndex: 'order',
+ width: 200
+ },
+ {
+ title: '时间',
+ dataIndex: 'time',
+ render: (text) => new Date(text * 1000).toLocaleString(), // 将时间戳转换为人类可读的格式
+ },
+ {
+ title: '类型',
+ dataIndex: 'type',
+ },
+ ];
+
+
+ return (
+
+
+
+ )
+}
+
+export default WalletLog
\ No newline at end of file
diff --git a/src/pages/system/email-list.tsx b/src/pages/system/email-list.tsx
new file mode 100644
index 0000000..631be7d
--- /dev/null
+++ b/src/pages/system/email-list.tsx
@@ -0,0 +1,92 @@
+import api from "@/api"
+import MyTable from "@/components/MyTable"
+import { EditOutlined } from "@ant-design/icons"
+import { Button, Form, Modal, notification } from "antd"
+import TextArea from "antd/lib/input/TextArea"
+import React, { useRef, useState } from "react"
+
+const EmailList = () => {
+
+ const [visible, setVisible] = useState(false)
+ const currentItem = useRef({} as any)
+ const tableRef = useRef(null)
+ const [form] = Form.useForm()
+
+ const columns = [
+ {
+ title: '操作',
+ width: 100,
+ render: (row) => {
+ return (
+
+ updateNotify(row)} />
+
+ );
+ }
+ },
+ {
+ title: '标题',
+ dataIndex: 'title',
+ width: 200
+ },
+ {
+ title: '内容',
+ dataIndex: 'content',
+ render: (content) => (
+ {content}
+ )
+ }
+ ]
+
+ const updateNotify = (item) => {
+ currentItem.current = item;
+ form.setFieldsValue(item)
+ setVisible(true)
+ }
+
+ const onFinish = async (values) => {
+ setVisible(false)
+ const res: any = await api.update_emailList({
+ ...values,
+ id: currentItem.current.id
+ })
+ if (res.code === 0) {
+ tableRef.current.update()
+ form.resetFields()
+ notification.success({
+ message: "修改成功"
+ })
+ }
+ }
+
+ return (
+
+
+ setVisible(false)}
+ title={`修改《${currentItem.current.title}》邮件模版`}
+ footer={() => null}
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
+ )
+}
+
+export default EmailList
\ No newline at end of file
diff --git a/src/pages/system/notify.tsx b/src/pages/system/notify.tsx
index 6444d7d..650f62c 100644
--- a/src/pages/system/notify.tsx
+++ b/src/pages/system/notify.tsx
@@ -1,12 +1,33 @@
import api from "@/api"
import MyTable from "@/components/MyTable"
import { getTime } from "@/utils"
-import { Tooltip } from "antd"
-import React from "react"
+import { DeleteFilled, EditOutlined } from "@ant-design/icons"
+import { Button, Form, Input, Modal, Popconfirm, Switch, Tooltip, notification } from "antd"
+import React, { useEffect, useRef, useState } from "react"
const SystemNofify = () => {
+ const tableRef = useRef(null)
+ const [visbleModel, setVisibleModal] = useState(false)
+ const [form] = Form.useForm()
+ const currentType = useRef('')
+ const currentItem = useRef({} as any)
+
const columns = [
+ {
+ title: '操作',
+ width: 100,
+ render: (row) => {
+ return (
+
+
updateNotify(row)} />
+ deleteNotify(row)}>
+
+
+
+ );
+ }
+ },
{
"dataIndex": "title", "title": "标题", width: 340, render: (text) => (
@@ -25,12 +46,96 @@ const SystemNofify = () => {
{ "dataIndex": "time", "title": "时间", render: (time) => ({getTime(time * 1000)}
) },
]
+ const updateNotify = async (item) => {
+ currentType.current = 'update';
+ currentItem.current = item;
+ setVisibleModal(true)
+ form.setFieldsValue({
+ title: item.title,
+ content: item.content,
+ status_code: item.status_code === 1 ? true : false
+ })
+ }
+
+ const deleteNotify = async (item) => {
+ const res: any = await api.delete_nofity({
+ id: item.id
+ })
+ if (res.code === 0) {
+ notification.success({
+ message: '删除成功'
+ })
+ tableRef.current.update()
+ }
+ }
+
+ const onFinish = async (values) => {
+ setVisibleModal(false)
+ const params = {
+ ...values,
+ status_code: values.status_code ? 1 : 2
+ }
+ let res: any = {};
+
+ if (currentType.current === 'update') {
+ params.id = currentItem.current.id
+ res = await api.update_nofity({
+ ...params
+ })
+ } else {
+ res = await api.add_nofity({
+ ...params
+ })
+ }
+
+ if (res.code === 0) {
+ notification.success({
+ message: currentType.current === 'update' ? '修改成功' : '添加成功'
+ })
+ tableRef.current.update()
+ form.resetFields()
+ }
+
+ }
+
return (
+
+
+ }
/>
+
+ {
+ currentType.current = 'add';
+ setVisibleModal(false)
+ }}
+ footer={() => null}
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
)
}
diff --git a/src/pages/system/receive.tsx b/src/pages/system/receive.tsx
index 2189963..1b78bfd 100644
--- a/src/pages/system/receive.tsx
+++ b/src/pages/system/receive.tsx
@@ -1,10 +1,32 @@
import api from "@/api"
import MyTable from "@/components/MyTable"
-import React from "react"
+import { DeleteFilled, EditOutlined } from "@ant-design/icons"
+import { Button, Form, Input, Modal, Popconfirm, Switch, notification } from "antd"
+import React, { useRef, useState } from "react"
const SystemReceive = () => {
+ const [visible, setVisible] = useState(false)
+ const currentType = useRef('' as 'update' | 'add')
+ const currentItem = useRef({} as any)
+ const [form] = Form.useForm()
+ const tableRef = useRef(null)
+
const columns = [
+ {
+ title: '操作',
+ width: 100,
+ render: (row) => {
+ return (
+
+
updateNotify(row)} />
+ deleteNotify(row)}>
+
+
+
+ );
+ }
+ },
{ "dataIndex": "address", "title": "钱包地址", width: 200 },
{ "dataIndex": "fee", "title": "手续费" },
{ "dataIndex": "name", "title": "名称", width: 200 },
@@ -13,12 +35,106 @@ const SystemReceive = () => {
{ "dataIndex": "type", "title": "钱包类型" }
]
+ const deleteNotify = async (item) => {
+ const res: any = await api.delete_receiveManage({
+ id: item.id
+ })
+ if (res.code === 0) {
+ notification.success({
+ message: '删除成功'
+ })
+ tableRef.current.update()
+ }
+ }
+
+ const onFinish = async (values) => {
+ setVisible(false)
+ const parmas = {
+ ...values,
+ status_code: values.status_code ? 1 : 2,
+ google_code: Number(values.google_code)
+ }
+ let res: any = {}
+
+ if (currentType.current === 'add') {
+ res = await api.add_receiveManage({
+ ...parmas
+ })
+ } else {
+ res = await api.update_receiveManage({
+ ...parmas,
+ id: currentItem.current.id
+ })
+ }
+
+ if (res.code === 0) {
+ tableRef.current.update()
+ notification.success({
+ message: currentType.current === 'add' ? '添加成功' : '修改成功'
+ })
+ form.resetFields()
+ }
+ }
+
+ const updateNotify = (item) => {
+ currentType.current = 'update';
+ currentItem.current = item;
+ form.setFieldsValue({
+ ...item,
+ status_code: item.status_code === 1 ? true : false
+ })
+ setVisible(true)
+ }
+
return (
+
+
+ }
/>
+ setVisible(false)}
+ footer={() => null}
+ title="添加平台收款"
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
)
}
diff --git a/src/pages/system/simulation-list.tsx b/src/pages/system/simulation-list.tsx
new file mode 100644
index 0000000..6827893
--- /dev/null
+++ b/src/pages/system/simulation-list.tsx
@@ -0,0 +1,156 @@
+import api from "@/api"
+import MyTable from "@/components/MyTable"
+import { EditOutlined } from "@ant-design/icons"
+import { Button, Form, Input, Modal, notification } from "antd"
+import React, { useRef, useState } from "react"
+
+const SimulationList = () => {
+
+ const currentItem = useRef({} as any)
+ const [form] = Form.useForm()
+ const [visible, setVisible] = useState(false)
+ const tableRef = useRef(null)
+
+ const columns = [
+ {
+ title: '操作',
+ width: 100,
+ render: (row) => {
+ return (
+
+ updateNotify(row)} />
+
+ );
+ }
+ },
+ {
+ title: '考核数量',
+ dataIndex: 'assess_num',
+ key: 'assess_num',
+ },
+ {
+ title: '佣金收益',
+ dataIndex: 'commis_income',
+ key: 'commis_income',
+ },
+ {
+ title: '直推考核业绩',
+ dataIndex: 'direct',
+ key: 'direct',
+ },
+ {
+ title: 'ID',
+ dataIndex: 'id',
+ key: 'id',
+ },
+ {
+ title: '级别',
+ dataIndex: 'level',
+ key: 'level',
+ },
+ {
+ title: '盈利分红',
+ dataIndex: 'profit_dividends',
+ key: 'profit_dividends',
+ },
+ {
+ title: '平级佣金',
+ dataIndex: 'same_commis',
+ key: 'same_commis',
+ },
+ {
+ title: '平级分红',
+ dataIndex: 'same_dividends',
+ key: 'same_dividends',
+ },
+ {
+ title: '团队考核级别',
+ dataIndex: 'team_level',
+ key: 'team_level',
+ },
+ // {
+ // title: '团队考核级别代码',
+ // dataIndex: 'team_level_code',
+ // key: 'team_level_code',
+ // },
+ {
+ title: '团队考核级别的数量',
+ dataIndex: 'team_num',
+ key: 'team_num',
+ },
+ ];
+
+ const updateNotify = (item) => {
+ currentItem.current = item;
+ form.setFieldsValue(item)
+ setVisible(true)
+ }
+
+ const onFinish = async (values) => {
+ setVisible(false)
+ const res: any = await api.set_simulationList({
+ ...values,
+ id: currentItem.current.id,
+ assess_num: Number(values.assess_num),
+ team_level_code: Number(values.team_level_code),
+ team_num: Number(values.team_num),
+ })
+ if (res.code === 0) {
+ tableRef.current.update()
+ form.resetFields()
+ notification.success({
+ message: '修改成功'
+ })
+ }
+ }
+
+ return (
+
+
+ setVisible(false)}
+ footer={() => null}
+ title="修改模拟参数"
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ )
+}
+
+export default SimulationList
\ No newline at end of file
diff --git a/src/pages/system/withdraw.tsx b/src/pages/system/withdraw.tsx
index 7868d59..3f7a51b 100644
--- a/src/pages/system/withdraw.tsx
+++ b/src/pages/system/withdraw.tsx
@@ -1,25 +1,139 @@
import api from "@/api"
import MyTable from "@/components/MyTable"
-import React from "react"
+import { DeleteFilled, EditOutlined } from "@ant-design/icons"
+import { Button, Form, Input, Modal, Popconfirm, Switch, notification } from "antd"
+import React, { useRef, useState } from "react"
const SystemWithdraw = () => {
+ const [visible, setVisible] = useState(false)
+ const currentType = useRef('' as 'update' | 'add')
+ const currentItem = useRef({} as any)
+ const [form] = Form.useForm()
+ const tableRef = useRef(null)
+
const columns = [
+ {
+ title: '操作',
+ width: 100,
+ render: (row) => {
+ return (
+
+
updateNotify(row)} />
+ deleteNotify(row)}>
+
+
+
+ );
+ }
+ },
{ "dataIndex": "fee", "title": "手续费", width: 200 },
- { "dataIndex": "leastAmount", "title": "最小金额", width: 200 },
- { "dataIndex": "maxAmount", "title": "最大金额", width: 200 },
+ { "dataIndex": "LeastAmount", "title": "最小金额", width: 200 },
+ { "dataIndex": "MaxAmount", "title": "最大金额", width: 200 },
{ "dataIndex": "name", "title": "名称", width: 200 },
- { "dataIndex": "status", "title": "状态" },
+ { "dataIndex": "status", "title": "状态", width: 200 },
{ "dataIndex": "symbol", "title": "币符号" }
]
+ const deleteNotify = async (item) => {
+ const res: any = await api.delete_withdrawManage({
+ id: item.id
+ })
+ if (res.code === 0) {
+ notification.success({
+ message: '删除成功'
+ })
+ tableRef.current.update()
+ }
+ }
+
+ const onFinish = async (values) => {
+ setVisible(false)
+ const parmas = {
+ ...values,
+ status_code: values.status_code ? 1 : 2,
+ google_code: Number(values.google_code)
+ }
+ let res: any = {}
+
+ if (currentType.current === 'add') {
+ res = await api.add_withdrawManage({
+ ...parmas
+ })
+ } else {
+ res = await api.update_withdrawManage({
+ ...parmas,
+ id: currentItem.current.id
+ })
+ }
+
+ if (res.code === 0) {
+ tableRef.current.update()
+ notification.success({
+ message: currentType.current === 'add' ? '添加成功' : '修改成功'
+ })
+ form.resetFields()
+ }
+ }
+
+ const updateNotify = (item) => {
+ currentType.current = 'update';
+ currentItem.current = item;
+ form.setFieldsValue({
+ ...item,
+ status_code: item.status_code === 1 ? true : false
+ })
+ setVisible(true)
+ }
+
+
return (
+
+
+ }
/>
+ setVisible(false)}
+ footer={() => null}
+ title="添加取款方式"
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
)
}
diff --git a/src/pages/vip-manage/proxy-list.tsx b/src/pages/vip-manage/proxy-list.tsx
index 67f386d..6a0449a 100644
--- a/src/pages/vip-manage/proxy-list.tsx
+++ b/src/pages/vip-manage/proxy-list.tsx
@@ -125,6 +125,9 @@ const ProxyList = () => {
notification.success({
message: '添加成功'
});
+ setTimeout(() => {
+ tableRef.current.update();
+ }, 3000)
}
};
@@ -154,6 +157,7 @@ const ProxyList = () => {
{ title: 'MT余额', dataIndex: 'account_amount' },
{ title: '钱包余额', dataIndex: 'balance' },
{ title: '本金', dataIndex: 'principal' },
+ { title: '跟单账号', dataIndex: 'account_follow' },
{ title: '会员账号', dataIndex: 'email' },
{ title: '代理级别', dataIndex: 'level' },
{ title: '观察者密码', dataIndex: 'observer_password' },
diff --git a/src/route/routes.ts b/src/route/routes.ts
index 145b690..b6adad2 100644
--- a/src/route/routes.ts
+++ b/src/route/routes.ts
@@ -13,6 +13,13 @@ import SystemNotify from "@/pages/system/notify"
import SystemReceive from "@/pages/system/receive"
import AccountReview from "@/pages/account-review"
import InviteChart from "@/pages/chart"
+import ProfitList from "@/pages/assets-manage/profit-list"
+import EmailList from "@/pages/system/email-list"
+import SimulationList from "@/pages/system/simulation-list"
+import EmailLog from "@/pages/system-log/emailLog"
+import OperationLog from "@/pages/system-log/operationLog"
+import WalletLog from "@/pages/system-log/walletLog"
+import GoogleBind from "@/pages/google"
const routes = [
{
@@ -49,6 +56,22 @@ const routes = [
component: SystemNotify,
routes: []
},
+ {
+ path: '/email-list',
+ name: '邮件模版',
+ exact: true,
+ key: 'email-list',
+ component: EmailList,
+ routes: []
+ },
+ {
+ path: '/simulation-list',
+ name: '模拟参数设置',
+ exact: true,
+ key: 'simulation-list',
+ component: SimulationList,
+ routes: []
+ },
{
path: '/system-receive',
name: '平台收款管理',
@@ -108,6 +131,14 @@ const routes = [
key: 'assets-list',
component: AssetsList,
routes: []
+ },
+ {
+ path: '/profit-list',
+ name: '利润结算列表',
+ exact: true,
+ key: 'profit-list',
+ component: ProfitList,
+ routes: []
}
]
},
@@ -173,13 +204,52 @@ const routes = [
},
{
path: '/chart',
- name: '仪表盘',
+ name: '代理树',
exact: true,
key: 'chart',
- icon: HomeOutlined,
+ icon: SolutionOutlined,
component: InviteChart,
routes: []
},
+ {
+ path: '/system-log',
+ name: '系统日志',
+ exact: true,
+ key: 'system-log',
+ icon: SolutionOutlined,
+ type: 'subMenu',
+ routes: [
+ {
+ path: '/emailLog',
+ name: '邮件记录',
+ exact: true,
+ key: 'emailLog',
+ component: EmailLog,
+ },
+ {
+ path: '/operationLog',
+ name: '操作日志',
+ exact: true,
+ key: 'operationLog',
+ component: OperationLog,
+ },
+ {
+ path: '/walletLog',
+ name: '钱包明细',
+ exact: true,
+ key: 'walletLog',
+ component: WalletLog,
+ }
+ ]
+ },
+ {
+ path: '/google-bind',
+ name: '绑定谷歌验证器',
+ exact: true,
+ key: 'google-bind',
+ component: GoogleBind,
+ icon: SolutionOutlined,
+ }
]
diff --git a/src/utils/axios.ts b/src/utils/axios.ts
index 1066eb0..d9b16a6 100644
--- a/src/utils/axios.ts
+++ b/src/utils/axios.ts
@@ -12,8 +12,8 @@ interface AxiosConfig {
}
export const getBaseUrl = () => {
- return `http://203.161.61.234:8082/api/v1`
- // return `https://matontrading.com/api/v1`
+ // return `http://203.161.61.234:8082/api/v1`
+ return `https://matontrading.com/api/v1`
}
export const getOriginUrl = () => {