Bläddra i källkod

build: 接口修改为后台代理

laiqi 1 år sedan
förälder
incheckning
aebe8bf04c
5 ändrade filer med 359 tillägg och 448 borttagningar
  1. 6 3
      admin/.env.development
  2. 9 3
      admin/.env.production
  3. 337 439
      admin/pnpm-lock.yaml
  4. 5 1
      admin/src/auto-imports.d.ts
  5. 2 2
      admin/vite.config.ts

+ 6 - 3
admin/.env.development

@@ -8,10 +8,13 @@ VITE_APP_ENV = 'development'
 VITE_BASE_PATH = './'
 
 # 管理系统/开发环境
-VITE_APP_BASE_API = 'https://api.hninpop.com'
+# VITE_APP_BASE_API = 'https://api.hninpop.com'
+VITE_APP_BASE_API = '/dev-api'
 
 # 附件地址
 # h5
-VITE_Hw_File_Path = 'https://api.hninpop.com'
+# VITE_Hw_File_Path = 'https://api.hninpop.com'
+VITE_Hw_File_Path = '/dev-api'
 # PC
-VITE_Pc_File_Path = 'https://api.hninpop.com'
+# VITE_Pc_File_Path = 'https://api.hninpop.com'
+VITE_Pc_File_Path = '/dev-api'

+ 9 - 3
admin/.env.production

@@ -9,13 +9,19 @@ VITE_APP_ENV = 'production'
 VITE_BASE_PATH = './'
 
 # 管理系统/生产环境
-VITE_APP_BASE_API = 'https://api.hninpop.com'
+# VITE_APP_BASE_API = 'https://api.hninpop.com'
+# VITE_APP_BASE_API = 'http://153.0.193.129:5001'
+VITE_APP_BASE_API = '/prod-api'
 
 # 附件地址
 # h5
-VITE_Hw_File_Path = 'https://api.hninpop.com'
+# VITE_Hw_File_Path = 'https://api.hninpop.com'
+# VITE_Hw_File_Path = 'http://153.0.193.129:5001'
+VITE_Hw_File_Path = '/prod-api'
 # PC
-VITE_Pc_File_Path = 'https://api.hninpop.com'
+# VITE_Pc_File_Path = 'https://api.hninpop.com'
+# VITE_Pc_File_Path = 'http://153.0.193.129:5001'
+VITE_Pc_File_Path = '/prod-api'
 
 # 是否在打包时开启压缩,支持 gzip 和 brotli
 # VITE_BUILD_COMPRESS = gzip

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 337 - 439
admin/pnpm-lock.yaml


+ 5 - 1
admin/src/auto-imports.d.ts

@@ -75,6 +75,7 @@ declare global {
   const onStartTyping: typeof import('@vueuse/core')['onStartTyping']
   const onUnmounted: typeof import('vue')['onUnmounted']
   const onUpdated: typeof import('vue')['onUpdated']
+  const onWatcherCleanup: typeof import('vue')['onWatcherCleanup']
   const pausableWatch: typeof import('@vueuse/core')['pausableWatch']
   const provide: typeof import('vue')['provide']
   const provideLocal: typeof import('@vueuse/core')['provideLocal']
@@ -186,6 +187,7 @@ declare global {
   const useFullscreen: typeof import('@vueuse/core')['useFullscreen']
   const useGamepad: typeof import('@vueuse/core')['useGamepad']
   const useGeolocation: typeof import('@vueuse/core')['useGeolocation']
+  const useId: typeof import('vue')['useId']
   const useIdle: typeof import('@vueuse/core')['useIdle']
   const useImage: typeof import('@vueuse/core')['useImage']
   const useInfiniteScroll: typeof import('@vueuse/core')['useInfiniteScroll']
@@ -202,6 +204,7 @@ declare global {
   const useMediaQuery: typeof import('@vueuse/core')['useMediaQuery']
   const useMemoize: typeof import('@vueuse/core')['useMemoize']
   const useMemory: typeof import('@vueuse/core')['useMemory']
+  const useModel: typeof import('vue')['useModel']
   const useMounted: typeof import('@vueuse/core')['useMounted']
   const useMouse: typeof import('@vueuse/core')['useMouse']
   const useMouseInElement: typeof import('@vueuse/core')['useMouseInElement']
@@ -249,6 +252,7 @@ declare global {
   const useStyleTag: typeof import('@vueuse/core')['useStyleTag']
   const useSupported: typeof import('@vueuse/core')['useSupported']
   const useSwipe: typeof import('@vueuse/core')['useSwipe']
+  const useTemplateRef: typeof import('vue')['useTemplateRef']
   const useTemplateRefsList: typeof import('@vueuse/core')['useTemplateRefsList']
   const useTextDirection: typeof import('@vueuse/core')['useTextDirection']
   const useTextSelection: typeof import('@vueuse/core')['useTextSelection']
@@ -300,6 +304,6 @@ declare global {
 // for type re-export
 declare global {
   // @ts-ignore
-  export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue'
+  export type { Component, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue'
   import('vue')
 }

+ 2 - 2
admin/vite.config.ts

@@ -19,8 +19,8 @@ export default defineConfig(({ mode, command }) => {
       proxy: {
         // https://cn.vitejs.dev/config/#server-proxy
         '/dev-api': {
-          // target: 'https://api.hninpop.com', //正式
-          target: 'http://211.149.199.65:5007', //测试
+          target: 'http://153.0.193.129:5001', //正式
+          // target: 'http://211.149.199.65:5007', //测试
           ws: true,
           changeOrigin: true,
           rewrite: (p) => p.replace(/^\/dev-api/, ''),

Vissa filer visades inte eftersom för många filer har ändrats