nahida 1 год назад
Родитель
Сommit
9cf7e9129f
5 измененных файлов с 18 добавлено и 8 удалено
  1. 1 1
      .env.development
  2. 2 2
      .env.production
  3. 5 3
      .env.staging
  4. 9 2
      vite.config.js
  5. 1 0
      vite/plugins/index.js

+ 1 - 1
.env.development

@@ -7,6 +7,6 @@ VITE_APP_ENV = 'development'
 # 桃江管理系统/开发环境
 VITE_APP_BASE_API = '/dev-api'
 
-VITE_APP_BASE_URL = 'http://192.168.110.13:20002'
+VITE_APP_BASE_URL = 'https://192.168.110.13:20002'
 
 VITE_AUTH_KEY = '性与暴力'

+ 2 - 2
.env.production

@@ -5,8 +5,8 @@ VITE_APP_TITLE = 怀化高新区企业信用分级分类服务平台
 VITE_APP_ENV = 'production'
 
 # 桃江管理系统/生产环境
-VITE_APP_BASE_API = 'http://42.48.99.5:20002'
-VITE_APP_BASE_URL = 'http://42.48.99.5:20002'
+VITE_APP_BASE_API = 'https://gxq.huaihua.gov.cn/qyxyfjflserver'
+VITE_APP_BASE_URL = 'https://gxq.huaihua.gov.cn/qyxyfjflserver'
 
 # 是否在打包时开启压缩,支持 gzip 和 brotli
 VITE_BUILD_COMPRESS = gzip

+ 5 - 3
.env.staging

@@ -4,8 +4,10 @@ VITE_APP_TITLE = 怀化高新区企业信用分级分类服务平台
 # 生产环境配置
 VITE_APP_ENV = 'staging'
 
-# 若依管理系统/生产环境
-VITE_APP_BASE_API = '/stage-api'
+# 桃江管理系统/生产环境
+VITE_APP_BASE_API = 'https://192.168.110.30:20002'
+VITE_APP_BASE_URL = 'https://192.168.110.30:20002'
 
 # 是否在打包时开启压缩,支持 gzip 和 brotli
-VITE_BUILD_COMPRESS = gzip
+VITE_BUILD_COMPRESS = gzip
+VITE_AUTH_KEY = '爱与和平'

+ 9 - 2
vite.config.js

@@ -1,18 +1,21 @@
 import { defineConfig, loadEnv } from 'vite'
 import path from 'path'
 import createVitePlugins from './vite/plugins'
+import * as fs from "node:fs";
+
 
 // https://vitejs.dev/config/
 let dev = {
   // shaoyang: `http://42.48.99.5:20002`
   // shaoyang: `http://192.168.110.235:20002`
-  shaoyang: `http://192.168.110.13:20002`
+  shaoyang: `https://192.168.110.13:20002`
 }
 export default defineConfig(({ mode, command }) => {
   const env = loadEnv(mode, process.cwd())
   const { VITE_APP_ENV } = env
   return {
-    base: VITE_APP_ENV === 'production' ? '/' : '/',
+    // base: VITE_APP_ENV === 'production' ? '/qyxyfjflgl/' : '/',
+    base: '/qyxyfjflgl/',
     plugins: createVitePlugins(env, command === 'build'),
     resolve: {
       // https://cn.vitejs.dev/config/#resolve-alias
@@ -31,6 +34,10 @@ export default defineConfig(({ mode, command }) => {
       port: 8081,
       host: true,
       open: true,
+      https: {
+        key: fs.readFileSync('C:/Users/hxb/Desktop/证书/huaihua.gov.cn/PEM_NGINX/_.huaihua.gov.cn.key'),
+        cert: fs.readFileSync('C:/Users/hxb/Desktop/证书/huaihua.gov.cn/PEM_NGINX/_.huaihua.gov.cn.crt')
+      },
       proxy: {
         // https://cn.vitejs.dev/config/#server-proxy
         '/dev-api': {

+ 1 - 0
vite/plugins/index.js

@@ -1,5 +1,6 @@
 import vue from '@vitejs/plugin-vue'
 
+
 import createAutoImport from './auto-import'
 import createSvgIcon from './svg-icon'
 import createCompression from './compression'