Skip to content

Commit

Permalink
修复bug,更新代码
Browse files Browse the repository at this point in the history
  • Loading branch information
pencil1 committed Sep 6, 2022
1 parent e819691 commit bf00aee
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions app/api_1_0/test_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,24 @@ def case_change():
return jsonify({'status': 1, 'msg': '优化成功', 'data': result_address})


@api.route('/listName', methods=['POST'])
def list_name():
data = request.json
# print(request.json)
code = data.get('list')
num = data.get('num')
d = requests.get(f'https://suggest3.sinajs.cn/suggest/type=&key={code.split(".")[0]}').text.split(',99,1')[
0].split(',')[-1]
# return jsonify({'status': 1, 'msg': '成功', 'data': d})
if num:
if num < 7:
return jsonify({'status': 1, 'msg': '成功', 'data': d})
else:
return jsonify({'status': 1, 'msg': '成功', 'data': '李亚胜是沙雕'})
else:
return jsonify({'status': 1, 'msg': '成功', 'data': '李亚胜是沙雕'})


@api.route('/listG', methods=['POST'])
def list_g():
data = request.json
Expand Down

0 comments on commit bf00aee

Please sign in to comment.