diff --git a/package.json b/package.json
index 655bf7e..14d9265 100644
--- a/package.json
+++ b/package.json
@@ -56,6 +56,7 @@
"@formily/antd": "^2.0.7",
"@formily/core": "^2.0.7",
"@formily/react": "^2.0.7",
+ "@metamask/detect-provider": "^1.2.0",
"@umijs/route-utils": "^2.0.3",
"ahooks": "^2.10.14",
"antd": "^4.17.2",
@@ -63,6 +64,8 @@
"bignumber.js": "^9.0.0",
"braft-editor": "^2.3.9",
"classnames": "^2.2.6",
+ "echarts": "^5.3.3",
+ "echarts-for-react": "^3.0.2",
"lodash": "^4.17.11",
"moment": "^2.29.4",
"omit.js": "^2.0.2",
@@ -73,7 +76,8 @@
"react-dom": "^17.0.0",
"react-helmet-async": "^1.0.4",
"umi": "^3.5.0",
- "umi-serve": "^1.9.10"
+ "umi-serve": "^1.9.10",
+ "web3": "^1.7.5"
},
"devDependencies": {
"@ant-design/pro-cli": "^2.0.2",
diff --git a/src/constants/enum/timeType.ts b/src/constants/enum/timeType.ts
new file mode 100644
index 0000000..326e3b6
--- /dev/null
+++ b/src/constants/enum/timeType.ts
@@ -0,0 +1,6 @@
+export enum TimeType {
+ DAY = 'day',
+ WEEK = 'week',
+ MONTH = 'month',
+}
+export default TimeType;
diff --git a/src/pages/DataBoard/ActiveAnalysis/List/index.tsx b/src/pages/DataBoard/ActiveAnalysis/List/index.tsx
new file mode 100644
index 0000000..eee4ec0
--- /dev/null
+++ b/src/pages/DataBoard/ActiveAnalysis/List/index.tsx
@@ -0,0 +1,102 @@
+import React, { useRef, useState } from 'react';
+import echarts from 'echarts/lib/echarts';
+import {
+ getActiveData,
+ getMonthUserData,
+ getOldUserData,
+ getTodayUserData,
+ getWeekUserData,
+} from '@/services/dataBorad/activeAnalysis';
+import MoreData from '@/widget/MoreData';
+import ReactEcharts from 'echarts-for-react';
+import { Card, Col, Row, Select } from 'antd';
+const ActiveAnalysis: React.FC = () => {
+ const { Option } = Select;
+ const [timeType, setTimeType] = useState('day');
+ const getData = async (func) => {
+ const res = await func({});
+ return res.data;
+ };
+
+ const [data, setData] = useState(getData(getTodayUserData));
+ const [oldUserData, setOldUserData] = useState(getData(getOldUserData));
+ const [weekData, setWeekData] = useState(getData(getWeekUserData));
+ const [monthData, setMonthData] = useState(getData(getMonthUserData));
+
+ const getOption = async (item = 'day') => {
+ const res = await getActiveData({ time_type: item });
+ const xData: any = [];
+ const seriesData: any = [];
+ res.data.foreach((item: any) => {
+ xData.push(item.time);
+ seriesData.push(item.dwn);
+ });
+ const option = {
+ xAxis: {
+ type: 'category',
+ data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
+ // data: xData,
+ },
+ yAxis: {
+ type: 'value',
+ },
+ series: [
+ {
+ data: [150, 230, 224, 218, 135, 147, 360],
+ // data: seriesData.reverse(),
+ type: 'line',
+ },
+ ],
+ };
+ return option;
+ };
+ const [option, setOption] = useState(getOption);
+ const setTimeOption = (val: any) => {
+ setTimeType(val);
+ setOption(getOption(val));
+ };
+
+ return (
+
+
+
+ {MoreData(data, '今日活跃用户数')}
+
+
+ {MoreData(oldUserData, '今日登录老用户数')}
+
+
+ {MoreData(weekData, 'WAU(本周去重人数)')}
+
+
+ {MoreData(monthData, 'MAU(本月去重人数)')}
+
+
+
+
+
+ 登陆人数数据图
+
+
+
+
+
+
+
+
+ );
+};
+
+export default ActiveAnalysis;
diff --git a/src/pages/DataBoard/CoreData/List/index.tsx b/src/pages/DataBoard/CoreData/List/index.tsx
new file mode 100644
index 0000000..5c1254e
--- /dev/null
+++ b/src/pages/DataBoard/CoreData/List/index.tsx
@@ -0,0 +1,145 @@
+import React, { useRef, useState } from 'react';
+import Table, { ProColumns, ActionType } from '@/components/Table';
+import moment from 'moment';
+import TimeType from '@/constants/enum/timeType';
+import { getData } from '@/utils/getData';
+import MoreData from '@/widget/MoreData';
+import {
+ getCoreData,
+ getPayData,
+ getTodayUserData,
+ getMonthPayData,
+ getNewUserData,
+} from '@/services/dataBorad/coreData';
+import { Card, Col, Row, Select } from 'antd';
+const CoreData: React.FC = () => {
+ const tableRef = useRef();
+ const [timeType, setTimeType] = useState(TimeType.DAY);
+
+ // const [date, setDate] = useState(getData);
+ const [userDate, setUserDate] = useState(getData(getTodayUserData));
+ const [newUserdate, setNewUserDate] = useState(getData(getNewUserData));
+ const [payData, setPayDate] = useState(getData(getMonthPayData));
+ const [allPay, setAllPayDate] = useState(getData(getPayData));
+ const columns: ProColumns[] = [
+ {
+ title: '时间类型',
+ dataIndex: 'coinType',
+ hideInTable: true,
+ initialValue: TimeType.DAY,
+ renderFormItem: (item, { type, defaultRender, ...rest }, form) => {
+ return (
+