jared 3 years ago
parent
commit
a635131753
2 changed files with 10 additions and 3 deletions
  1. 6 2
      web/main.py
  2. 4 1
      web/static/index.html

+ 6 - 2
web/main.py

@@ -83,19 +83,23 @@ async def tree_list():
         cnt+=1
         if cnt > 10:
             break
-              
+
     html+="</table></body></html>"
     return html
 
 
 #response_class=RedirectResponse
 @app.post("/gen_tree/",response_class=HTMLResponse)
-async def func_expand(kw: str = Form(...),kw2:Optional[str] = Form(None) ):
+async def func_expand(kw: str = Form(...),kw2:Optional[str] = Form(None),kw3:Optional[str] = Form(None),kw4:Optional[str] = Form(None) ):
     kwlst=[]
     if len(kw)>1:
         kwlst.append(kw)    
     if kw2 is not None:
         kwlst.append(kw2)    
+    if kw3 is not None:
+        kwlst.append(kw3)    
+    if kw4 is not None:
+        kwlst.append(kw4)    
 
     x = threading.Thread(target=thread_function, args=(kwlst,))
     x.start()

+ 4 - 1
web/static/index.html

@@ -2,7 +2,10 @@
     <body>
         <form action="/gen_tree" method="post">
             KW: <input type="text" id="kw" name="kw" value=""></br>
-            KW2: <input type="text" id="kw2" name="kw2" value="">
+            KW2: <input type="text" id="kw2" name="kw2" value=""></br>
+            KW3: <input type="text" id="kw3" name="kw3" value=""></br>
+            KW4: <input type="text" id="kw4" name="kw4" value=""></br>
+
             <input type="submit" value="gen">
         </form>
     </br>