|
@@ -1830,4 +1830,23 @@ async def rename_shadow_folder(params:RenameShadow):
|
|
|
print(is_ok,msg)
|
|
print(is_ok,msg)
|
|
|
print("goods_obj",goods_obj)
|
|
print("goods_obj",goods_obj)
|
|
|
success_result.append({"goods_art_no":goodsArt,"path":renameDstPath})
|
|
success_result.append({"goods_art_no":goodsArt,"path":renameDstPath})
|
|
|
- return {"code": 0, "message": "重命名完成", "data": {"result": success_result}}
|
|
|
|
|
|
|
+ return {"code": 0, "message": "重命名完成", "data": {"result": success_result}}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+@app.get("/minimize_window", description="最小化窗口")
|
|
|
|
|
+def minimize_window(window_title: str):
|
|
|
|
|
+ hwnd_list = []
|
|
|
|
|
+ if window_title == "" or window_title == None:
|
|
|
|
|
+ window_title = "Smart Shooter"
|
|
|
|
|
+ def callback(hwnd, _):
|
|
|
|
|
+ title = GetWindowText(hwnd)
|
|
|
|
|
+ if window_title in title or title == window_title:
|
|
|
|
|
+ hwnd_list.append(hwnd)
|
|
|
|
|
+
|
|
|
|
|
+ EnumWindows(callback, None)
|
|
|
|
|
+ if hwnd_list:
|
|
|
|
|
+ hwnd = hwnd_list[0]
|
|
|
|
|
+ win32gui.ShowWindow(hwnd, win32con.SW_MINIMIZE)
|
|
|
|
|
+ return {"code": 0, "msg": "最小化成功", "data": {"status": True}}
|
|
|
|
|
+ return {"code": 0, "msg": "最小化失败", "data": {"status": False}}
|