1
0

2 کامیت‌ها 87fcafd995 ... 6da17c0df7

نویسنده SHA1 پیام تاریخ
  鲁浩 6da17c0df7 demo 9 ماه پیش
  鲁浩 aa4749bdc2 delete 10 ماه پیش

+ 3 - 0
.gitignore

@@ -0,0 +1,3 @@
+server/flaskProject/logs/*
+server/flaskProject/__pycache__/*
+server/flaskProject/__pycache__/*/*

+ 1 - 1
server/flaskProject/MoneyRecord.py

@@ -128,7 +128,7 @@ def check(data):
     final_result = []
     i_start = int(start)
     i_end = int(end)
-    required_fields = ['id', 'cash_type', 'des', 'kind', 'location', 'mount', 'paytime', 'uid']
+    required_fields = ['id', 'cash_type', 'des', 'kind', 'location', 'mount', 'paytime', 'uid', 'noteid']
     for r in result:
         if i_start <= r[6] <= i_end:
             temp = {}

BIN
server/flaskProject/__pycache__/data.cpython-311.pyc


BIN
server/flaskProject/__pycache__/user.cpython-311.pyc


+ 11 - 2
server/flaskProject/app.py

@@ -1,6 +1,7 @@
 import os
 from flask import Flask, request
 from MoneyRecord import MoneyRecord
+from task import TikTask
 from user import User
 import logging
 from logging.handlers import TimedRotatingFileHandler
@@ -28,6 +29,12 @@ def money_action(action):
     return r
 
 
+@app.route('/task/<action>', methods=['POST'])
+def tik_task_action(action):
+    data = request.get_json()
+    r = TikTask(action=action, data=data, logger=logger).tik_task_router()
+    return r
+
 class CustomLogger:
     def __init__(self, log_file):
         self.log_file = log_file
@@ -64,6 +71,8 @@ day = current_date.day
 # 将年月日格式化为字符串
 formatted_date = current_date.strftime("%Y-%m-%d")
 logger = CustomLogger(f'{os.path.dirname(__file__)}/logs/{formatted_date}.log')
+
+
 # logger = CustomLogger(f'/Users/jasonphd/Desktop/gogs/JasonPhdWork/server/flaskProject/logs{formatted_date}.log')
 # logger = CustomLogger(f'/root/api_server/JasonPhdWork/app/logs/{formatted_date}.log')
 
@@ -72,9 +81,9 @@ logger = CustomLogger(f'{os.path.dirname(__file__)}/logs/{formatted_date}.log')
 @app.before_request
 def log_request_info():
     data = request.get_json()
-    data["intime"] = int (time.time())
+    data["intime"] = int(time.time())
     logger.log(f"url:{request.url} params:{data} method:{request.method} ip:{request.remote_addr}")
 
 
 if __name__ == '__main__':
-    app.run(host='0.0.0.0',port=5005)
+    app.run(host='0.0.0.0', port=5005)

+ 0 - 69
server/flaskProject/logs/2024-02-26.log

