chanjunkai 5 년 전
부모
커밋
9ee27ddac9
1개의 변경된 파일7개의 추가작업 그리고 1개의 파일을 삭제
  1. 7 1
      controller/index.py

+ 7 - 1
controller/index.py

@@ -409,7 +409,13 @@ class oa2DiscoveryDevice(TemplateView):
                 return response.json(0, res={'msg': 'error'})
 
 #新增
-def testRunSendStop(UID, PWD, MSG):
+def testRunSendStop(request):
+    request.encoding = 'utf-8'
+    if request.method == 'GET':
+        request_dict = request.GET
+    UID=request_dict.get('UID', None)
+    PWD=request_dict.get('PWD', None)
+    MSG=request_dict.get('MSG', None)
     command = "./pushtool {UID} {PWD} {MSG} 0".format(UID=UID, PWD=PWD, MSG=MSG)
     print('command=>{command}'.format(command=command))
     try: