diff --git a/apps/third/speaker.py b/apps/third/speaker.py index 09047dd2..b2076368 100644 --- a/apps/third/speaker.py +++ b/apps/third/speaker.py @@ -118,7 +118,7 @@ class SpClient: v_num (int): 播放次数 """ uri = path - if 'http' in uri: + if not uri.startswith('http'): uri = settings.BASE_URL + path json = { "sns": sns, @@ -126,7 +126,7 @@ class SpClient: "name": "songs_queue_append", "params": { "tid": ranstr(6), - "vol": 50, + "vol": 100, "urls": [{ "name": "alarm.mp3", "uri": uri diff --git a/apps/third/views.py b/apps/third/views.py index 2dca8e8d..ce9be17f 100755 --- a/apps/third/views.py +++ b/apps/third/views.py @@ -216,8 +216,8 @@ class DhCommonViewSet(CreateModelMixin, CustomGenericViewSet): ], "subsystem": { "subsystemType": 0, - "name": "10.0.11.101_8000", - "magic": "10.0.11.101_8000" + "name": "qyjy_ehs", + "magic": "qyjy_ehs" } } } @@ -233,7 +233,7 @@ class DhCommonViewSet(CreateModelMixin, CustomGenericViewSet): 取消事件订阅 """ dhClient.request(**dhapis['mq_unsubscribe'], - params={'name': '10.0.11.101_8000'}) + params={'name': 'qyjy_ehs'}) return Response() @action(methods=['post'], detail=False, diff --git a/apps/third/views_d.py b/apps/third/views_d.py index 64aa4edb..d46699ea 100644 --- a/apps/third/views_d.py +++ b/apps/third/views_d.py @@ -305,7 +305,7 @@ class TDeviceViewSet(ListModelMixin, UpdateModelMixin, DestroyModelMixin, Custom 视频通道列表 """ request.data.update({ - 'channelTypeList': ["1"], + 'unitTypeList': ["1"], 'includeSubOwnerCodeFlag': True }) _, res = dhClient.request(**dhapis['channel_list'], json=request.data) @@ -355,7 +355,7 @@ class TDeviceViewSet(ListModelMixin, UpdateModelMixin, DestroyModelMixin, Custom 闸机通道列表 """ request.data.update({ - 'channelTypeList': ["7"], + 'unitTypeList': ["7"], 'includeSubOwnerCodeFlag': True }) _, res = dhClient.request(**dhapis['channel_list'], json=request.data) diff --git a/requirements.txt b/requirements.txt index 6a504aea..20e61b71 100755 --- a/requirements.txt +++ b/requirements.txt @@ -28,3 +28,6 @@ grpcio==1.47.0 grpcio-tools==1.47.0 protobuf==3.20.1 pycryptodome==3.15.0 +aliyun-python-sdk-core==2.13.36 +shapely==1.8.3 +