更新密码找回uniapp

This commit is contained in:
hero920103 committed 2026-11-16 17:22:50 +08:00
1 parent 7f9a66da0f
commit 3fdda89833
1304 files changed
+3503 -26132

No files matched your search

-22
View File
@@ -3,43 +3,25 @@ chcp 65001 >nul
setlocal EnableExtensions
title Update Server - Go API incremental deploy
rem ==================================================================
rem Sync only CHANGED files from this go\ folder to the server.
rem (Batch file is ASCII-only on purpose: cmd.exe mis-parses UTF-8
rem Chinese text in .bat files. The deploy tool itself prints Chinese.)
rem
rem Usage:
rem update-server.bat diff -> confirm -> upload -> ask to restart
rem update-server.bat dry diff only, upload nothing
rem update-server.bat restart only restart the service on the server
rem ==================================================================
rem ============================ CONFIG ============================
set "DEPLOY_HOST=10.31.100.2"
set "DEPLOY_USER=root"
set "DEPLOY_DIR=/www/wwwroot/api.yunzer.cn"
rem Key auth (this server has password auth disabled in sshd)
set "DEPLOY_KEY=%~dp010.31.100.2_id_ed25519"
rem Fallback: if password auth is enabled later, blank DEPLOY_KEY and set the password here
rem set "DEPLOY_KEY="
set "DEPLOY_PASS=xxxxxx"
rem Restart command (systemd unit: go-api.service)
set "RESTART_CMD=systemctl restart go-api.service"
rem Extra exclude patterns, comma separated, * wildcard supported
set "EXTRA_EXCLUDE="
rem ================================================================
cd /d "%~dp0"
set "DEPLOY_EXE=%~dp0bin\deploy.exe"
set "ACTION=%~1"
if "%ACTION%"=="" set "ACTION=deploy"
rem %~dp0 ends with a backslash; a trailing backslash before the closing quote
rem escapes it and swallows the following arguments - strip it.
set "LOCAL_DIR=%~dp0"
set "LOCAL_DIR=%LOCAL_DIR:~0,-1%"
@@ -50,7 +32,6 @@ echo Action : %ACTION%
echo ==================================================================
echo.
rem ---------------- 1/3 build the deploy tool ----------------
where go >nul 2>nul
if not errorlevel 1 (
echo [1/3] Building deploy tool...
@@ -67,7 +48,6 @@ if not errorlevel 1 (
echo [1/3] go not found, using existing bin\deploy.exe
)
rem ---------------- auth args ----------------
if defined DEPLOY_KEY (
if not exist "%DEPLOY_KEY%" (
echo [ERROR] Private key not found: %DEPLOY_KEY%
@@ -79,7 +59,6 @@ if defined DEPLOY_KEY (
set "AUTH_ARGS=-pass %DEPLOY_PASS%"
)
rem ---------------- 2/3 run ----------------
if /i "%ACTION%"=="restart" goto :do_restart
set "EXTRA_ARGS="
@@ -93,7 +72,6 @@ if errorlevel 1 goto :fail
if /i "%ACTION%"=="dry" goto :done
rem ---------------- 3/3 restart ----------------
echo.
set "ANSWER="
set /p "ANSWER=Restart the service so the changes take effect? (Y/N) [Y]: "