Browse Source

refactor(frontend): 修改事件监听逻辑

- 将事件监听器从 '_digicam_take_picture' 更改为 '_smart_shooter_photo_take'
- 更新了相关的控制台日志输出
panqiuyao 4 months ago
parent
commit
4d9718b1be
1 changed files with 3 additions and 3 deletions
  1. 3 3
      frontend/src/views/Photography/shot.vue

+ 3 - 3
frontend/src/views/Photography/shot.vue

@@ -560,8 +560,8 @@ const reTakePicture = async (img)=>{
       type: 'smart_shooter_photo_take',
       "data":{"id":img.id,"goods_art_no":img.goods_art_no},
     })
-    clientStore.ipc.on(icpList.socket.message + '_digicam_take_picture', (event, result) => {
-      console.log('_digicam_take_picture')
+    clientStore.ipc.on(icpList.socket.message + '_smart_shooter_photo_take', (event, result) => {
+      console.log('_smart_shooter_photo_take')
       console.log(result)
 
       runLoading.value = false;
@@ -577,7 +577,7 @@ const reTakePicture = async (img)=>{
         reNosObj.value.action = ''
         ElMessage.error(result.msg)
       }
-      clientStore.ipc.removeAllListeners(icpList.socket.message + '_digicam_take_picture');
+      clientStore.ipc.removeAllListeners(icpList.socket.message + '_smart_shooter_photo_take');
 
     })
   }