修改wda。增加网络状态查询接口。
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user