| 字段名 | 类型 | 示例 |
|---|---|---|
| code | integer | 1 |
| msg | string | 订单处理成功 |
| status | integer | 1 |
| file_url | string | https://www.zimufy.com/translate_api/file_down?order_id=zm78377fe0f025t |
| file_size | string | 84 KB |
| cost_time | integer | 251 |
| 字段名 | 类型 | 示例 |
|---|---|---|
| code | integer | 1 |
| msg | string | 订单处理失败 |
| status | integer | 4 |
from flask import Flask, request, jsonify
app = Flask(__name__)
@app.route('/notify', methods=['POST'])
def handle_notify():
data = request.json # 自动解析JSON数据
print("收到通知数据:", data)
# 这里处理业务逻辑,比如验证数据、更新订单状态等
# 返回成功响应 (HTTP 200)
return 'success'
if __name__ == '__main__':
app.run(port=5000)| punctuation | 代表 |
|---|---|
| 0 | 无标点 |
| 2 | 去尾标点 |