From ecd4962be991436fdd9a96f44bcafecceafa9805 Mon Sep 17 00:00:00 2001 From: zhaoxiaolin Date: Wed, 18 Oct 2023 10:01:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=89=8D=E7=AB=AF=E5=8F=91=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- push-op-ui-prod.bat | 27 +++++++++++++++++++++++++++ push-op-ui-test.bat | 28 ++++++++++++++++++++++++++++ src/views/login.vue | 4 ++-- 3 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 push-op-ui-prod.bat create mode 100644 push-op-ui-test.bat diff --git a/push-op-ui-prod.bat b/push-op-ui-prod.bat new file mode 100644 index 00000000..89edadee --- /dev/null +++ b/push-op-ui-prod.bat @@ -0,0 +1,27 @@ +@echo off +echo --------------------------------自定义参数,启动前先修改-------------------------------------- +set imageURI=192.168.202.36:30002/op-lanju/op-ui +::echo 获取当前日期字符串 +for /f "tokens=1,2,3 delims=/- " %%a in ("%date%") do @set D=%%a%%b%%c +::echo 获取当前时间字符串 +for /f "tokens=1,2 delims=:." %%a in ("%time%") do @set T=%%a%%b +::echo 如当前小时小于10,将空格替换为0 +set T=%T: =0% +::echo 显示输出日期时间字符串 +set imageVersion=%D%%T% +::输出发版信息 +echo 镜像库地址:%imageURI% +echo 镜像版本:%imageVersion% +echo --------------------------------执行打包-------------------------------- +call npm run build:prod + +dir +echo --------------------------------docker login...------------------------------- +docker login 192.168.202.36:30002 -u deploy -p Deploy@2023 +echo --------------------------------docker build...------------------------------- +docker build -t %imageURI%:%imageVersion% . +echo --------------------------------docker push...-------------------------------- +docker push %imageURI%:%imageVersion% +@pause + +::docker pull 192.168.3.157:8001/library/nginx:1.20-alpine \ No newline at end of file diff --git a/push-op-ui-test.bat b/push-op-ui-test.bat new file mode 100644 index 00000000..bae3fb2c --- /dev/null +++ b/push-op-ui-test.bat @@ -0,0 +1,28 @@ +@echo off +echo --------------------------------自定义参数,启动前先修改-------------------------------------- +set imageURI=140.249.53.142:30002/op-lanju/ld-op-front +::echo 获取当前日期字符串 +for /f "tokens=1,2,3 delims=/- " %%a in ("%date%") do @set D=%%a%%b%%c +::echo 获取当前时间字符串 +for /f "tokens=1,2 delims=:." %%a in ("%time%") do @set T=%%a%%b +::echo 如当前小时小于10,将空格替换为0 +set T=%T: =0% +::echo 显示输出日期时间字符串 +set imageVersion=%D%%T% +::输出发版信息 +echo 镜像库地址:%imageURI% +echo 镜像版本:%imageVersion% +echo --------------------------------执行打包-------------------------------- +call npm run build:prod + +dir +echo --------------------------------docker login...------------------------------- +docker logout 140.249.53.142:30002 +docker login 140.249.53.142:30002 -u deploy -p Deploy@2022 +echo --------------------------------docker build...------------------------------- +docker build -t %imageURI%:%imageVersion% . +echo --------------------------------docker push...-------------------------------- +docker push %imageURI%:%imageVersion% +@pause + +::docker pull 192.168.3.157:8001/library/nginx:1.20-alpine \ No newline at end of file diff --git a/src/views/login.vue b/src/views/login.vue index 1a7e5d87..8a264458 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -72,8 +72,8 @@ export default { return { codeUrl: "", loginForm: { - username: "admin", - password: "admin123", + username: "",//admin + password: "",//admin123 rememberMe: false, code: "", uuid: ""