@@ -1,69 +0,0 @@
-2024-02-26 INFO: url:http://127.0.0.1:5000/user/login params:{'login_type': '1', 'account': 'jasonphd', 'password': 'jasonphd', 'uuid': 'xixixixix'} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/user/login params:{'login_type': '1', 'account': 'jasonphd', 'password': 'jasonphd', 'uuid': 'xixixixix'} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/user/t params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA4NjgyMzE2fQ.xU0DZOE-RoPl0QkQnlbn-b51aZkIBM0-3U_NgoIn0ik', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453'} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/money/check params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA4NjgyMzE2fQ.xU0DZOE-RoPl0QkQnlbn-b51aZkIBM0-3U_NgoIn0ik', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453'} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/money/check params:{'token': '1'} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/money/insert params:{'token': '1'} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/money/insert params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA4NjgyMzE2fQ.xU0DZOE-RoPl0QkQnlbn-b51aZkIBM0-3U_NgoIn0ik', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453', 'kind': 1, 'mount': 12.0, 'des': '这是一瓶可乐', 'paytime': '1708916199', 'cash_type': 'CNY', 'location': '广州cbd'} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/money/insert params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA4NjgyMzE2fQ.xU0DZOE-RoPl0QkQnlbn-b51aZkIBM0-3U_NgoIn0ik', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453', 'kind': 1, 'mount': 12.0, 'des': '这是一瓶可乐', 'paytime': '1708916199', 'cash_type': 'CNY', 'location': '广州cbd'} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/money/insert params:{'token1': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA4NjgyMzE2fQ.xU0DZOE-RoPl0QkQnlbn-b51aZkIBM0-3U_NgoIn0ik', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453', 'kind': 1, 'mount': 12.0, 'des': '这是一瓶可乐', 'paytime': '1708916199', 'cash_type': 'CNY', 'location': '广州cbd'} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/money/insert params:{'token1': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA4NjgyMzE2fQ.xU0DZOE-RoPl0QkQnlbn-b51aZkIBM0-3U_NgoIn0ik', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453', 'kind': 1, 'mount': 12.0, 'des': '这是一瓶可乐', 'paytime': '1708916199', 'cash_type': 'CNY', 'location': '广州cbd'} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/money/insert params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA4NjgyMzE2fQ.xU0DZOE-RoPl0QkQnlbn-b51aZkIBM0-3U_NgoIn0ik', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453', 'kind': 1, 'mount': 12.0, 'des': '这是一瓶可乐', 'paytime': '1708916199', 'cash_type': 'CNY', 'location': '广州cbd'} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/money/insert params:{'token1': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA4NjgyMzE2fQ.xU0DZOE-RoPl0QkQnlbn-b51aZkIBM0-3U_NgoIn0ik', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453', 'kind': 1, 'mount': 12.0, 'des': '这是一瓶可乐', 'paytime': '1708916199', 'cash_type': 'CNY', 'location': '广州cbd'} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/money/insert params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA4NjgyMzE2fQ.xU0DZOE-RoPl0QkQnlbn-b51aZkIBM0-3U_NgoIn0ik', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453', 'kind1': 1, 'mount': 12.0, 'des': '这是一瓶可乐', 'paytime': '1708916199', 'cash_type': 'CNY', 'location': '广州cbd'} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/money/insert params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA4NjgyMzE2fQ.xU0DZOE-RoPl0QkQnlbn-b51aZkIBM0-3U_NgoIn0ik', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453', 'kind1': 1, 'mount': 12.0, 'des': '这是一瓶可乐', 'paytime': '1708916199', 'cash_type': 'CNY', 'location': '广州cbd'} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/money/insert params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA4NjgyMzE2fQ.xU0DZOE-RoPl0QkQnlbn-b51aZkIBM0-3U_NgoIn0ik', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453', 'kind': 1, 'mount': 12.0, 'des': '这是一瓶可乐', 'paytime': '1708916199', 'cash_type': 'CNY', 'location': '广州cbd'} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/money/insert params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA4NjgyMzE2fQ.xU0DZOE-RoPl0QkQnlbn-b51aZkIBM0-3U_NgoIn0ik', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453', 'kind': '', 'mount': 12.0, 'des': '这是一瓶可乐', 'paytime': '1708916199', 'cash_type': 'CNY', 'location': '广州cbd'} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/money/insert params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA4NjgyMzE2fQ.xU0DZOE-RoPl0QkQnlbn-b51aZkIBM0-3U_NgoIn0ik', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453', 'kind': 1, 'mount': 12.0, 'des': '这是一瓶可乐', 'paytime': '1708916199', 'cash_type': 'CNY', 'location': '广州cbd'} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/money/insert params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA4NjgyMzE2fQ.xU0DZOE-RoPl0QkQnlbn-b51aZkIBM0-3U_NgoIn0ik', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453', 'kind': 1, 'mount': 12.0, 'des': '这是一瓶可乐', 'paytime': '1708916199', 'cash_type': 'CNY', 'location': '广州cbd'} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/money/insert params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA4NjgyMzE2fQ.xU0DZOE-RoPl0QkQnlbn-b51aZkIBM0-3U_NgoIn0ik', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453', 'kind': 1, 'mount': 12.0, 'des': '这是一瓶可乐', 'paytime': '1708916199', 'cash_type': 'CNY', 'location': '广州cbd'} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/user/login params:{'login_type': '1', 'account': 'jasonphd', 'password': 'jasonphd', 'uuid': 'xixixixix'} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/user/login params:{'login_type': '1', 'account': 'jasonphd', 'password': 'jasonphd', 'uuid': 'xixixixix'} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/money/insert params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA5NTIzMDU4fQ.NCuC2uttC1Oqo6Kh5XiNvvtcD-fknPW8JVH7W1xjdoo', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453', 'kind': 1, 'mount': 12.0, 'des': '这是一瓶可乐', 'paytime': '1708916199', 'cash_type': 'CNY', 'location': '广州cbd'} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/money/insert params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA5NTIzMDU4fQ.NCuC2uttC1Oqo6Kh5XiNvvtcD-fknPW8JVH7W1xjdoo', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453', 'kind': 1, 'mount': 12.0, 'des': '这是一瓶可乐', 'paytime': '1708916199', 'cash_type': 'CNY', 'location': '广州cbd'} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/money/insert params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA5NTIzMDU4fQ.NCuC2uttC1Oqo6Kh5XiNvvtcD-fknPW8JVH7W1xjdoo', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453', 'kind': 1, 'mount': 12.0, 'des': '这是一瓶可乐', 'paytime': '1708916199', 'cash_type': 'CNY', 'location': '广州cbd'} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/money/check params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA5NTIzMDU4fQ.NCuC2uttC1Oqo6Kh5XiNvvtcD-fknPW8JVH7W1xjdoo', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453', 'start': '1707926400', 'end': '1708963200', 'type': 0} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/money/insert params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA5NTIzMDU4fQ.NCuC2uttC1Oqo6Kh5XiNvvtcD-fknPW8JVH7W1xjdoo', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453', 'kind': 3, 'mount': 2.0, 'des': '车费', 'paytime': '1708916242', 'cash_type': 'CNY', 'location': '农场'} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/money/insert params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA5NTIzMDU4fQ.NCuC2uttC1Oqo6Kh5XiNvvtcD-fknPW8JVH7W1xjdoo', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453', 'kind': 1, 'mount': 22.0, 'des': '车费', 'paytime': '1708916242', 'cash_type': 'CNY', 'location': '农场'} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/money/check params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA5NTIzMDU4fQ.NCuC2uttC1Oqo6Kh5XiNvvtcD-fknPW8JVH7W1xjdoo', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453', 'start': '1707926400', 'end': '1708963200', 'type': 0} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/money/check params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA5NTIzMDU4fQ.NCuC2uttC1Oqo6Kh5XiNvvtcD-fknPW8JVH7W1xjdoo', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453', 'start': '1707926400', 'end': '1708963200', 'type': 0} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/money/check params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA5NTIzMDU4fQ.NCuC2uttC1Oqo6Kh5XiNvvtcD-fknPW8JVH7W1xjdoo', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453', 'start': '1707926400', 'end': '1708963200', 'type': 0} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/money/check params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA5NTIzMDU4fQ.NCuC2uttC1Oqo6Kh5XiNvvtcD-fknPW8JVH7W1xjdoo', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453', 'start': '1707926400', 'end': '1708963200', 'type': 0} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/money/check params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA5NTIzMDU4fQ.NCuC2uttC1Oqo6Kh5XiNvvtcD-fknPW8JVH7W1xjdoo', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453', 'start': '1707926400', 'end': '1708963200', 'type': 0} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/money/check params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA5NTIzMDU4fQ.NCuC2uttC1Oqo6Kh5XiNvvtcD-fknPW8JVH7W1xjdoo', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453', 'start': '1707926400', 'end': '1708963200', 'type': 0} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/money/check params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA5NTIzMDU4fQ.NCuC2uttC1Oqo6Kh5XiNvvtcD-fknPW8JVH7W1xjdoo', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453', 'start': '1707926400', 'end': '1708963200', 'type': 0} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/money/check params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA5NTIzMDU4fQ.NCuC2uttC1Oqo6Kh5XiNvvtcD-fknPW8JVH7W1xjdoo', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453', 'start': '1707926400', 'end': '1708963200', 'type': 0} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/money/check params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA5NTIzMDU4fQ.NCuC2uttC1Oqo6Kh5XiNvvtcD-fknPW8JVH7W1xjdoo', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453', 'start': '1707926400', 'end': '1708963200', 'type': 0} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/money/check params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA5NTIzMDU4fQ.NCuC2uttC1Oqo6Kh5XiNvvtcD-fknPW8JVH7W1xjdoo', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453', 'start': '1707926400', 'end': '1708963200', 'type': 0} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/money/check params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA5NTIzMDU4fQ.NCuC2uttC1Oqo6Kh5XiNvvtcD-fknPW8JVH7W1xjdoo', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453', 'start': '1707926400', 'end': '1708963200', 'type': 0} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/money/check params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA5NTIzMDU4fQ.NCuC2uttC1Oqo6Kh5XiNvvtcD-fknPW8JVH7W1xjdoo', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453', 'start': '1707926400', 'end': '1708963200', 'type': 0} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/user/register params:{'login_type': '1', 'account': 'root', 'password': 'wyt615115@'} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/user/login params:{'login_type': '1', 'account': 'root', 'password': 'wyt615115@'} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/user/t params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA4NjgyMzE2fQ.xU0DZOE-RoPl0QkQnlbn-b51aZkIBM0-3U_NgoIn0ik', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453'} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/money/check params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA5NTIzMDU4fQ.NCuC2uttC1Oqo6Kh5XiNvvtcD-fknPW8JVH7W1xjdoo', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453', 'start': '1707926400', 'end': '1708963200', 'type': 1} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/money/check params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA5NTIzMDU4fQ.NCuC2uttC1Oqo6Kh5XiNvvtcD-fknPW8JVH7W1xjdoo', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453', 'start': '1707926400', 'end': '1708963200', 'type': 1} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/money/check params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA5NTIzMDU4fQ.NCuC2uttC1Oqo6Kh5XiNvvtcD-fknPW8JVH7W1xjdoo', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453', 'start': '1707926400', 'end': '1708963200', 'type': 1} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/money/check params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA5NTIzMDU4fQ.NCuC2uttC1Oqo6Kh5XiNvvtcD-fknPW8JVH7W1xjdoo', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453', 'start': '1707926400', 'end': '1708963200', 'type': 1} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/money/check params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA5NTIzMDU4fQ.NCuC2uttC1Oqo6Kh5XiNvvtcD-fknPW8JVH7W1xjdoo', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453', 'start': '1707926400', 'end': '1708963200', 'type': 1} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/money/check params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA5NTIzMDU4fQ.NCuC2uttC1Oqo6Kh5XiNvvtcD-fknPW8JVH7W1xjdoo', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453', 'start': '1707926400', 'end': '1708963200', 'type': 1} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/money/check params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA5NTIzMDU4fQ.NCuC2uttC1Oqo6Kh5XiNvvtcD-fknPW8JVH7W1xjdoo', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453', 'start': '1707926400', 'end': '1708963200', 'type': 1} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/money/check params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA5NTIzMDU4fQ.NCuC2uttC1Oqo6Kh5XiNvvtcD-fknPW8JVH7W1xjdoo', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453', 'start': '1707926400', 'end': '1708963200', 'type': 1} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/money/check params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA5NTIzMDU4fQ.NCuC2uttC1Oqo6Kh5XiNvvtcD-fknPW8JVH7W1xjdoo', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453', 'start': '1707926400', 'end': '1708963200', 'type': 1} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/money/check params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA5NTIzMDU4fQ.NCuC2uttC1Oqo6Kh5XiNvvtcD-fknPW8JVH7W1xjdoo', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453', 'start': '1707926400', 'end': '1708963200', 'type': 1} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/money/check params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA5NTIzMDU4fQ.NCuC2uttC1Oqo6Kh5XiNvvtcD-fknPW8JVH7W1xjdoo', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453', 'start': '1707926400', 'end': '1708963200', 'type': 1} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/money/check params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA5NTIzMDU4fQ.NCuC2uttC1Oqo6Kh5XiNvvtcD-fknPW8JVH7W1xjdoo', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453', 'start': '1707926400', 'end': '1708963200', 'type': 1} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/money/check params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA5NTIzMDU4fQ.NCuC2uttC1Oqo6Kh5XiNvvtcD-fknPW8JVH7W1xjdoo', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453', 'start': '1707926400', 'end': '1708963200', 'type': 1} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/money/check params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA5NTIzMDU4fQ.NCuC2uttC1Oqo6Kh5XiNvvtcD-fknPW8JVH7W1xjdoo', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453', 'start': '1707926400', 'end': '1708963200', 'type': 1} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/money/check params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA5NTIzMDU4fQ.NCuC2uttC1Oqo6Kh5XiNvvtcD-fknPW8JVH7W1xjdoo', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453', 'start': '1707926400', 'end': '1708916241', 'type': 1} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/money/insert params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA5NTIzMDU4fQ.NCuC2uttC1Oqo6Kh5XiNvvtcD-fknPW8JVH7W1xjdoo', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453', 'kind': 3, 'mount': 1122.0, 'des': '车费', 'paytime': '1708916244', 'cash_type': 'CNY', 'location': '农场'} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/money/check params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA5NTIzMDU4fQ.NCuC2uttC1Oqo6Kh5XiNvvtcD-fknPW8JVH7W1xjdoo', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453', 'start': '1707926400', 'end': '1708916241', 'type': 1} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/money/check params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA5NTIzMDU4fQ.NCuC2uttC1Oqo6Kh5XiNvvtcD-fknPW8JVH7W1xjdoo', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453', 'start': '1707926400', 'end': '1708916244', 'type': 1} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5000/money/check params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA5NTIzMDU4fQ.NCuC2uttC1Oqo6Kh5XiNvvtcD-fknPW8JVH7W1xjdoo', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453', 'start': '1707926400', 'end': '1708916244', 'type': 1} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5005/user/register params:{'login_type': '1', 'account': 'nike', 'password': 'wyt615115@'} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5005/user/login params:{'login_type': '1', 'account': 'nike', 'password': 'wyt615115@'} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5005/user/t params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiM2ZkMDE4MjAtY2FjZi00MDA4LWI0ZjAtNTU4MmJhNjIzZTQ0IiwiZXhwIjoxNzA5NTU0MjIxfQ.I-V6RI2vwOVXpfyqiYEsZuL8eFHbA3GlHwQAT73QS7c', 'uid': '3fd01820-cacf-4008-b4f0-5582ba623e44'} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5005/money/insert params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiM2ZkMDE4MjAtY2FjZi00MDA4LWI0ZjAtNTU4MmJhNjIzZTQ0IiwiZXhwIjoxNzA5NTU0MjIxfQ.I-V6RI2vwOVXpfyqiYEsZuL8eFHbA3GlHwQAT73QS7c', 'uid': '3fd01820-cacf-4008-b4f0-5582ba623e44', 'kind': 3, 'mount': 2222.0, 'des': 'swimming', 'paytime': '1708916244', 'cash_type': 'CNY', 'location': '农场'} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5005/money/check params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiM2ZkMDE4MjAtY2FjZi00MDA4LWI0ZjAtNTU4MmJhNjIzZTQ0IiwiZXhwIjoxNzA5NTU0MjIxfQ.I-V6RI2vwOVXpfyqiYEsZuL8eFHbA3GlHwQAT73QS7c', 'uid': '3fd01820-cacf-4008-b4f0-5582ba623e44', 'start': '1707926400', 'end': '1708916244', 'type': 1} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5005/money/check params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiM2ZkMDE4MjAtY2FjZi00MDA4LWI0ZjAtNTU4MmJhNjIzZTQ0IiwiZXhwIjoxNzA5NTU0MjIxfQ.I-V6RI2vwOVXpfyqiYEsZuL8eFHbA3GlHwQAT73QS7c', 'uid': '3fd01820-cacf-4008-b4f0-5582ba623e44', 'start': '1707926400', 'end': '0', 'type': 1} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5005/money/check params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiM2ZkMDE4MjAtY2FjZi00MDA4LWI0ZjAtNTU4MmJhNjIzZTQ0IiwiZXhwIjoxNzA5NTU0MjIxfQ.I-V6RI2vwOVXpfyqiYEsZuL8eFHbA3GlHwQAT73QS7c', 'uid': '3fd01820-cacf-4008-b4f0-5582ba623e44', 'start': '1707926400', 'end': '1708936244', 'type': 1} method:POST ip:127.0.0.1
-2024-02-26 INFO: url:http://127.0.0.1:5005/money/check params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiM2ZkMDE4MjAtY2FjZi00MDA4LWI0ZjAtNTU4MmJhNjIzZTQ0IiwiZXhwIjoxNzA5NTU0MjIxfQ.I-V6RI2vwOVXpfyqiYEsZuL8eFHbA3GlHwQAT73QS7c', 'uid': '3fd01820-cacf-4008-b4f0-5582ba623e44', 'start': '1707926400', 'end': '1708936244', 'type': 3} method:POST ip:127.0.0.1

+ 1 - 0
server/flaskProject/needsign.json

@@ -0,0 +1 @@
+{"needsign_morning": true, "needsign_night": true, "intime": 1711702879}

+ 67 - 0
server/flaskProject/task.py

@@ -0,0 +1,67 @@
+from data import MySQLTool
+import hashlib
+import uuid
+import TokenUtils
+from returnTemp import get_template, get_error_message
+import json
+from datetime import datetime
+
+class TikTask:
+    def __init__(self, action, data, logger):
+        self.action = action
+        self.data = data
+        self.logger = logger
+
+    def tik_task_router(self):
+        if self.action == "create":
+            return self.create()
+        elif self.action == "status":
+            return self.status()
+        elif self.action == "signcheck":
+            return self.signcheck()
+        elif self.action == "signset":
+            return self.signset()    
+        else:
+            return self.test()
+
+    def create(self):
+        print("---create---")
+        return create(self.data)
+
+    def status(self):
+        print("---status----")
+        return status(self.data)
+
+    def signcheck(self):
+        print("---signcheck----")
+        return signcheck()
+    
+    def signset(self):
+        print("---signset----")
+        return signset(self.data)
+    
+    def test(self):
+        return self.data
+
+def signcheck():
+    with open('needsign.json') as json_file:
+        r = json.load(json_file)
+    return r
+
+def signset(data):
+    with open('needsign.json', 'w') as json_file:
+         json.dump(data, json_file)
+         
+    with open('needsign.json') as json_file:
+        r = json.load(json_file)
+        now = datetime.now()
+        formatted_time = now.strftime("%Y-%m-%d %H:%M:%S")
+        r["changetime"] = formatted_time
+    return r
+
+def create(data):
+    return data
+
+
+def status(data):
+    return data

+ 11 - 4
server/flaskProject/user.py

@@ -47,10 +47,15 @@ def register(data):
         return accountRegister(data)
     elif login_type == "2":
         print("222")
+        return wechatRegister(data)
     else:
         print("3333")
 
 
+def wechatRegister(data):
+    return data
+
+
 def accountRegister(data):
     print("account login")
     keys_to_check = ['login_type', 'account', 'password']
@@ -136,6 +141,11 @@ def accountLogin(data):
         return template
 
 
+def wechatLogin(data):
+    print("wechat data")
+    return data
+
+
 mysql_tool = MySQLTool(host='localhost', user='root', password='wyt615115@', database='apiserver')
 
 
@@ -144,9 +154,6 @@ def login(data):
     if logintype == "1":
         return accountLogin(data)
     elif logintype == "2":
-        print("222")
+        return wechatLogin(data)
     else:
         print("3333")
-
-
-