修改wda。增加网络状态查询接口。

This commit is contained in:
2025-10-31 15:51:09 +08:00
parent 54ee0f7490
commit 3de4a67304
2 changed files with 10 additions and 0 deletions

View File

@@ -683,6 +683,16 @@ def changeAccount():
# thread.start() # thread.start()
return ResultData(data="", code=code, message=msg).toJson() return ResultData(data="", code=code, message=msg).toJson()
# 查看设备网络状态
@app.route('/getDeviceNetStatus', methods=['POST'])
def getDeviceNetStatus():
body = request.get_json()
udid = body.get("udid")
client = wda.USBClient(udid, wdaFunctionPort)
r = client.getNetWorkStatus()
value = r.get("value")
return ResultData(data=value, code=200).toJson()
@app.route('/test', methods=['POST']) @app.route('/test', methods=['POST'])
def test(): def test():
import wda import wda