Procházet zdrojové kódy

be 初始化flask后端

master
Chunxian Zhang před 2 roky
rodič
revize
0bb16b6cb7
9 změnil soubory, kde provedl 82 přidání a 6 odebrání
  1. +5
    -1
      .gitignore
  2. +8
    -0
      lazy-timer-be/.idea/.gitignore
  3. +6
    -0
      lazy-timer-be/.idea/inspectionProfiles/profiles_settings.xml
  4. +19
    -0
      lazy-timer-be/.idea/lazy-timer-be.iml
  5. +4
    -0
      lazy-timer-be/.idea/misc.xml
  6. +8
    -0
      lazy-timer-be/.idea/modules.xml
  7. +6
    -0
      lazy-timer-be/.idea/vcs.xml
  8. +12
    -0
      lazy-timer-be/app.py
  9. +14
    -5
      lazy-timer-fe/src/pages/Ecommerce.jsx

+ 5
- 1
.gitignore Zobrazit soubor

@ -1,2 +1,6 @@
webui
node_modules
node_modules
*.pyc
*~
__pycache__
.DS_Store

+ 8
- 0
lazy-timer-be/.idea/.gitignore Zobrazit soubor

@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

+ 6
- 0
lazy-timer-be/.idea/inspectionProfiles/profiles_settings.xml Zobrazit soubor

@ -0,0 +1,6 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>

+ 19
- 0
lazy-timer-be/.idea/lazy-timer-be.iml Zobrazit soubor

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="Flask">
<option name="enabled" value="true" />
</component>
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="TemplatesService">
<option name="TEMPLATE_CONFIGURATION" value="Jinja2" />
<option name="TEMPLATE_FOLDERS">
<list>
<option value="$MODULE_DIR$/../lazy-timer-be\templates" />
</list>
</option>
</component>
</module>

+ 4
- 0
lazy-timer-be/.idea/misc.xml Zobrazit soubor

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.8 (lazy-timer-be)" project-jdk-type="Python SDK" />
</project>

+ 8
- 0
lazy-timer-be/.idea/modules.xml Zobrazit soubor

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/lazy-timer-be.iml" filepath="$PROJECT_DIR$/.idea/lazy-timer-be.iml" />
</modules>
</component>
</project>

+ 6
- 0
lazy-timer-be/.idea/vcs.xml Zobrazit soubor

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
</component>
</project>

+ 12
- 0
lazy-timer-be/app.py Zobrazit soubor

@ -0,0 +1,12 @@
from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello_world(): # put application's code here
return 'Hello World!'
if __name__ == '__main__':
app.run()

+ 14
- 5
lazy-timer-fe/src/pages/Ecommerce.jsx Zobrazit soubor

@ -20,6 +20,7 @@ const Ecommerce = () => {
return (
<div className="mt-24">
{/* 第一行四个盒子 */}
<div className="flex flex-wrap lg:flex-nowrap justify-center ">
<div className="bg-white dark:text-gray-200 dark:bg-secondary-dark-bg h-44 rounded-xl w-full lg:w-80 p-8 pt-9 m-3 bg-hero-pattern bg-no-repeat bg-cover bg-center">
<div className="flex justify-between items-center">
@ -27,6 +28,9 @@ const Ecommerce = () => {
<p className="font-bold text-gray-400">Earnings</p>
<p className="text-2xl">$63,448.78</p>
</div>
{/* 模范button组件 */}
<button
type="button"
style={{ backgroundColor: currentColor }}
@ -34,6 +38,8 @@ const Ecommerce = () => {
>
<BsCurrencyDollar />
</button>
</div>
<div className="mt-6">
<Button
@ -46,7 +52,7 @@ const Ecommerce = () => {
</div>
<div className="flex m-3 flex-wrap justify-center gap-1 items-center">
{earningData.map((item) => (
<div key={item.title} className="bg-white h-44 dark:text-gray-200 dark:bg-secondary-dark-bg md:w-56 p-4 pt-9 rounded-2xl ">
<div key={item.title} className="bg-white h-44 dark:text-gray-200 dark:bg-secondary-dark-bg md:w-56 p-4 pt-9 rounded-2xl ">
<button
type="button"
style={{ color: item.iconColor, backgroundColor: item.iconBg }}
@ -66,8 +72,10 @@ const Ecommerce = () => {
</div>
</div>
{/* 第二行放一个时间轴图表组件 */}
<div className="flex gap-10 flex-wrap justify-center">
<div className="bg-white dark:text-gray-200 dark:bg-secondary-dark-bg m-3 p-4 rounded-2xl md:w-780 ">
{/* 实际的盒子 */}
<div className="bg-white dark:text-gray-200 dark:bg-secondary-dark-bg m-3 p-4 rounded-2xl" >
<div className="flex justify-between">
<p className="font-semibold text-xl">Revenue Updates</p>
<div className="flex items-center gap-4">
@ -103,7 +111,7 @@ const Ecommerce = () => {
</div>
<div className="mt-5">
<SparkLine currentColor={currentColor} id="line-sparkLine" type="Line" height="80px" width="250px" data={SparklineAreaData} color={currentColor} />
<SparkLine currentColor={currentColor} id="line-sparkLine" type="Line" height="80px" width="800px" data={SparklineAreaData} color={currentColor} />
</div>
<div className="mt-10">
<Button
@ -114,12 +122,13 @@ const Ecommerce = () => {
/>
</div>
</div>
<div>
<Stacked currentMode={currentMode} width="320px" height="360px" />
</div>
</div>
</div>
<div>
{/* <div>
<div
className=" rounded-2xl md:w-400 p-4 m-3"
style={{ backgroundColor: currentColor }}
@ -148,7 +157,7 @@ const Ecommerce = () => {
<Pie id="pie-chart" data={ecomPieChartData} legendVisiblity={false} height="160px" />
</div>
</div>
</div>
</div> */}
</div>
<div className="flex gap-10 m-4 flex-wrap justify-center">

Načítá se…
Zrušit
Uložit