diff --git a/.env.production b/.env.production index 40e5dd4..7b93ff4 100644 --- a/.env.production +++ b/.env.production @@ -31,7 +31,7 @@ VITE_SOURCEMAP=false VITE_BASE_PATH=/ # 输出路径 -VITE_OUT_DIR=dist-pro +VITE_OUT_DIR=zhucheng # 积木报表请求路径 # VITE_JMREPORT_BASE_URL='http://dev.ccwin-in.com:26110' diff --git a/.env.test b/.env.test index 23eb72d..acaccb8 100644 --- a/.env.test +++ b/.env.test @@ -4,10 +4,10 @@ NODE_ENV=test VITE_DEV=false # 请求路径 -VITE_BASE_URL='http://dev.ccwin-in.com:26110' +VITE_BASE_URL='http://dev.ccwin-in.com:28009/api' # 上传路径 -VITE_UPLOAD_URL='http://dev.ccwin-in.com:26110/api/infra/file/upload' +VITE_UPLOAD_URL='http://dev.ccwin-in.com:28009/api/infra/file/upload' # 接口前缀 VITE_API_BASEPATH= @@ -28,10 +28,10 @@ VITE_SOURCEMAP=false VITE_BASE_PATH=/ # 输出路径 -VITE_OUT_DIR=dist-test +VITE_OUT_DIR=zhucheng # 自定义接口路径 -VITE_INTERFACE_URL='http://dev.ccwin-in.com:26112/magic/web/index.html' +VITE_INTERFACE_URL='http://dev.ccwin-in.com:28009/magic/web/index.html' # 积木报表请求路径 -VITE_JMREPORT_BASE_URL='http://dev.ccwin-in.com:26112' +VITE_JMREPORT_BASE_URL='http://dev.ccwin-in.com:28009' diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..4f719fc --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +# 设置基础镜像 +FROM nginx:WIN-1.25.3 + +WORKDIR /opt/zhucheng +COPY nginx.conf /usr/local/nginx/conf/nginx.conf +# 将dist文件中的内容复制到 /opt/zhucheng 这个目录下面 +COPY zhucheng/ /opt/zhucheng diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..fb00d3c --- /dev/null +++ b/nginx.conf @@ -0,0 +1,61 @@ +user root; +worker_processes 2; + +events { + worker_connections 1024; +} + +http { + include mime.types; + charset utf-8,gbk; + default_type application/octet-stream; + log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for" "$request_time $upstream_response_time"'; + + proxy_cache_path /opt/nginx_cache/ levels=1:2 keys_zone=my_zone:10m inactive=300s max_size=5g; + access_log logs/access.log main; + sendfile on; + #tcp_nopush on; + keepalive_timeout 600s; + client_max_body_size 200m; + gzip on; + gzip_min_length 10k; + gzip_comp_level 9; + gzip_buffers 4 16k; + gzip_types text/plain application/javascript text/css application/xml text/javascript image/jpeg image/gif image/png; + gzip_vary on; + gzip_disable "MSIE [1-6]\."; + upstream zhucheng { + server localhost:28009 weight=10 max_fails=3 fail_timeout=10s; + } + server { + listen 28000; + server_name_in_redirect off; + server_name dev.ccwin-in.com; + location /api/ { + proxy_pass http://zhucheng/; + proxy_next_upstream http_500 http_502 http_503 http_504 error timeout invalid_header; + proxy_set_header X-Forwared-For $proxy_add_x_forwarded_for; + proxy_set_header Host $http_host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $http_x_forwarded_for; + } + location /profile/ { + proxy_cache my_zone; + proxy_cache_valid 200 304 12h; + proxy_cache_key $host$uri$is_args$args; + alias /opt/profile/; + index index.html index.htm; + } + location / { + proxy_cache my_zone; + proxy_cache_valid 200 304 12h; + proxy_cache_key $host$uri$is_args$args; + try_files $uri $uri/ /index.html; + root /opt/zhucheng; + index index.html index.htm; + } + } +} + diff --git a/src/router/modules/remaining.ts b/src/router/modules/remaining.ts index d6349e6..6af560b 100644 --- a/src/router/modules/remaining.ts +++ b/src/router/modules/remaining.ts @@ -41,7 +41,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ { path: '/redirect/:path(.*)', name: 'Redirect', - component: () => import('@/views/Redirect/Redirect.vue'), + component: () => import('@/views/redirect/redirect.vue'), meta: {} } ], @@ -59,7 +59,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ children: [ { path: 'index', - component: () => import('@/views/Home/Index.vue'), + component: () => import('@/views/home/index.vue'), name: 'Index', meta: { title: t('router.home'), @@ -80,7 +80,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ children: [ { path: 'profile', - component: () => import('@/views/Profile/Index.vue'), + component: () => import('@/views/profile/index.vue'), name: 'Profile', meta: { canTo: true, @@ -139,7 +139,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ children: [ { path: 'edit', - component: () => import('@/views/infra/codegen/EditTable.vue'), + component: () => import('@/views/infra/codegen/editTable.vue'), name: 'InfraCodegenEditTable', meta: { noCache: true, @@ -177,7 +177,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ }, { path: '/login', - component: () => import('@/views/Login/Login.vue'), + component: () => import('@/views/login/login.vue'), name: 'Login', meta: { hidden: true, @@ -187,7 +187,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ }, { path: '/sso', - component: () => import('@/views/Login/Login.vue'), + component: () => import('@/views/login/login.vue'), name: 'SSOLogin', meta: { hidden: true, @@ -197,7 +197,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ }, { path: '/403', - component: () => import('@/views/Error/403.vue'), + component: () => import('@/views/error/403.vue'), name: 'NoAccess', meta: { hidden: true, @@ -207,7 +207,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ }, { path: '/404', - component: () => import('@/views/Error/404.vue'), + component: () => import('@/views/error/404.vue'), name: 'NoFound', meta: { hidden: true, @@ -217,7 +217,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ }, { path: '/500', - component: () => import('@/views/Error/500.vue'), + component: () => import('@/views/error/500.vue'), name: 'Error', meta: { hidden: true, diff --git a/src/views/Home/Index.vue.bark b/src/views/home/Index.vue.bark similarity index 100% rename from src/views/Home/Index.vue.bark rename to src/views/home/Index.vue.bark diff --git a/src/views/Home/Index2.vue b/src/views/home/Index2.vue similarity index 100% rename from src/views/Home/Index2.vue rename to src/views/home/Index2.vue diff --git a/src/views/Home/echarts-data.ts b/src/views/home/echarts-data.ts similarity index 100% rename from src/views/Home/echarts-data.ts rename to src/views/home/echarts-data.ts diff --git a/src/views/Home/Index.vue b/src/views/home/index.vue similarity index 100% rename from src/views/Home/Index.vue rename to src/views/home/index.vue diff --git a/src/views/Home/types.ts b/src/views/home/types.ts similarity index 100% rename from src/views/Home/types.ts rename to src/views/home/types.ts diff --git a/src/views/infra/codegen/index.vue b/src/views/infra/codegen/index.vue index 4f99ce8..3018fb0 100644 --- a/src/views/infra/codegen/index.vue +++ b/src/views/infra/codegen/index.vue @@ -156,7 +156,7 @@ import { dateFormatter } from '@/utils/formatTime' import download from '@/utils/download' import * as CodegenApi from '@/api/infra/codegen' import * as DataSourceConfigApi from '@/api/infra/dataSourceConfig' -import ImportTable from './ImportTable.vue' +import ImportTable from './importTable.vue' import PreviewCode from './PreviewCode.vue' defineOptions({ name: 'InfraCodegen' }) diff --git a/src/views/Login/components/LoginForm.vue b/src/views/login/components/LoginForm.vue similarity index 100% rename from src/views/Login/components/LoginForm.vue rename to src/views/login/components/LoginForm.vue diff --git a/src/views/Login/components/LoginFormTitle.vue b/src/views/login/components/LoginFormTitle.vue similarity index 100% rename from src/views/Login/components/LoginFormTitle.vue rename to src/views/login/components/LoginFormTitle.vue diff --git a/src/views/Login/components/MobileForm.vue b/src/views/login/components/MobileForm.vue similarity index 100% rename from src/views/Login/components/MobileForm.vue rename to src/views/login/components/MobileForm.vue diff --git a/src/views/Login/components/QrCodeForm.vue b/src/views/login/components/QrCodeForm.vue similarity index 100% rename from src/views/Login/components/QrCodeForm.vue rename to src/views/login/components/QrCodeForm.vue diff --git a/src/views/Login/components/RegisterForm.vue b/src/views/login/components/RegisterForm.vue similarity index 100% rename from src/views/Login/components/RegisterForm.vue rename to src/views/login/components/RegisterForm.vue diff --git a/src/views/Login/components/SSOLogin.vue b/src/views/login/components/SSOLogin.vue similarity index 100% rename from src/views/Login/components/SSOLogin.vue rename to src/views/login/components/SSOLogin.vue diff --git a/src/views/Login/components/index.ts b/src/views/login/components/index.ts similarity index 100% rename from src/views/Login/components/index.ts rename to src/views/login/components/index.ts diff --git a/src/views/Login/components/useLogin.ts b/src/views/login/components/useLogin.ts similarity index 100% rename from src/views/Login/components/useLogin.ts rename to src/views/login/components/useLogin.ts diff --git a/src/views/Login/Login.vue b/src/views/login/login.vue similarity index 100% rename from src/views/Login/Login.vue rename to src/views/login/login.vue diff --git a/src/views/Profile/components/BasicInfo.vue b/src/views/profile/components/BasicInfo.vue similarity index 100% rename from src/views/Profile/components/BasicInfo.vue rename to src/views/profile/components/BasicInfo.vue diff --git a/src/views/Profile/components/ProfileUser.vue b/src/views/profile/components/ProfileUser.vue similarity index 100% rename from src/views/Profile/components/ProfileUser.vue rename to src/views/profile/components/ProfileUser.vue diff --git a/src/views/Profile/components/ResetPwd.vue b/src/views/profile/components/ResetPwd.vue similarity index 100% rename from src/views/Profile/components/ResetPwd.vue rename to src/views/profile/components/ResetPwd.vue diff --git a/src/views/Profile/components/UserAvatar.vue b/src/views/profile/components/UserAvatar.vue similarity index 100% rename from src/views/Profile/components/UserAvatar.vue rename to src/views/profile/components/UserAvatar.vue diff --git a/src/views/Profile/components/UserSocial.vue b/src/views/profile/components/UserSocial.vue similarity index 100% rename from src/views/Profile/components/UserSocial.vue rename to src/views/profile/components/UserSocial.vue diff --git a/src/views/Profile/components/index.ts b/src/views/profile/components/index.ts similarity index 100% rename from src/views/Profile/components/index.ts rename to src/views/profile/components/index.ts diff --git a/src/views/Profile/Index.vue b/src/views/profile/index.vue similarity index 100% rename from src/views/Profile/Index.vue rename to src/views/profile/index.vue diff --git a/src/views/pszc/cdannealing/index.vue b/src/views/pszc/cdannealing/index.vue index 4f21baf..c0099fc 100644 --- a/src/views/pszc/cdannealing/index.vue +++ b/src/views/pszc/cdannealing/index.vue @@ -56,7 +56,7 @@