总步数:285
健康建议
-{{ weekResult.Advice || '--' }}
+ ++ 健康建议抑郁是一种负性情绪,是人们遇到具体生活事件后,出现 + 的一种不愉快、烦闷压抑的内心体验。情绪受挫折的影响是很正常 + 的反应,不要任由情绪跟着负面想法走,让自己陷入抑郁之中。与 + 人沟通,有助于排解不良情绪;把注意力放到当下真正需要关注的 事情中来,积极应对困难,有助于改善现状。 +
From b178417ffb441f1dc96ff8b5b01ecf2dcd76cf08 Mon Sep 17 00:00:00 2001 From: chenJinxu <2183691628@qq.com> Date: Fri, 22 Dec 2023 16:53:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20=E6=B4=9E=E6=82=89?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=20=E5=A2=9E=E5=8A=A0=20=E6=83=85=E7=BB=AA?= =?UTF-8?q?=E5=91=A8=E6=8A=A5=E8=AF=A6=E6=83=85=20=E5=A2=9E=E5=8A=A0=20Jen?= =?UTF-8?q?kins=E9=83=A8=E7=BD=B2=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- h5_frontend_web_run.sh | 37 ++++++++ health_student_web_run.sh | 29 ++++++ package.json | 1 + setup_development.sh | 19 ++++ setup_production.sh | 29 ++++++ setup_test.sh | 29 ++++++ src/views/insight/index.vue | 158 ++++++++++++++++++++++++++++--- src/views/myself/index.vue | 10 +- src/views/today/report.vue | 69 +++++++++----- src/views/today/scss/report.scss | 59 ++++++------ 10 files changed, 368 insertions(+), 72 deletions(-) create mode 100644 h5_frontend_web_run.sh create mode 100644 health_student_web_run.sh create mode 100644 setup_development.sh create mode 100644 setup_production.sh create mode 100644 setup_test.sh diff --git a/h5_frontend_web_run.sh b/h5_frontend_web_run.sh new file mode 100644 index 0000000..d082141 --- /dev/null +++ b/h5_frontend_web_run.sh @@ -0,0 +1,37 @@ +#!/bin/bash +### + # @Date: 2022-08-18 09:19:07 + # @LastEditors: JinxChen + # @LastEditTime: 2022-08-18 10:06:40 + # @FilePath: \TelpoH5FrontendWeb\h5_frontend_web_run.sh + # @description: 部署脚本 +### + +environment=$1 +version=$2 +echo "环境变量为${environment},版本为$version!" +if [[ ${environment} = 'production' ]]; +then + echo "开始远程构建容器" + docker stop h5_frontend_web || true; + docker rm h5_frontend_web || true; + docker rmi -f $(docker images | grep registry.cn-shanghai.aliyuncs.com/tolpo_platform/h5_frontend_web | awk '{print $3}') + #docker login --username=telpo_linwl@1111649216405698 --password=telpo#1234 registry.cn-shanghai.aliyuncs.com; + #docker login --username=telpo_fengjj@1111649216405698 --password=PWDaliyun123 registry.cn-shanghai.aliyuncs.com + docker login --username=rzl_wangjx@1111649216405698 --password=telpo.123 registry.cn-shanghai.aliyuncs.com + docker pull registry.cn-shanghai.aliyuncs.com/tolpo_platform/h5_frontend_web:$version + docker run -p 8075:80 -d --restart=always --name h5_frontend_web registry.cn-shanghai.aliyuncs.com/tolpo_platform/h5_frontend_web:$version; + #删除产生的None镜像 + docker rmi -f $(docker images | grep none | awk '{print $3}') + docker ps -a +else + echo "开始在测试环境远程构建容器" + docker stop h5_frontend_web || true + docker rm h5_frontend_web || true + docker rmi -f $(docker images | grep 139.224.254.18:5000/h5_frontend_web | awk '{print $3}') + docker pull 139.224.254.18:5000/h5_frontend_web:$version + docker run -p 8075:80 -d --restart=always --name h5_frontend_web 139.224.254.18:5000/h5_frontend_web:$version; + #删除产生的None镜像 + docker rmi -f $(docker images | grep none | awk '{print $3}') + docker ps -a +fi \ No newline at end of file diff --git a/health_student_web_run.sh b/health_student_web_run.sh new file mode 100644 index 0000000..65d9f7e --- /dev/null +++ b/health_student_web_run.sh @@ -0,0 +1,29 @@ + +environment=$1 +version=$2 +echo "环境变量为${environment},版本为$version!" +if [[ ${environment} = 'production' ]]; +then + echo "开始远程构建容器" + docker stop health_student_web || true; + docker rm health_student_web || true; + docker rmi -f $(docker images | grep registry.cn-shanghai.aliyuncs.com/tolpo_platform/health_student_web | awk '{print $3}') + #docker login --username=telpo_linwl@1111649216405698 --password=telpo#1234 registry.cn-shanghai.aliyuncs.com; + #docker login --username=telpo_fengjj@1111649216405698 --password=PWDaliyun123 registry.cn-shanghai.aliyuncs.com + docker login --username=rzl_wangjx@1111649216405698 --password=telpo.123 registry.cn-shanghai.aliyuncs.com + docker pull registry.cn-shanghai.aliyuncs.com/tolpo_platform/health_student_web:$version + docker run -p 8070:80 -d --restart=always --name health_student_web registry.cn-shanghai.aliyuncs.com/tolpo_platform/health_student_web:$version; + #删除产生的None镜像 + docker rmi -f $(docker images | grep none | awk '{print $3}') + docker ps -a +else + echo "开始在测试环境远程构建容器" + docker stop health_student_web || true + docker rm health_student_web || true + docker rmi -f $(docker images | grep 139.224.254.18:5000/health_student_web | awk '{print $3}') + docker pull 139.224.254.18:5000/health_student_web:$version + docker run -p 8070:80 -d --restart=always --name health_student_web 139.224.254.18:5000/health_student_web:$version; + #删除产生的None镜像 + docker rmi -f $(docker images | grep none | awk '{print $3}') + docker ps -a +fi \ No newline at end of file diff --git a/package.json b/package.json index 611d81d..22dd2b3 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "scripts": { "serve": "vue-cli-service serve", "build": "vue-cli-service build", + "build-test": "vue-cli-service build --mode test", "lint": "vue-cli-service lint", "deps": "yarn upgrade-interactive --latest", "dev": "vue-cli-service serve --mode development", diff --git a/setup_development.sh b/setup_development.sh new file mode 100644 index 0000000..680279c --- /dev/null +++ b/setup_development.sh @@ -0,0 +1,19 @@ + +npm -v +npm config set registry https://registry.npm.taobao.org +npm install +npm run build-dev +image_version=`date +%Y%m%d%H%M`; +docker stop health_student_web || true; +docker rm health_student_web || true; +# 删除镜像 +docker rmi -f $(docker images | grep telpo/health_student_web | awk '{print $3}') +# 构建telpo/mrp:$image_version镜像 +docker build --no-cache . -t telpo/health_student_web:$image_version; +#删除产生的None镜像 +docker rmi -f $(docker images | grep none | awk '{print $3}') +# 查看镜像列表 +docker images; +docker run -p 8070:80 -d --restart=always --name health_student_web telpo/health_student_web:$image_version; +# 查看日志 +docker logs health_student_web; \ No newline at end of file diff --git a/setup_production.sh b/setup_production.sh new file mode 100644 index 0000000..f5af834 --- /dev/null +++ b/setup_production.sh @@ -0,0 +1,29 @@ +#!/bin/bash +### + # @Date: 2022-08-18 09:19:07 + # @LastEditors: JinxChen + # @LastEditTime: 2022-08-18 09:29:15 + # @FilePath: \TelpoH5FrontendWeb\setup_production.sh + # @description: +### +npm -v +npm config set registry https://registry.npm.taobao.org +npm install +npm run build +image_version=$version; +# 删除镜像 + docker rmi -f $(docker images | grep registry.cn-shanghai.aliyuncs.com/tolpo_platform/health_student_web | awk '{print $3}') +# 构建telpo/mrp:$image_version镜像 +docker build --no-cache . -t telpo/health_student_web:$image_version; +#TODO:推送镜像到阿里仓库 +echo '=================开始推送镜像=======================' +#docker login --username=telpo_linwl@1111649216405698 --password=telpo#1234 registry.cn-shanghai.aliyuncs.com +#docker login --username=telpo_fengjj@1111649216405698 --password=PWDaliyun123 registry.cn-shanghai.aliyuncs.com +docker login --username=rzl_wangjx@1111649216405698 --password=telpo.123 registry.cn-shanghai.aliyuncs.com +docker tag telpo/health_student_web:$image_version registry.cn-shanghai.aliyuncs.com/tolpo_platform/health_student_web:$image_version +docker push registry.cn-shanghai.aliyuncs.com/tolpo_platform/health_student_web:$image_version +echo '=================推送镜像完成=======================' +#删除产生的None镜像 +docker rmi -f $(docker images | grep none | awk '{print $3}') +# 查看镜像列表 +docker images; \ No newline at end of file diff --git a/setup_test.sh b/setup_test.sh new file mode 100644 index 0000000..3a6d74c --- /dev/null +++ b/setup_test.sh @@ -0,0 +1,29 @@ + +### + # @Date: 2022-08-18 09:19:07 + # @LastEditors: JinxChen + # @LastEditTime: 2022-08-18 09:29:35 + # @FilePath: \TelpoH5FrontendWeb\setup_test.sh + # @description: +### +#!/bin/bash +npm -v +npm config set registry https://registry.npm.taobao.org +npm install +npm run build-test +image_version=$version; +# 删除镜像 +docker rmi -f $( + docker images | grep 139.224.254.18:5000/h5_frontend_web | awk '{print $3}' +) +# 构建telpo/mrp:$image_version镜像 +docker build --no-cache . -t health_student_web:$image_version; +#TODO:推送镜像到私有仓库 +echo '=================开始推送镜像=======================' +docker tag health_student_web:$image_version 139.224.254.18:5000/h5_frontend_web:$image_version +docker push 139.224.254.18:5000/h5_frontend_web:$image_version +echo '=================推送镜像完成=======================' +#删除产生的None镜像 +docker rmi -f $(docker images | grep none | awk '{print $3}') +# 查看镜像列表 +docker images; \ No newline at end of file diff --git a/src/views/insight/index.vue b/src/views/insight/index.vue index 60c9e14..82eb48f 100644 --- a/src/views/insight/index.vue +++ b/src/views/insight/index.vue @@ -6,15 +6,20 @@
身高:170cm
+体重:60kg
+BMI:24.5
+{{ bmi.result }}
+总步数:285
平均步数:285
总消耗:285
平均消耗:285
{{ echartsTitle }}
+