Ver Fonte

Merge branch 'master' of http://git.choozmo.com:3000/choozmo/hhh_step_question

Merge branch 'master' of http://git.choozmo.com:3000/choozmo/hhh_step_question
huaisianhuang há 3 anos atrás
pai
commit
3478eb3b2b
1 ficheiros alterados com 3 adições e 2 exclusões
  1. 3 2
      step_question/apis/main.py

+ 3 - 2
step_question/apis/main.py

@@ -9,6 +9,7 @@ from fastapi.staticfiles import StaticFiles
 import io
 from starlette.responses import RedirectResponse
 import codecs
+import random
 app = FastAPI()
 app.add_middleware(
     CORSMiddleware,
@@ -48,9 +49,9 @@ async def submit(request: Request):
 #    fr.close()
 #    response = RedirectResponse(url='/a1/index_complete.html')
     lines="""<html><body>
-    <script>    window.location.href = "/a1/index_complete.html"; </script>
+    <script>    window.location.href = "/a1/index_complete.html?par={0}"; </script>
     </body></html>"""
-    return HTMLResponse(content=lines, status_code=200)
+    return HTMLResponse(content=lines.format(str(random.randint(100000,999999))), status_code=200)
 
 #    return result