diff --git a/main.py b/main.py index 16b890c..6cde854 100644 --- a/main.py +++ b/main.py @@ -273,6 +273,8 @@ def filter_group_mode1(parameter, group, hits): def predict(): mode = request.args.get('mode') parameter = request.args.get('parameter') + if len(trim_space(parameter)) == 0: + return jsonify({'status': 1, 'message': '请输入参数', 'result': []}) all_idiom, group = filter_logic(mode, parameter) result = get_max_group(all_idiom, group, 6) return jsonify({'status': 0, 'message': 'success', 'result': result}) diff --git a/templates/index.html b/templates/index.html index 3aabeca..a3c68d5 100644 --- a/templates/index.html +++ b/templates/index.html @@ -7,7 +7,8 @@ - + @@ -19,27 +20,27 @@
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
+
@@ -63,8 +64,12 @@ - - + +