nahida 1 год назад
Родитель
Сommit
ca9e40e2ce
5 измененных файлов с 12 добавлено и 6 удалено
  1. 1 1
      .env.production
  2. 3 3
      .env.test
  3. 1 0
      package.json
  4. 6 1
      src/layout/component/HeadBlock.vue
  5. 1 1
      vite.config.ts

+ 1 - 1
.env.production

@@ -1,5 +1,5 @@
 # 变量必须以 VITE_ 为前缀才能暴露给外部读取
 NODE_ENV = 'production'
-VITE_APP_BASE_URL = 'http://42.48.99.5:20002'
+VITE_APP_BASE_URL = 'https://gxq.huaihua.gov.cn/qyxyfjflserver'
 VITE_APP_TITLE = '怀化高新区企业信用分级分类网'
 VITE_AUTH_KEY = '爱与和平'

+ 3 - 3
.env.test

@@ -1,5 +1,5 @@
 # 变量必须以 VITE_ 为前缀才能暴露给外部读取
 NODE_ENV = 'test'
-VITE_APP_BASE_API = '/api'
-VITE_APP_BASE_URL = 'http://192.168.110.235:8091'
-VITE_APP_TITLE = '测试环境'
+VITE_APP_BASE_URL = 'https://192.168.110.30:20002'
+VITE_APP_TITLE = '怀化高新区企业信用分级分类网'
+VITE_AUTH_KEY = '爱与和平'

+ 1 - 0
package.json

@@ -8,6 +8,7 @@
     "build": "run-p type-check \"build-only {@}\" --",
     "preview": "vite preview",
     "build-only": "vite build",
+    "build:test": "vite build --mode test",
     "type-check": "vue-tsc --build --force",
     "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
     "format": "prettier --write src/"

+ 6 - 1
src/layout/component/HeadBlock.vue

@@ -8,6 +8,7 @@ import { getNews, type NewsData, type NewsResponseData } from '@/api/home'
 import { getFileExtension } from '@/utils/getFileExtension'
 import { queryFieldMethod } from '@/utils/queryFieldMethod'
 import { useSearchStore } from '@/stores/searchStore'
+import homeBG from '/public/static/首页背景.png'
 
 const searchStore = useSearchStore();
 
@@ -135,7 +136,11 @@ init()
 </script>
 
 <template>
-  <div class="headContainer w-99vw" style="background-image:url('/static/首页背景.png');background-size: 100% 100%;object-fit: fill">
+  <div class="headContainer w-99vw" :style="{
+    backgroundImage:`url(${homeBG})`,
+    backgroundSize: '100% 100%',
+    objectFit: 'fill'
+  }">
     <!-- 标题部分登录跳转 -->
     <div class="headTitle">
       <text>欢迎来到怀化高新区企业信用分级分类网</text>

+ 1 - 1
vite.config.ts

@@ -11,7 +11,7 @@ import UnoCSS from 'unocss/vite'
 
 // https://vitejs.dev/config/
 export default defineConfig({
-  // base: '/qyxyfjfl/',
+  base: '/qyxyfjfl/',
   plugins: [
     vue(),
     vueJsx(),