From ef195e70b0b6dcdd7a23af8c49b7e07aa0ca901f Mon Sep 17 00:00:00 2001 From: Chunxian Zhang <1836891291@qq.com> Date: Mon, 5 Sep 2022 08:55:50 +0800 Subject: [PATCH] =?UTF-8?q?be=20=E5=AE=8C=E6=88=90=E6=8A=98=E7=BA=BF?= =?UTF-8?q?=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lazy-timer-be/app.py | 9 +- lazy-timer-fe/src/components/Navbar.jsx | 4 +- lazy-timer-fe/src/components/Sidebar.jsx | 3 +- lazy-timer-fe/src/data/avatar.jpg | Bin 6382 -> 21483 bytes lazy-timer-fe/src/pages/Charts/Bar.jsx | 7 +- lazy-timer-fe/src/pages/Charts/Line.jsx | 247 +++++++++++++++++++++- lazy-timer-fe/src/pages/Customers.jsx | 2 +- lazy-timer-fe/src/service/getDayActivity/index.js | 7 + 8 files changed, 258 insertions(+), 21 deletions(-) create mode 100644 lazy-timer-fe/src/service/getDayActivity/index.js diff --git a/lazy-timer-be/app.py b/lazy-timer-be/app.py index b316107..d07a984 100644 --- a/lazy-timer-be/app.py +++ b/lazy-timer-be/app.py @@ -77,4 +77,11 @@ def getDayScreenUseTime(): getScreenTimeSpanM, getScreenTimeSpanS = divmod(screenTimeSpan, 60) # 每日屏幕使用时长, 分时秒 getScreenTimeSpanH, getScreenTimeSpanM = divmod(getScreenTimeSpanM, 60) sendJson = {'getDayScreenUseTimeH': getDayScreenUseTimeH, 'getDayScreenUseTimeM': getDayScreenUseTimeM, 'getDayScreenUseTimeS': getDayScreenUseTimeS, 'firstScreenTime': firstScreenTime, 'lastScreenTime': lastScreenTime, 'getScreenTimeSpanH': getScreenTimeSpanH, 'getScreenTimeSpanM': getScreenTimeSpanM, 'getScreenTimeSpanS': getScreenTimeSpanS } - return json.dumps(sendJson, indent=4) \ No newline at end of file + return json.dumps(sendJson, indent=4) + +# @app.route('/getDayScreenUseTime', methods=['POST']) +# @cross_origin() +# def getDayScreenUseTime(): +# datetimeStr1 = json.loads(request.data) +# datetimeStr = datetimeStr1['datetimeStr'] +# struct_time = datetime.strptime(datetimeStr, "%Y-%m-%d").date() # 获取请求日期, struct_time数据类型为dateTime \ No newline at end of file diff --git a/lazy-timer-fe/src/components/Navbar.jsx b/lazy-timer-fe/src/components/Navbar.jsx index 1e23d14..70f33a9 100644 --- a/lazy-timer-fe/src/components/Navbar.jsx +++ b/lazy-timer-fe/src/components/Navbar.jsx @@ -69,9 +69,9 @@ const Navbar = () => { alt="user-profile" />

- Hi,{' '} + 嗨,{' '} - Michael + 在隐身

diff --git a/lazy-timer-fe/src/components/Sidebar.jsx b/lazy-timer-fe/src/components/Sidebar.jsx index a60c3dc..49618e9 100644 --- a/lazy-timer-fe/src/components/Sidebar.jsx +++ b/lazy-timer-fe/src/components/Sidebar.jsx @@ -25,7 +25,8 @@ const Sidebar = () => { <>
- Shoppy + Logo + 懒人记时