diff --git a/.env.prod b/.env.prod index 8526c196..e5004d09 100644 --- a/.env.prod +++ b/.env.prod @@ -1,8 +1,8 @@ ### # @Author: zhp # @Date: 2023-11-07 19:11:40 - # @LastEditTime: 2023-11-16 16:40:59 - # @LastEditors: zhp + # @LastEditTime: 2024-10-17 09:09:05 + # @LastEditors: zwq # @Description: ### # 生产环境配置 @@ -12,15 +12,18 @@ ENV = 'production' VUE_APP_TITLE = MES系统 # 芋道管理系统/生产环境 -VUE_APP_BASE_API = '/prod-api' +# VUE_APP_BASE_API = '/prod-api' +VUE_APP_BASE_API = '' # 积木报表指向地址 -VUE_APP_JIMU_API = 'http://192.168.0.33:48082' +# VUE_APP_JIMU_API = 'http://192.168.0.33:48082' +VUE_APP_JIMU_API = '' # 根据服务器或域名修改 # PUBLIC_PATH = 'http://my-pi.com:8888/yudao-admin/' -PUBLIC_PATH = 'http://192.168.0.33:8889/' +# PUBLIC_PATH = 'http://192.168.0.33:8889/' +PUBLIC_PATH = '' # 二级部署路径 VUE_APP_APP_NAME ='yudao-admin' diff --git a/sync_mes2.bat b/sync_mes2.bat new file mode 100644 index 00000000..dbb3a54d --- /dev/null +++ b/sync_mes2.bat @@ -0,0 +1,68 @@ +@echo off +setlocal enabledelayedexpansion +set cmdstr=rsync +set zipfile=cwrsync.zip +set downurl=https://itefix.net/download/free/cwrsync_6.3.0_x64_free.zip +set currpath=%~dp0 +set "rsynchome=%ProgramFiles%\%zipfile:~0,-4%" +set passfile=%temp%\.password +set syncdir=dist/ +:: Ҫͬ +set accountwithost=kszny@47.96.93.140::mes2 +set "password=kszny@123" +set "runcommand=%cmdstr% --port=873 -rlptvz --progress --password-file=%passfile% --exclude=google.exe --exclude=Lodap.zip %syncdir% %accountwithost%" + +where %cmdstr% >nul 2>nul +::д˵ڸ +if %errorlevel% neq 0 ( + ::δذװδѹװĿ¼ + if not exist "%rsynchome%" ( + :: ԱȨ + echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\runAsAdmin.vbs" + echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\runAsAdmin.vbs" + "%temp%\runAsAdmin.vbs" + :: ҪԱȨ޲ܴĿ¼ + mkdir "%rsynchome%" + del "%temp%\runAsAdmin.vbs" + exit /B + ) + + :: ʹpowershellcurl + powershell curl -o %temp%\%zipfile% %downurl% + :: ѹ + tar -xf "%temp%\%zipfile%" -C "%rsynchome%" + echo "%cmdstr%Ѿװ%rsynchome%Ŀ¼" + + :: ·Ƿ PATH + set "found=false" + for %%I in ("%PATH:;=";"%") do ( + if /I "%%~I"=="%rsynchome%\bin" ( + set "found=true" + ) + ) + + :: δõpathУӵpath + if "!found!"=="false" ( + :: עе PATH ͨsetxʽֵȳ1024ַͻᱻض + reg add "HKCU\Environment" /v PATH /t REG_EXPAND_SZ /d "%PATH%;%rsynchome%\bin" /f + ) + +) + +::ǰĿ¼ûdistĿ¼ +if not exist "%currpath%%syncdir%" ( + echo ǰĿ¼ûҪͬ%syncdir%Ŀ¼Ҫͬ%syncdir%Ŀ¼ǰĿ¼£ +) else ( + echo !password!>%passfile% + echo ͬʼԺ... + !runcommand! && ( + echo ͬ! + ) || ( + echo !runcommand! + echo ͬʧܣȷǷVPN + ) + del %passfile% +) + +endlocal +pause