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 + 在隐身