From d47fb7a47e5f8a5730df78870ebbcf26ace57199 Mon Sep 17 00:00:00 2001 From: MarkusJoe Date: Sun, 6 Feb 2022 13:02:11 +0800 Subject: [PATCH] feat: fix bug --- bin/core/__init__.py | 1 + bin/core/logger.py | 6 ------ bin/tests/base2img.py | 15 ++++----------- db/data.db | Bin 12288 -> 12288 bytes requirements.txt | 4 +++- static/index.html | 15 ++++++++++++--- templates/index.html | 5 +++-- 7 files changed, 23 insertions(+), 23 deletions(-) delete mode 100644 bin/core/logger.py diff --git a/bin/core/__init__.py b/bin/core/__init__.py index 3944db4..d4c17cc 100644 --- a/bin/core/__init__.py +++ b/bin/core/__init__.py @@ -4,3 +4,4 @@ # @Development Tool: PyCharm # @Create Time: 2022/2/5 # @File Name: __init__.py.py + diff --git a/bin/core/logger.py b/bin/core/logger.py deleted file mode 100644 index 3495169..0000000 --- a/bin/core/logger.py +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 -# -- coding:utf-8 -- -# @Author: markushammered@gmail.com -# @Development Tool: PyCharm -# @Create Time: 2022/2/6 -# @File Name: logger.py \ No newline at end of file diff --git a/bin/tests/base2img.py b/bin/tests/base2img.py index 5917832..e9db269 100644 --- a/bin/tests/base2img.py +++ b/bin/tests/base2img.py @@ -14,17 +14,10 @@ def convert() -> None: :return: """ # image转base64 - lst = [] - for i in range(10): - with open(f'../../static/theme/t2/{i}.svg', 'rb') as f: - base64_data = base64.b64encode(f.read()) - base64_code = 'data:image/jpeg;base64,' + base64_data.decode('utf-8') - lst.append(base64_code) - - print(lst) - - for i in lst: - print(i) + with open(f'../../static/example.png', 'rb') as f: + base64_data = base64.b64encode(f.read()) + base64_code = 'data:image/jpeg;base64,' + base64_data.decode('utf-8') + print(base64_code) convert() diff --git a/db/data.db b/db/data.db index 7e1a6ed4d39909a4aed84d3b99519a3714e0bc73..95e4eaa348078fa8bbd2e960d3d81757f599b3ce 100644 GIT binary patch delta 130 zcmZojXh@hK%~(58#+k8pW5N=CE@u8)4E!JYpYY$>EGTe--$IbRID>&Q}E#hKeU|{CI$H4!b|1
- 看到这句话就说明程序正常运行啦!! +
+
+ 看到这句话就说明程序正常运行啦!! 文档
本服务使用Python-Flask开发(Flask 官方地址:Flask )
调用示例: 127.0.0.1:5000/API?name=main 注: 调用支持POST 和 GET 方法请求
- 已经搭建好的私人服务器调用地址:PythonAnyWhere -
数字图片作者: 碎蜂
项目开源协议: Apache-2.0 即: @@ -27,6 +30,12 @@
你可以在注明来源版权信息的情况下对源代码进行任意分发和修改以及衍生
+
+

效果应该是这样的:

+ example +
+ (这只是一张图片) +
\ No newline at end of file diff --git a/templates/index.html b/templates/index.html index 5cffbc9..949520c 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,6 +1,6 @@ - -Request Counter - {{ title }} + +Flask Counter - {{ title }} @@ -9,4 +9,5 @@ + \ No newline at end of file