feat: V1.1 批次入库——色号表SEO页/Showcase/图纸库/帮助中心/JSON-LD/CI门禁/竞品分析
This commit is contained in:
1 parent
40e2342a02
commit
f53f0a2b25
104 files changed
+21760
-157
No files matched your search
+21
-18
@@ -1,39 +1,42 @@
|
||||
@echo off
|
||||
chcp 65001 >nul
|
||||
title 停止 PERLER LAB 开发环境
|
||||
title Stop PERLER LAB Dev Environment
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
rem ============================================================
|
||||
rem PERLER LAB 停止脚本
|
||||
rem 通过 netstat 查找监听 5173 / 8788 端口的进程并用 taskkill 终止。
|
||||
rem PERLER LAB stop script
|
||||
rem Find processes listening on ports 5173 / 8788 via netstat
|
||||
rem and terminate them with taskkill.
|
||||
rem
|
||||
rem 为什么用 netstat + taskkill 而不是 wmic:
|
||||
rem - wmic 已被微软弃用,在 Windows 11 24H2 及更新版本中已移除;
|
||||
rem - netstat / taskkill 是系统内置命令,无需额外依赖,且对普通用户
|
||||
rem 进程不需要管理员权限即可终止(Vite / tsx 均为用户态进程)。
|
||||
rem Why netstat + taskkill instead of wmic:
|
||||
rem - wmic is deprecated and has been removed in Windows 11 24H2+;
|
||||
rem - netstat / taskkill are built-in, need no extra dependencies,
|
||||
rem and can terminate ordinary user processes without admin rights.
|
||||
rem
|
||||
rem NOTE (BUG-087): this file is intentionally pure ASCII so it
|
||||
rem parses correctly under any console codepage (including GBK).
|
||||
rem ============================================================
|
||||
|
||||
echo 正在查找并停止 PERLER LAB 相关进程(端口 5173 / 8788)...
|
||||
echo Stopping PERLER LAB processes (ports 5173 / 8788)...
|
||||
echo.
|
||||
|
||||
set "KILLED_PIDS="
|
||||
set "FOUND="
|
||||
|
||||
rem 依次检查两个端口
|
||||
rem Check the two ports in turn
|
||||
for %%P in (5173 8788) do (
|
||||
rem 仅匹配 LISTENING 状态的监听进程,避免误杀 TIME_WAIT 残留
|
||||
rem Only match LISTENING processes to avoid killing TIME_WAIT leftovers
|
||||
for /f "tokens=5" %%A in ('netstat -ano ^| findstr ":%%P " ^| findstr "LISTENING"') do (
|
||||
rem 同一进程可能同时监听 IPv4 和 IPv6,去重避免重复 taskkill
|
||||
echo !KILLED_PIDS! | findstr /b /c:" %%A " >nul 2>nul
|
||||
rem The same process may listen on both IPv4 and IPv6; dedupe to avoid a repeated taskkill
|
||||
echo !KILLED_PIDS! | findstr /c:" %%A " >nul 2>nul
|
||||
if errorlevel 1 (
|
||||
set "FOUND=1"
|
||||
echo [端口 %%P] 发现进程 PID=%%A,正在终止...
|
||||
echo [port %%P] found PID=%%A, terminating...
|
||||
taskkill /F /PID %%A >nul 2>nul
|
||||
if not errorlevel 1 (
|
||||
echo [OK] 已终止 PID %%A
|
||||
echo [OK] terminated PID %%A
|
||||
set "KILLED_PIDS=!KILLED_PIDS! %%A "
|
||||
) else (
|
||||
echo [失败] 终止 PID %%A 失败(可能需要管理员权限)。
|
||||
echo [FAIL] failed to terminate PID %%A, may need admin rights
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -41,9 +44,9 @@ for %%P in (5173 8788) do (
|
||||
|
||||
echo.
|
||||
if not defined FOUND (
|
||||
echo 未发现监听 5173 / 8788 端口的进程,开发环境未在运行,无需停止。
|
||||
echo No processes found on ports 5173 / 8788. Nothing to stop.
|
||||
) else (
|
||||
echo 完成。PERLER LAB 开发环境已停止。
|
||||
echo Done. PERLER LAB dev environment stopped.
|
||||
)
|
||||
echo.
|
||||
|
||||
|
||||
Reference in new issue
Block a user